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.

## Contents

## Description[edit]

It is assumed that the value of a function *f* defined on [*a*, *b*] is known at equally spaced points *x*_{i}, for *i* = 0, ..., *n*, where *x*_{0} = *a* and *x*_{n} = *b*. 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 endpoints. The closed Newton–Cotes formula of degree *n* is stated as

where *x*_{i} = *h* *i* + *x*_{0}, with *h* (called the *step size*) equal to (*x*_{n} − *x*_{0}) / *n* = (*b* − *a*) / *n*. The *w*_{i} are called *weights*.

As can be seen in the following derivation the weights are derived from the Lagrange basis polynomials. They depend only on the *x*_{i} and not on the function *f*. Let *L*(*x*) be the interpolation polynomial in the Lagrange form for the given data points (*x*_{0}, *f*(*x*_{0}) ), …, (*x*_{n}, *f*(*x*_{n}) ), then

The open Newton–Cotes formula of degree *n* is stated as

The weights are found in a manner similar to the closed formula.

## Instability for high degree[edit]

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 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.^{[1]}^{[2]}

## Closed Newton–Cotes formulas[edit]

This table lists some of the Newton–Cotes formulas of the closed type. For with n the degree, let and the notation be a shorthand for .

Degree n | Step size h | Common name | Formula | Error term |
---|---|---|---|---|

1 | Trapezoid rule | |||

2 | Simpson's rule | |||

3 | Simpson's 3/8 rule | |||

4 | Boole's rule |

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.^{[3]}

The exponent of the segment size *b* − *a* in the error term shows the rate at which the approximation error decreases. The degree of the derivative of *f* in the error term gives the degree up to which polynomials can be integrated exactly (i.e., with error equal to zero) with this rule. Note that the derivative of *f* in the error term increases by 2 for every other rule. The number must be taken from the interval (a,b).

## Open Newton–Cotes formulas[edit]

This table lists some of the Newton–Cotes formulas of the open type. Again, is a shorthand for , with , and n the degree.

Degree n | Step size h | Common name | Formula | Error term |
---|---|---|---|---|

2 | Rectangle rule, or midpoint rule | |||

3 | Trapezoid method | |||

4 | Milne's rule | |||

5 |

## Composite rules[edit]

For the Newton–Cotes rules to be accurate, the step size *h* needs to be small, which means that the interval of integration must be small itself, which is not true most of the time. For this reason, one usually performs numerical integration by splitting 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]

## References[edit]

**^**Pavel Holoborodko (2011-03-24). "Stable Newton-Cotes Formulas". Retrieved 2015-08-17.**^**Pavel Holoborodko (2012-05-20). "Stable Newton-Cotes Formulas (Open Type)". Retrieved 2015-08-18.**^**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.)* - Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 4.1. Classical Formulas for Equally Spaced Abscissas",
*Numerical Recipes: The Art of Scientific Computing*(3rd ed.), New York: Cambridge University Press, ISBN 978-0-521-88068-8 - Josef Stoer and Roland Bulirsch.
*Introduction to Numerical Analysis*. New York: Springer-Verlag, 1980.*(See Section 3.1.)*

## External links[edit]

- Hazewinkel, Michiel, ed. (2001) [1994], "Newton–Cotes quadrature formula",
*Encyclopedia of Mathematics*, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4 - Newton–Cotes formulas on www.math-linux.com
- Weisstein, Eric W. "Newton–Cotes Formulas".
*MathWorld*. - Newton–Cotes Integration, numericalmathematics.com