Skip to content

Newton-Cotes Framework

The Newton-Cotes formulas provide a systematic way to approximate a definite integral by replacing the integrand with a polynomial that passes through a set of equally spaced nodes. Because polynomials integrate exactly and in closed form, this replacement converts the original integral into a weighted sum of function values that is easy to compute.


The Core Idea

We want to evaluate:

I(f)=∫abf(x) dxI(f) = \int_a^b f(x)\,dx

Instead of integrating f(x)f(x) directly, we approximate it with the degree-nn Lagrange interpolating polynomial Pn(x)P_n(x) built from n+1n+1 equally spaced nodes x0,x1,…,xnx_0, x_1, \ldots, x_n on [a,b][a, b], and integrate that polynomial:

In(f)=∫abPn(x) dxI_n(f) = \int_a^b P_n(x)\,dx

Lagrange polynomial P_n(x) in orange dashed, fitted through n+1 equally spaced nodes on [a,b], with the integral approximation I_n(f) shaded orange beneath it.

The shaded region is the integral of Pn(x)P_n(x), and its value equals the weighted sum ∑kσkf(xk)\sum_k \sigma_k f(x_k) where each weight σk\sigma_k is the integral of the corresponding Lagrange basis polynomial lk(x)l_k(x).


Deriving the Weighted Sum

The Lagrange interpolating polynomial can be written as:

Pn(x)=∑k=0nlk(x) f(xk)P_n(x) = \sum_{k=0}^{n} l_k(x)\,f(x_k)

where each lk(x)l_k(x) is the kk-th Lagrange basis polynomial. Substituting into the integral:

In(f)=∫ab∑k=0nlk(x) f(xk) dxI_n(f) = \int_a^b \sum_{k=0}^{n} l_k(x)\,f(x_k)\,dx

Since the function values f(xk)f(x_k) are constants with respect to xx, they can be pulled outside each integral:

In(f)=∑k=0nf(xk)∫ablk(x) dxI_n(f) = \sum_{k=0}^{n} f(x_k) \int_a^b l_k(x)\,dx

This gives us the fundamental Newton-Cotes formula:

In(f)=∑k=0nσk f(xk)\boxed{I_n(f) = \sum_{k=0}^{n} \sigma_k\, f(x_k)}

where the Newton-Cotes weights are defined as:

σk=∫ablk(x) dx\sigma_k = \int_a^b l_k(x)\,dx

Each weight σk\sigma_k depends only on the positions of the nodes, not on the function values. This means the weights can be computed once and reused for any function on the same interval.


Closed and Open Forms

Newton-Cotes formulas come in two variants depending on whether the endpoints aa and bb are used as nodes.

Closed Newton-Cotes

The closed form includes both endpoints as nodes. With n+1n+1 nodes (including aa and bb), the step size between consecutive nodes is:

h=b−anh = \frac{b - a}{n}

The nodes are:

xk=a+kh,k=0,1,…,nx_k = a + k h, \qquad k = 0, 1, \ldots, n

so that x0=ax_0 = a and xn=bx_n = b. The two most commonly used closed formulas are:

nnRuleNumber of nodes
1Trapezoidal Rule2
2Simpson’s Rule3

Open Newton-Cotes

The open form excludes both endpoints. The n+1n+1 interior nodes are shifted inward by one step from each endpoint, giving a step size of:

h=b−an+2h = \frac{b - a}{n + 2}

The nodes are:

xk=a+(k+1)h,k=0,1,…,nx_k = a + (k + 1)h, \qquad k = 0, 1, \ldots, n

Open formulas are useful when f(x)f(x) cannot be evaluated at the endpoints, for example when f(a)f(a) or f(b)f(b) is undefined.


Summary

The entire Newton-Cotes framework reduces to three steps:

  1. Choose n+1n+1 equally spaced nodes on [a,b][a, b].
  2. Compute the weights σk=∫ablk(x) dx\sigma_k = \int_a^b l_k(x)\,dx for each node.
  3. Evaluate In(f)=∑k=0nσkf(xk)I_n(f) = \sum_{k=0}^{n} \sigma_k f(x_k).

The next two sections carry out this programme in full for n=1n = 1 (Trapezoidal Rule) and n=2n = 2 (Simpson’s Rule).