The Newton-Cotes formulas are an extremely useful and straightforward family of numerical integration techniques.
To integrate a function over some interval , divide it into equal parts such that and . Then find polynomials which approximate the tabulated function, and integrate them to approximate the area under the curve. To find the fitting polynomials, use Lagrange interpolating polynomials. The resulting formulas are called Newton-Cotes formulas, or quadrature formulas.
Newton-Cotes formulas may be "closed" if the interval is included in the fit, "open" if the points are used, or a variation of these two. If the formula uses points (closed or open), the coefficients of terms sum to .
If the function is given explicitly instead of simply being tabulated at the values , the best numerical method of integration is called Gaussian quadrature. By picking the intervals at which to sample the function, this procedure produces more accurate approximations (but is significantly more complicated to implement).
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)
|
This is the trapezoidal rule (Ueberhuber 1997, p. 100), with the final term giving the amount of error (which, since , is no worse than the maximum value of in this range).
The 3-point rule is known as Simpson's rule. The abscissas are
(11)
| |||
(12)
|
and the Lagrange interpolating polynomial is
(13)
| |||
(14)
| |||
(15)
|
Integrating and simplifying gives
(16)
|
(Ueberhuber 1997, p. 100).
The 4-point closed rule is Simpson's 3/8 rule,
(17)
|
(Ueberhuber 1997, p. 100). The 5-point closed rule is Boole's rule,
(18)
|
(Abramowitz and Stegun 1972, p. 886). Higher order rules include the 6-point
(19)
|
7-point
(20)
|
8-point
(21)
|
9-point
(22)
|
(Ueberhuber 1997, p. 100), 10-point
(23)
|
and 11-point
(24)
|
rules.
In general, the -point rule is given by the analytic expression
(25)
|
where
(26)
|
(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
(27)
|
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
(28)
|
(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
(29)
|
Applying Simpson's 3/8 rule, then Simpson's rule (3-point) twice, and adding gives
(30)
|
Taking the next Simpson's 3/8 step then gives
(31)
|
Combining with the previous result gives
(32)
|
where terms up to have now been completely determined. Continuing gives
(33)
|
Now average with the 3-point result
(34)
|
to obtain
(35)
|
Note that all the middle terms now have unity coefficients. Similarly, combining a 3-point with the (2+3)-point rule gives
(36)
|
Other Newton-Cotes rules occasionally encountered include Durand's rule
(37)
|
(Beyer 1987), Hardy's rule
(38)
|
and Weddle's rule
(39)
|
(Beyer 1987).
The open Newton-Cotes rules use points outside the integration interval, yielding the 1-point
(40)
|
2-point
(41)
| |||
(42)
| |||
(43)
|
3-point
(44)
|
4-point
(45)
|
5-point
(46)
|
6-point
(47)
|
and 7-point
(48)
|
rules.
A 2-point open extended formula is
(49)
|
Single interval extrapolative rules estimate the integral in an interval based on the points around it. An example of such a rule is
(50)
| |
(51)
| |
(52)
| |
(53)
|