You will write the two strip rules as functions of f, a, b and the number of strips n.
The idea. and (sum of at the midpoints), with .
Your tasks.
trapezium(f, a, b, n).mid_ordinate(f, a, b, n).shrink(f, a, b, n, exact). Return the ratio of the trapezium error with n strips to the error with 2 * n strips.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…