Newton–Cotes formulas

From Wikipedia, the free encyclopedia
(Redirected from Cotes formulas)
Jump to navigation Jump to search
Newton–Cotes formula for n=2

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, who originated the formulas, and Roger Cotes, who expanded upon Newton's work.[1][2]

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

[edit | edit source]

It is assumed that the value of a function f defined on [a,b] is known at n+1 equally spaced points: ax0<x1<<xnb. There are two classes of Newton–Cotes quadrature: they are called "closed" when x0=a and xn=b, i.e. they use the function values at the interval endpoints, and "open" when x0>a and xn<b, i.e. they do not use the function values at the endpoints. Newton–Cotes formulas using n+1 points can be defined (for both classes) as[3] abf(x)dxi=0nwif(xi), where

  • for a closed formula, xi=a+ih, with h=ban,
  • for an open formula, xi=a+(i+1)h, with h=ban+2.

The number h is called step size, wi are called weights. The weights can be computed as the integral of Lagrange basis polynomials. They depend only on 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)),(x1,f(x1)),,(xn,f(xn)), then abf(x)dxabL(x)dx=ab(i=0nf(xi)li(x))dx=i=0nf(xi)abli(x)dxwi.

Instability for high degree

[edit | edit source]

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 phenomenon[4] 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 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.[5][6]

Closed Newton–Cotes formulas

[edit | edit source]

This table lists some of the Newton–Cotes formulas of the closed type. For 0in, let xi=a+ih where h=ban, and fi=f(xi).

Closed Newton–Cotes Formulas
n Step size h Common name Formula Error term
1 ba Trapezoidal rule 12h(f0+f1) 112h3f(2)(ξ)
2 ba2 Simpson's rule 13h(f0+4f1+f2) 190h5f(4)(ξ)
3 ba3 Simpson's 3/8 rule 38h(f0+3f1+3f2+f3) 380h5f(4)(ξ)
4 ba4 Boole's rule 245h(7f0+32f1+12f2+32f3+7f4) 8945h7f(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.[7]

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 ξ must be taken from the interval (a,b), therefore, the error bound is equal to the error term when f(ξ)=max(f(x)),a<x<b.

Open Newton–Cotes formulas

[edit | edit source]

This table lists some of the Newton–Cotes formulas of the open type. For 0in, let xi=a+(i+1)h where h=ban+2, and fi=f(xi).

Open Newton–Cotes Formulas
n Step size h Common name Formula Error term
0 ba2 Rectangle rule, or
midpoint rule
2hf0 13h3f(2)(ξ)
1 ba3 32h(f0+f1) 34h3f(2)(ξ)
2 ba4 Milne's rule 43h(2f0f1+2f2) 1445h5f(4)(ξ)
3 ba5 524h(11f0+f1+f2+11f3) 95144h5f(4)(ξ)

Composite rules

[edit | edit source]

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.

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Booles Rule at Wolfram Mathworld, with typo in year "1960" (instead of "1860")
  • 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.)
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Josef Stoer and Roland Bulirsch. Introduction to Numerical Analysis. New York: Springer-Verlag, 1980. (See Section 3.1.)
[edit | edit source]
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Newton–Cotes formulas on www.math-linux.com
  • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  • Newton–Cotes Integration, numericalmathematics.com