Jump to content
Wikipedia The Free Encyclopedia

Newton–Cotes formulas

From Wikipedia, the free encyclopedia
Formulas for numerical integration
Newton–Cotes formula for  n = 2 {\displaystyle n=2} {\displaystyle 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 ]

It is assumed that the value of a function f defined on [ a , b ] {\displaystyle [a,b]} {\displaystyle [a,b]} is known at n + 1 {\displaystyle n+1} {\displaystyle n+1} equally spaced points: a x 0 < x 1 < < x n b {\displaystyle a\leq x_{0}<x_{1}<\dots <x_{n}\leq b} {\displaystyle a\leq x_{0}<x_{1}<\dots <x_{n}\leq b}. There are two classes of Newton–Cotes quadrature: they are called "closed" when x 0 = a {\displaystyle x_{0}=a} {\displaystyle x_{0}=a} and x n = b {\displaystyle x_{n}=b} {\displaystyle x_{n}=b}, i.e. they use the function values at the interval endpoints, and "open" when x 0 > a {\displaystyle x_{0}>a} {\displaystyle x_{0}>a} and x n < b {\displaystyle x_{n}<b} {\displaystyle x_{n}<b}, i.e. they do not use the function values at the endpoints. Newton–Cotes formulas using n + 1 {\displaystyle n+1} {\displaystyle n+1} points can be defined (for both classes) as[3] a b f ( x ) d x i = 0 n w i f ( x i ) , {\displaystyle \int _{a}^{b}f(x),円dx\approx \sum _{i=0}^{n}w_{i},円f(x_{i}),} {\displaystyle \int _{a}^{b}f(x),円dx\approx \sum _{i=0}^{n}w_{i},円f(x_{i}),} where

  • for a closed formula, x i = a + i h {\displaystyle x_{i}=a+ih} {\displaystyle x_{i}=a+ih}, with h = b a n {\displaystyle h={\frac {b-a}{n}}} {\displaystyle h={\frac {b-a}{n}}},
  • for an open formula, x i = a + ( i + 1 ) h {\displaystyle x_{i}=a+(i+1)h} {\displaystyle x_{i}=a+(i+1)h}, with h = b a n + 2 {\displaystyle h={\frac {b-a}{n+2}}} {\displaystyle h={\frac {b-a}{n+2}}}.

The number h is called step size, w i {\displaystyle w_{i}} {\displaystyle w_{i}} are called weights. The weights can be computed as the integral of Lagrange basis polynomials. They depend only on x i {\displaystyle x_{i}} {\displaystyle x_{i}} and not on the function f. Let L ( x ) {\displaystyle L(x)} {\displaystyle L(x)} be the interpolation polynomial in the Lagrange form for the given data points ( x 0 , f ( x 0 ) ) , ( x 1 , f ( x 1 ) ) , , ( x n , f ( x n ) ) {\displaystyle (x_{0},f(x_{0})),(x_{1},f(x_{1})),\ldots ,(x_{n},f(x_{n}))} {\displaystyle (x_{0},f(x_{0})),(x_{1},f(x_{1})),\ldots ,(x_{n},f(x_{n}))}, then a b f ( x ) d x a b L ( x ) d x = a b ( i = 0 n f ( x i ) l i ( x ) ) d x = i = 0 n f ( x i ) a b l i ( x ) d x w i . {\displaystyle \int _{a}^{b}f(x),円dx\approx \int _{a}^{b}L(x),円dx=\int _{a}^{b}\left(\sum _{i=0}^{n}f(x_{i})l_{i}(x)\right),円dx=\sum _{i=0}^{n}f(x_{i})\underbrace {\int _{a}^{b}l_{i}(x),円dx} _{w_{i}}.} {\displaystyle \int _{a}^{b}f(x),円dx\approx \int _{a}^{b}L(x),円dx=\int _{a}^{b}\left(\sum _{i=0}^{n}f(x_{i})l_{i}(x)\right),円dx=\sum _{i=0}^{n}f(x_{i})\underbrace {\int _{a}^{b}l_{i}(x),円dx} _{w_{i}}.}

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

