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. Newton–Cotes formulas can be useful if the value of the integrand at equally spaced points is given and when the integrand is known to have only a finite number of continuous derivatives. If the integrand is infinitely differentiable and it is possible to change the points at which the integrand is evaluated, then other methods such as Gaussian quadrature and Clenshaw–Curtis quadrature may yield higher precision per function evaluation.
Description It is assumed that the value of a function f defined on [ a , b ] {\displaystyle [a,b]} is known at 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} . There are two classes of Newton–Cotes quadrature: they are called "closed" when x 0 = a {\displaystyle x_{0}=a} and 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} and 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} points can be defined (for both classes) as
∫ 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}),}
where
for a closed formula, x i = a + i h {\displaystyle x_{i}=a+ih} , with h = 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} , with h = b − a n + 2 {\displaystyle h={\frac {b-a}{n+2}}} . The number h is called step size, 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}} and not on the function f. Let 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}))} , then
… excerpt ends here. Continue reading the full article.


