Solution

ID: past-exam-of-the-numerical-analysis-course-of-the-university-of-oxford/2017/1/c/solution

A Newton-Cotes quadrature integrates a Lagrange interpolation polynomial at equally spaced quadrature nodes. For the Newton-Cotes closed quadrature, the endpoints are included: write , , and use
These quadrature weights depend on the quadrature nodes, not on the sampled function. Open Newton-Cotes quadrature uses equally spaced interior quadrature nodes instead.
For Simpson's rule, use and set , so . The Lagrange cardinal polynomials become
Integrating these quadratic polynomials gives , , , respectively. The change of variable contributes , so
Its degree of precision of a quadrature rule is three: it integrates every quadratic polynomial by construction, and also the cubic nodal polynomial , whose integral vanishes by odd symmetry about . Any cubic polynomial differs from its quadratic polynomial interpolant by a constant multiple of this nodal polynomial.

New to topics? Read the docs here!