Newton–Cotes formulas explained

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.

Description

It is assumed that the value of a function defined on

[a,b]

is known at

n+1

equally spaced points:

a\leqx0<x1<...<xn\leqb

. 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[1] \int_a^b f(x)\, dx \approx \sum_^n w_i\, f(x_i),where

xi=a+ih

, with

h=

b-a
n
,

xi=a+(i+1)h

, with

h=

b-a
n+2
.

The number 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 . Let

L(x)

be the interpolation polynomial in the Lagrange form for the given data points

(x0,f(x0)),(x1,f(x1)),\ldots,(xn,f(xn))

, then \int_a^b f(x)\, dx \approx \int_a^b L(x)\, dx = \int_a^b \left(\sum_^n f(x_i) l_i(x)\right)\, dx= \sum_^n f(x_i) \underbrace_.

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[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]

Closed Newton–Cotes formulas

This table lists some of the Newton–Cotes formulas of the closed type. For

0\lei\len

, let

xi=a+ih

where

h=

b-a
n
, and

fi=f(xi)

.
Closed Newton–Cotes Formulas! !!Step size !!Common name !!Formula !!Error term
1

b-a

1
2

h(f0+f1)

-1
12

h3f(2)(\xi)

2
b-a
2
1
3

h(f0+4f1+f2)

-1
90

h5f(4)(\xi)

3
b-a
3
3
8

h(f0+3f1+3f2+f3)

-3
80

h5f(4)(\xi)

4
b-a
4
2
45

h(7f0+32f1+12f2+32f3+7f4)

-8
945

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

must be taken from the interval, therefore, the error bound is equal to the error term when

f(\xi)=max(f(x)),a<x<b

.

Open Newton–Cotes formulas

This table lists some of the Newton–Cotes formulas of the open type. For

0\lei\len

, let

xi=a+(i+1)h

where

h=

b-a
n+2
, and

fi=f(xi)

.
Open Newton–Cotes Formulas! !!Step size !!Common name !!Formula !!Error term
0
b-a
2
Rectangle rule, or
midpoint rule

2hf0

1
3

h3f(2)(\xi)

1
b-a
3
3
2

h(f0+f1)

3
4

h3f(2)(\xi)

2
b-a
4
Milne's rule
4
3

h(2f0-f1+2f2)

14
45

h5f(4)(\xi)

3
b-a
5
5
24

h(11f0+f1+f2+11f3)

95
144

h5f(4)(\xi)

Composite rules

For the Newton–Cotes rules to be accurate, the step size 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

References

  1. Book: Alfio Quarteroni . Quarteroni . Alfio . Sacco . Riccardo . Saleri . Fausto . Numerical Mathematics . 2006 . Springer . 978-3-540-34658-6 . 386–387 . Second.
  2. Book: Alfio Quarteroni. Quarteroni . Alfio . Sacco . Riccardo . Saleri . Fausto . Numerical Mathematics . 2006 . Springer . 978-3-540-34658-6 . 390–391 . Second.
  3. Web site: Stable Newton-Cotes Formulas. Pavel Holoborodko. 2011-03-24. 2015-08-17.
  4. Web site: Stable Newton-Cotes Formulas (Open Type). Pavel Holoborodko. 2012-05-20. 2015-08-18.
  5. http://mathworld.wolfram.com/BoolesRule.html Booles Rule at Wolfram Mathworld, with typo in year "1960" (instead of "1860")

External links