Newton–Cotes formulas
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 based on evaluating the integrand at equally spaced points. They are named after Isaac Newton, who originated the formulas, and Roger Cotes, who expanded upon Newton's work.
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.
Description
It is assumed that the value of a function defined on is known at equally spaced points:. There are two classes of Newton–Cotes quadrature: they are called "closed" when and, i.e. they use the function values at the interval endpoints, and "open" when and, i.e. they do not use the function values at the endpoints. Newton–Cotes formulas using points can be defined aswhere
- for a closed formula,, with,
- for an open formula,, with.
Instability for high degree
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 where the error grows exponentially for large. Methods such as Gaussian quadrature and Clenshaw–Curtis quadrature with unequally spaced points 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.
Closed Newton–Cotes formulas
This table lists some of the Newton–Cotes formulas of the closed type. For, let where, and.| Step size | Common name | Formula | Error term | |
| 1 | Trapezoidal rule | |||
| 2 | Simpson's rule | |||
| 3 | Simpson's 3/8 rule | |||
| 4 | Boole's rule | |||
| 5 | — | |||
| 6 | — |
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.
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 with this rule. The number must be taken from the interval, therefore, the error bound is equal to the error term when.
Open Newton–Cotes formulas
This table lists some of the Newton–Cotes formulas of the open type. For, let where, and.| Step size | Common name | Formula | Error term | |
| 0 | Rectangle rule, or midpoint rule | |||
| 1 | ||||
| 2 | Milne's rule | |||
| 3 |