uses second-order Lagrange polynomials. Schematically, the situation in the Trapezoidal rule is shown in Figure 45
|
let
We can get a better approximation as follows:
The resulting approximation of the integral is
Simpson's rule is exact for polynomials of degrees 3 or less. This is one degree higher than we would have expected based on the Lagrange polynomials. It is a consequence of the symmetry of the grid points which leads to cancellation what otherwise would have been the leading error term.
Remark: Both Trapezoidal and Simpson Rules are examples of ``Newton-Cotes Formulas'', since they use equidistant grid points. There are higher order ones, but in general these are not recommended: you are either better off using approximations by piecewise polynomials of low degree, (see9.4), or using unequally spaced points. For example, we could use Gaussian Quadrature (see 9.3), which we cover briefly next. As a matter of fact, Newton-Cotes formulas of degree larger than 8 can lead to unusual results, since the weights or coefficients are negative, beyond this point.