Solution

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

Use the nonpolynomial function on . Its exact integral is
because the sine is an odd function.
For every uniform partition of an interval with panels, the quadrature nodes satisfy . Their composite trapezoidal rule quadrature weights agree, so the two sampled sine values cancel. If there is a node at zero its sine value is already zero. The constant term is integrated exactly, giving
This is symmetric trapezoidal exactness for odd functions, applied after adding a constant function so that the resulting definite integral is nonzero. It is exactness for this particular integrand, rather than a claim that every nonpolynomial function is integrated exactly.

New to topics? Read the docs here!