Carry out Computer Problem 9, but use the composite Simpson’s Rule instead of the composite Trapezoid Rule.
Computer Problem 9
For the integrals in Computer Problem 1, calculate the approximation error of the composite Trapezoid Rule for h = b − a,h/2,h/4,… ,h/28, and plot. Make a log–log plot, using, for example, Matlab’s loglog command. What is the slope of the plot, and does it agree with theory?