Mathwords logoMathwords

Newton-Cotes Formulas — Definition, Formula & Examples

Newton-Cotes formulas are a family of numerical integration methods that approximate a definite integral by evaluating the integrand at equally spaced points and weighting those values with fixed coefficients. The Trapezoidal Rule (1 interval) and Simpson's Rule (2 intervals) are the most common members of this family.

A Newton-Cotes formula of degree nn approximates abf(x)dx\int_a^b f(x)\,dx by replacing ff with a degree-nn interpolating polynomial through n+1n+1 equally spaced nodes x0=a,x1,,xn=bx_0 = a, x_1, \ldots, x_n = b with spacing h=(ba)/nh = (b-a)/n, then integrating the polynomial exactly. The result is a weighted sum abf(x)dxi=0nwif(xi)\int_a^b f(x)\,dx \approx \sum_{i=0}^{n} w_i\, f(x_i), where the weights wiw_i depend only on nn and hh.

Key Formula

abf(x)dxi=0nwif(xi),h=ban\int_a^b f(x)\,dx \approx \sum_{i=0}^{n} w_i\, f(x_i), \quad h = \frac{b-a}{n}
Where:
  • a,ba, b = Bounds of integration
  • nn = Number of equally spaced subintervals (determines the order of the rule)
  • hh = Width of each subinterval
  • xix_i = Equally spaced nodes: $x_i = a + ih$
  • wiw_i = Fixed weights determined by integrating the interpolating polynomial

How It Works

You partition [a,b][a,b] into nn equal subintervals of width h=(ba)/nh = (b-a)/n. For n=1n=1 (Trapezoidal Rule), the formula is h2[f(x0)+f(x1)]\frac{h}{2}[f(x_0)+f(x_1)]. For n=2n=2 (Simpson's Rule), it is h3[f(x0)+4f(x1)+f(x2)]\frac{h}{3}[f(x_0)+4f(x_1)+f(x_2)]. Higher values of nn yield higher-order formulas (Simpson's 3/8 Rule for n=3n=3, Boole's Rule for n=4n=4, etc.) with greater accuracy per panel. In practice, you often apply a low-order formula repeatedly across many subintervals—this is called a composite Newton-Cotes rule.

Worked Example

Problem: Use Simpson's Rule (a single panel, n=2n=2) to approximate 02x2dx\int_0^2 x^2\,dx.
Set up nodes: With a=0a=0, b=2b=2, and n=2n=2, the spacing is h=1h=1. The nodes are x0=0x_0=0, x1=1x_1=1, x2=2x_2=2.
h=202=1h = \frac{2-0}{2} = 1
Evaluate the integrand: Compute f(x)=x2f(x)=x^2 at each node.
f(0)=0,f(1)=1,f(2)=4f(0)=0,\quad f(1)=1,\quad f(2)=4
Apply Simpson's Rule: Substitute into the formula h3[f(x0)+4f(x1)+f(x2)]\frac{h}{3}[f(x_0)+4f(x_1)+f(x_2)].
13[0+4(1)+4]=832.6667\frac{1}{3}[0 + 4(1) + 4] = \frac{8}{3} \approx 2.6667
Answer: The approximation is 832.6667\frac{8}{3} \approx 2.6667, which matches the exact value since Simpson's Rule is exact for polynomials of degree 3\leq 3.

Why It Matters

Newton-Cotes formulas underpin the numerical integration routines used in engineering, physics, and scientific computing whenever an antiderivative cannot be found in closed form. Understanding them is essential in numerical analysis courses and when implementing or selecting quadrature methods in software.

Common Mistakes

Mistake: Using Simpson's Rule with an odd number of subintervals.
Correction: Simpson's Rule requires an even number of subintervals (i.e., nn must be even in the composite version) because each panel uses two subintervals. If you have an odd number, use the Trapezoidal Rule for one panel or Simpson's 3/8 Rule to handle the extra interval.