Problem 19E

Midpoint Rule, Trapezoid Rule and relative error

Find the Midpoint and Trapezoid Rule approximations to sin πx dx using n = 25 subintervals. Compute the relative error of each approximation.

SOLUTION

The actual value of

Step 1

We have to approximate using both midpoint rule and trapezoidal rule by taking n=25.

And then we have to compute the relative error for both the approximations.