This table lists some of the Newton–Cotes formulas of the closed type. For 0 i n {\displaystyle 0\leq i\leq n} {\displaystyle 0\leq i\leq n}, let x i = a + i h {\displaystyle x_{i}=a+ih} {\displaystyle x_{i}=a+ih} where h = b a n {\displaystyle h={\frac {b-a}{n}}} {\displaystyle h={\frac {b-a}{n}}}, and f i = f ( x i ) {\displaystyle f_{i}=f(x_{i})} {\displaystyle f_{i}=f(x_{i})}.

Closed Newton–Cotes Formulas
n Step size h Common name Formula Error term
1 b a {\displaystyle b-a} {\displaystyle b-a} Trapezoidal rule 1 2 h ( f 0 + f 1 ) {\displaystyle {\frac {1}{2}}h(f_{0}+f_{1})} {\displaystyle {\frac {1}{2}}h(f_{0}+f_{1})} 1 12 h 3 f ( 2 ) ( ξ ) {\displaystyle -{\frac {1}{12}}h^{3}f^{(2)}(\xi )} {\displaystyle -{\frac {1}{12}}h^{3}f^{(2)}(\xi )}
2 b a 2 {\displaystyle {\frac {b-a}{2}}} {\displaystyle {\frac {b-a}{2}}} Simpson's rule 1 3 h ( f 0 + 4 f 1 + f 2 ) {\displaystyle {\frac {1}{3}}h(f_{0}+4f_{1}+f_{2})} {\displaystyle {\frac {1}{3}}h(f_{0}+4f_{1}+f_{2})} 1 90 h 5 f ( 4 ) ( ξ ) {\displaystyle -{\frac {1}{90}}h^{5}f^{(4)}(\xi )} {\displaystyle -{\frac {1}{90}}h^{5}f^{(4)}(\xi )}
3 b a 3 {\displaystyle {\frac {b-a}{3}}} {\displaystyle {\frac {b-a}{3}}} Simpson's 3/8 rule 3 8 h ( f 0 + 3 f 1 + 3 f 2 + f 3 ) {\displaystyle {\frac {3}{8}}h(f_{0}+3f_{1}+3f_{2}+f_{3})} {\displaystyle {\frac {3}{8}}h(f_{0}+3f_{1}+3f_{2}+f_{3})} 3 80 h 5 f ( 4 ) ( ξ ) {\displaystyle -{\frac {3}{80}}h^{5}f^{(4)}(\xi )} {\displaystyle -{\frac {3}{80}}h^{5}f^{(4)}(\xi )}
4 b a 4 {\displaystyle {\frac {b-a}{4}}} {\displaystyle {\frac {b-a}{4}}} Boole's rule 2 45 h ( 7 f 0 + 32 f 1 + 12 f 2 + 32 f 3 + 7 f 4 ) {\displaystyle {\frac {2}{45}}h(7f_{0}+32f_{1}+12f_{2}+32f_{3}+7f_{4})} {\displaystyle {\frac {2}{45}}h(7f_{0}+32f_{1}+12f_{2}+32f_{3}+7f_{4})} 8 945 h 7 f ( 6 ) ( ξ ) {\displaystyle -{\frac {8}{945}}h^{7}f^{(6)}(\xi )} {\displaystyle -{\frac {8}{945}}h^{7}f^{(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.[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 ξ {\displaystyle \xi } {\displaystyle \xi } 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 {\displaystyle f(\xi )=\max(f(x)),a<x<b} {\displaystyle f(\xi )=\max(f(x)),a<x<b}.

Open Newton–Cotes formulas

[edit ]

This table lists some of the Newton–Cotes formulas of the open type. For 0 i n {\displaystyle 0\leq i\leq n} {\displaystyle 0\leq i\leq n}, let x i = a + ( i + 1 ) h {\displaystyle x_{i}=a+(i+1)h} {\displaystyle x_{i}=a+(i+1)h} where h = b a n + 2 {\displaystyle h={\frac {b-a}{n+2}}} {\displaystyle h={\frac {b-a}{n+2}}}, and f i = f ( x i ) {\displaystyle f_{i}=f(x_{i})} {\displaystyle f_{i}=f(x_{i})}.

