The closed Newton – Cotes formula that approximates an integration given two interpolation points is
The formula is exact for any constant or linear function, so the error must be of the form
for some
so that
We can estimate the error using a quadratic polynomial,![]()
![]()
Rearranging this gives
and the error term is in general
of order 3.
Example: Estimate the error for
using the trapezium rule.
![]()
on
so
and![]()
The actual error is 0.132698.
Similarly, given three interpolation points,
which is exact for all quadratic polynomials, the error term must be of the form
for some
If we examine
on the interval
we find
so the formula is exact for cubic polynomials too and the error must be of the form
To estimate the error use
then
and
For a general interval of integration the error term here is![]()