Newton-Cotes formulas
From Wikipedia, the free encyclopedia
In numerical analysis, the Newton-Cotes formulas, also called the Newton-Cotes rules, are a group of formulas for numerical integration (also called quadrature) based on evaluating the integrand at n+1 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.
Contents |
[edit] Description
It is assumed that the value of a function f is known at equally spaced points xi, for i = 0, …, n. There are two types of Newton-Cotes formulas, the "closed" type which uses the function value at all points, and the "open" type which does not use the function values at the end points. The closed Newton-Cotes formula of degree n is stated as
where xi = h i + x0, with h (called the step size) equal to (xn − x0)/n. The wi are called weights.
As can be seen in the following derivation the weights are derived from the Lagrange basis polynomials. This means they depend only on the xi and not on the function f. Let L(x) be the interpolation polynomial in the Lagrange form for the given data points (x0, f(x0) ), …, (xn, f(xn) ), then
The open Newton-Cotes formula of degree n is stated as
The weights are found in a manner similar to the closed formula.
[edit] Instability for high degree
A Newton-Cotes formula of any degree n can be constructed. However, for large n a Newton-Cotes rule can sometimes suffer from catastrophic Runge's phenomena where the error grows exponentially for large n. 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 can not 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.
[edit] Closed Newton-Cotes formulas
This table lists some of the Newton-Cotes formulas of the closed type. The notation fi is a shorthand for f(xi).
Degree | Common name | Formula | Error term |
---|---|---|---|
1 | Trapezoid rule | ||
2 | Simpson's rule | ||
3 | Simpson's 3/8 rule | ||
4 | Boole's rule, or Bode's Rule [sic] |
Boole's rule is called Bode's rule in Abramowitz and Stegun due to propagation of an early typo.[1].
The exponent of the step size h in the error term shows the rate at which the approximation error decreases. The derivative of f in the error term shows which polynomials can be integrated exactly (i.e., with error equal to zero). Note that the derivative of f in the error term increases by 2 for every other rule. The number ξ is between a and b.
[edit] Open Newton-Cotes formulas
This table lists some of the Newton-Cotes formulas of the open type.
Degree | Common name | Formula | Error term |
---|---|---|---|
0 | Rectangle rule | ||
1 | |||
2 | |||
3 |
[edit] Composite rules
For the Newton-Cotes rules to be accurate, the step size h needs to be small, which means that the interval of integration [a,b] must be small itself, which is not true most of the time. For this reason, one usually performs numerical integration by splitting [a,b] into smaller subintervals, applying a Newton-Cotes rule on each subinterval, and adding up the results. This is called a composite rule, see Numerical integration.
[edit] References
- M. Abramowitz and I. A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972. (See Section 25.4.)
- George E. Forsythe, Michael A. Malcolm, and Cleve B. Moler. Computer Methods for Mathematical Computations. Englewood Cliffs, NJ: Prentice-Hall, 1977. (See Section 5.1.)
- William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling. Numerical Recipes in C. Cambridge, UK: Cambridge University Press, 1988. (See Section 4.1.)
- Josef Stoer and Roland Bulirsch. Introduction to Numerical Analysis. New York: Springer-Verlag, 1980. (See Section 3.1.)