Open Newton–Cotes Formulas
n Step size h Common name Formula Error term
0 b a 2 {\displaystyle {\frac {b-a}{2}}} {\displaystyle {\frac {b-a}{2}}} Rectangle rule, or
midpoint rule
2 h f 0 {\displaystyle 2hf_{0}} {\displaystyle 2hf_{0}} 1 3 h 3 f ( 2 ) ( ξ ) {\displaystyle {\frac {1}{3}}h^{3}f^{(2)}(\xi )} {\displaystyle {\frac {1}{3}}h^{3}f^{(2)}(\xi )}
1 b a 3 {\displaystyle {\frac {b-a}{3}}} {\displaystyle {\frac {b-a}{3}}} 3 2 h ( f 0 + f 1 ) {\displaystyle {\frac {3}{2}}h(f_{0}+f_{1})} {\displaystyle {\frac {3}{2}}h(f_{0}+f_{1})} 3 4 h 3 f ( 2 ) ( ξ ) {\displaystyle {\frac {3}{4}}h^{3}f^{(2)}(\xi )} {\displaystyle {\frac {3}{4}}h^{3}f^{(2)}(\xi )}
2 b a 4 {\displaystyle {\frac {b-a}{4}}} {\displaystyle {\frac {b-a}{4}}} Milne's rule 4 3 h ( 2 f 0 f 1 + 2 f 2 ) {\displaystyle {\frac {4}{3}}h(2f_{0}-f_{1}+2f_{2})} {\displaystyle {\frac {4}{3}}h(2f_{0}-f_{1}+2f_{2})} 14 45 h 5 f ( 4 ) ( ξ ) {\displaystyle {\frac {14}{45}}h^{5}f^{(4)}(\xi )} {\displaystyle {\frac {14}{45}}h^{5}f^{(4)}(\xi )}
3 b a 5 {\displaystyle {\frac {b-a}{5}}} {\displaystyle {\frac {b-a}{5}}} 5 24 h ( 11 f 0 + f 1 + f 2 + 11 f 3 ) {\displaystyle {\frac {5}{24}}h(11f_{0}+f_{1}+f_{2}+11f_{3})} {\displaystyle {\frac {5}{24}}h(11f_{0}+f_{1}+f_{2}+11f_{3})} 95 144 h 5 f ( 4 ) ( ξ ) {\displaystyle {\frac {95}{144}}h^{5}f^{(4)}(\xi )} {\displaystyle {\frac {95}{144}}h^{5}f^{(4)}(\xi )}

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 [ a , b ] {\displaystyle [a,b]} {\displaystyle [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 ] {\displaystyle [a,b]} {\displaystyle [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 ]

References

[edit ]
  1. ^ Osada, Naoki (2013). "Isaac Newton's 'Of Quadrature by Ordinates'" . Archive for History of Exact Sciences. 67 (4): 457–476. doi:10.1007/s00407-013-0117-1. ISSN 0003-9519.
  2. ^ Iliffe, Rob; Smith, George Edwin (2016). The Cambridge Companion to Newton (2nd ed.). Cambridge University Press. p. 411. ISBN 978-1-107-60174-1.
  3. ^ Quarteroni, Alfio; Sacco, Riccardo; Saleri, Fausto (2006). Numerical Mathematics (Second ed.). Springer. pp. 386–387. ISBN 978-3-540-34658-6.
  4. ^ Quarteroni, Alfio; Sacco, Riccardo; Saleri, Fausto (2006). Numerical Mathematics (Second ed.). Springer. pp. 390–391. ISBN 978-3-540-34658-6.
  5. ^ Pavel Holoborodko (2011年03月24日). "Stable Newton-Cotes Formulas" . Retrieved 2015年08月17日.
  6. ^ Pavel Holoborodko (2012年05月20日). "Stable Newton-Cotes Formulas (Open Type)" . Retrieved 2015年08月18日.
  7. ^ Booles Rule at Wolfram Mathworld, with typo in year "1960" (instead of "1860")
[edit ]
Publications
Other writings
Contributions
Newtonianism
Personal life
Relations
Depictions
Namesake
Categories

AltStyle によって変換されたページ (->オリジナル) /