# Newton and Cotes formulas

The usual way of numerically integrate a function, is to find a simpler function which approximates the given function and then integrating the interpolation function. That is, if we want to find $\int_{a}^{b}f(x)\,dx$, we find an approximating function $p(x)$ such that $f(x)$ and $p(x)$ be close (on some concept of distance) and then we say

 $\int_{a}^{b}f(x)\,dx\approx\int_{a}^{b}p(x)\,dx$

The simplest approximation functions are polynomials. If we evaluate $f(x)$ at some points $x_{0},x_{1},\ldots,x_{n}$, we can use Lagrange’s interpolating polynomial to find a polynomial $p(x)$ with degree $n$ such that $p(x_{j})=f(x_{j})$ for $j=0,1,\ldots,n$.

Newton and Cotes’ integration formulas are obtained when the $x_{0},x_{1},\ldots,x_{n}$ are sampled evenly over the interval, and then Lagrange interpolating polynomials are used to approximate the function.

The Newton and Cotes formulas for small values of $n$ are given on the following table.

${n}$ ${\int p(x)}$ Name
$1$ $\frac{h}{2}(f(x_{0})+f(x_{1}))$ Trapezoidal rule
$2$ $\frac{h}{3}(f(x_{0})+4f(x_{1})+f(x_{2}))$ Simpson’s rule
$3$ $\frac{3h}{8}(f(x_{0})+3f(x_{1})+3f(x_{3})+f(x_{3}))$ Simpson’s 3/8 rule
$4$ $\frac{2h}{45}(7f(x_{0})+32f(x_{1})+12f(x_{2})+32f(x_{3})+7f(x_{4}))$ Milne’s rule

recalling that $x_{0},x_{1},\ldots,x_{n}$ are evenly spaced on $[a,b]$.

Since the Simpson’s rule is actually the Newton and Cotes formula for $n=2$, the proof of Simpson’s rule illustrates this method.

Title Newton and Cotes formulas NewtonAndCotesFormulas 2013-03-22 14:50:28 2013-03-22 14:50:28 drini (3) drini (3) 7 drini (3) Definition msc 65D32 Newton-Cotes SimpsonsRule CodeForSimpsonsRule