In numerical analysis, the Newton–Cotes formulas, also called the Newton–Cotes quadrature rules or simply Newton–Cotes rules, are a group of formulas for numerical integration (also called quadrature) based on evaluating the integrand at equally spaced points. They are named after Isaac Newton and Roger Cotes.
Newton–Cotes formulas can be useful if the value of the integrand at equally spaced points is given. If it is possible to change the points at which the integrand is evaluated, then other methods such as Gaussian quadrature and Clenshaw–Curtis quadrature are probably more suitable.
It is assumed that the value of a function defined on
[a,b]
n+1
a\leqx0<x1<...<xn\leqb
x0=a
xn=b
x0>a
xn<b
n+1
xi=a+ih
h=
b-a | |
n |
xi=a+(i+1)h
h=
b-a | |
n+2 |
The number is called step size,
wi
xi
L(x)
(x0,f(x0)),(x1,f(x1)),\ldots,(xn,f(xn))
A Newton–Cotes formula of any degree can be constructed. However, for large a Newton–Cotes rule can sometimes suffer from catastrophic Runge's phenomenon[2] where the error grows exponentially for large . Methods such as Gaussian quadrature and Clenshaw–Curtis quadrature with unequally spaced points (clustered at the endpoints of the integration interval) are stable and much more accurate, and are normally preferred to Newton–Cotes. If these methods cannot be used, because the integrand is only given at the fixed equidistributed grid, then Runge's phenomenon can be avoided by using a composite rule, as explained below.
Alternatively, stable Newton–Cotes formulas can be constructed using least-squares approximation instead of interpolation. This allows building numerically stable formulas even for high degrees.[3] [4]
This table lists some of the Newton–Cotes formulas of the closed type. For
0\lei\len
xi=a+ih
h=
b-a | |
n |
fi=f(xi)
1 | b-a |
h(f0+f1) |
h3f(2)(\xi) | |||||||||||
2 |
|
h(f0+4f1+f2) |
h5f(4)(\xi) | |||||||||||
3 |
|
h(f0+3f1+3f2+f3) |
h5f(4)(\xi) | |||||||||||
4 |
|
h(7f0+32f1+12f2+32f3+7f4) |
h7f(6)(\xi) |
Boole's rule is sometimes mistakenly called Bode's rule, as a result of the propagation of a typographical error in Abramowitz and Stegun, an early reference book.[5]
The exponent of the step size h in the error term gives the rate at which the approximation error decreases. The order of the derivative of f in the error term gives the lowest degree of a polynomial which can no longer be integrated exactly (i.e. with error equal to zero) with this rule. The number
\xi
f(\xi)=max(f(x)),a<x<b
This table lists some of the Newton–Cotes formulas of the open type. For
0\lei\len
xi=a+(i+1)h
h=
b-a | |
n+2 |
fi=f(xi)
0 |
| Rectangle rule, or midpoint rule | 2hf0 |
h3f(2)(\xi) | ||||||||||
1 |
|
h(f0+f1) |
h3f(2)(\xi) | |||||||||||
2 |
| Milne's rule |
h(2f0-f1+2f2) |
h5f(4)(\xi) | ||||||||||
3 |
|
h(11f0+f1+f2+11f3) |
h5f(4)(\xi) |
For the Newton–Cotes rules to be accurate, the step size needs to be small, which means that the interval of integration
[a,b]
[a,b]