As explained in lecture, the Newton's Cotes quadratures for f dx are based on polynomial interpolation. Now consider a cubic Hermite polynomial, interpolating both f and its derivative f at a and b. The osculating interpolation formula is:
px = fa + f'(a)(x - a) + f[a,a,b](x - a)(x - b)
and integrating this yields (after some algebra):
∫px dx = [fa + fb] + [f'(a) - f'(b)]/12
This formula is called the corrected trapezoidal rule.
(a) Show that the error for this corrected trapezoidal rule can be estimated by:
E(f) ≤ (n^3/720)
Hint: The general polynomial interpolation error is f - pn = f[ξ](x), and the error for the cubic Hermite is f(x) - p3 = f[aa,b,b,x](x - a)(x - b)^2.
(b) Use Simpson's rule, trapezoidal rule, and the corrected trapezoidal rule to evaluate f(x). Compare the errors and describe your observations.