The Newton-Cotes formulas are numerical integration formulas obtained by integrating a Lagrange interpolating polynomial through equally spaced sampling points.
For a closed formula with sampling points on
, put
,
, and
. Integrating the fitting polynomial
approximates the integral of
.
A closed formula includes both endpoints among its sampling points. An open formula uses equally spaced sampling points
strictly inside
,
omitting both endpoints. In formulas written as
, the weights sum to
for the closed rule and
for the open rule. These sums follow by integrating the
constant function 1.
When sampling points can be chosen freely, Gaussian quadrature is an alternative. An -point Legendre-Gauss
quadrature formula is exact for polynomials of
polynomial degree at most
.
In the remainder formulas below, assume that the displayed derivatives are continuous on the interval containing the integration
interval and all sampling points. Each intermediate argument
,
,
or
lies in that interval and may differ between formulas.
The 2-point closed Newton-Cotes formula is called the trapezoidal rule because it approximates the area under a curve
by a trapezoid with horizontal base and sloped top
(connecting the endpoints and
). If the first point is
, then the other endpoint will be located at
|
(1)
|
and the Lagrange interpolating polynomial through the points and
is
|
(2)
| |||
|
(3)
| |||
|
(4)
|
Integrating over the interval (i.e., finding the area of the trapezoid) then gives
|
(5)
| |||
|
(6)
| |||
|
(7)
| |||
|
(8)
| |||
|
(9)
| |||
|
(10)
|
The integral of is therefore given by the trapezoidal
rule
|
(11)
|
The absolute error is at most (Ueberhuber 1997, p. 100).
The 3-point rule is known as Simpson's rule. The abscissas are
|
(12)
| |||
|
(13)
|
and the Lagrange interpolating polynomial is
|
(14)
| |||
|
(15)
| |||
|
(16)
|
Integrating and simplifying gives
|
(17)
|
and Simpson's rule is
|
(18)
|
(Ueberhuber 1997, p. 100).
The 4-point closed rule is Simpson's 3/8 rule,
|
(19)
|
(Ueberhuber 1997, p. 100). The 5-point closed rule is Boole's rule,
|
(20)
|
(Abramowitz and Stegun 1972, p. 886). Higher order rules include the 6-point
|
(21)
|
7-point
|
(22)
|
8-point
|
(23)
|
9-point
|
(24)
|
(Ueberhuber 1997, p. 100), 10-point
|
(25)
|
and 11-point
|
(26)
|
rules.
In general, the -point
closed rule approximates the integral by
|
(27)
|
where
denotes the weight at node
for
subintervals and
sampling points:
|
(28)
|
for
(Whittaker and Robinson 1967, p. 154). This gives the triangle of coefficients
shown in the following table (OEIS A093735
and A093736).
| 0 | 1 | 2 | 3 | 4 | 5 | |
| 1 | ||||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 |
Note that
|
(29)
|
Closed "extended" rules use multiple copies of lower order closed rules to build up higher order rules. By appropriately tailoring this process, rules with
particularly nice properties can be constructed. For tabulated points, using the
trapezoidal rule
times and adding the results gives
|
(30)
|
(Ueberhuber 1997, p. 107). Using a series of refinements on the extended trapezoidal rule gives the method known as Romberg
integration. A 3-point extended rule for odd is
|
(31)
|
For ,
expanding the sum gives
|
(32)
|
Applying Simpson's 3/8 rule, then Simpson's rule (3-point) twice, and adding gives
|
(33)
|
Taking the next Simpson's 3/8 rule step then gives
|
(34)
|
Combining with the previous result gives
|
(35)
|
Continuing with Simpson's rule in the middle and Simpson's 3/8 rule at both ends gives, for odd ,
|
(36)
|
For sufficiently smooth on a fixed integration interval, averaging with the 3-point
approximation
|
(37)
|
gives
|
(38)
|
Note that all the middle terms now have unity coefficients. Similarly, combining a 3-point with the (2+3)-point rule gives, for ,
|
(39)
|
Other Newton-Cotes rules occasionally encountered include Durand's rule (for )
|
(40)
|
(Beyer 1987), Hardy's rule
|
(41)
|
and Weddle's rule
|
(42)
|
(Beyer 1987).
The open Newton-Cotes rules use sampling points strictly inside the integration interval, yielding the 1-point
|
(43)
|
2-point
|
(44)
| |||
|
(45)
| |||
|
(46)
|
and hence
|
(47)
|
3-point
|
(48)
|
4-point
|
(49)
|
5-point
|
(50)
|
6-point
|
(51)
|
and 7-point
|
(52)
|
rules.
For ,
a 2-point extended formula using external sampling points
and
,
in addition to
,
...,
,
is
|
(53)
|
Single interval extrapolative rules estimate the integral over
from sampling points
,
, ... to its right. Examples are
|
(54)
| |
|
(55)
| |
|
(56)
| |
|
(57)
|