The Newton-Cotes Integration Formulae

An introduction to closed and open Newton-Cotes rules, with derivations of the trapezoidal and Simpson's formulae.

The general idea behind the Newton-Cotes integration formulae is to replace a function with an interpolating polynomial, then integrate that polynomial.

For equally spaced nodes in , let be the polynomial of degree at most that interpolates at those nodes. Using the Lagrange form of the interpolant,

Here are Lagrange's fundamental polynomials, and are the weights. The weights depend on the chosen nodes and the limits of integration, but not on . This gives the general Newton-Cotes quadrature formula:

Newton-Cotes rules are classified as closed or open, depending on whether the endpoint values are included among the samples.

Closed form

In a closed rule, the first and last data points are the limits of integration. With subintervals of equal width , the nodes are for :

Open form

An open rule does not sample the endpoints. With equally spaced interior samples , the integration limits and lie one step beyond the first and last samples. The interpolating polynomial has degree at most and is evaluated across the full interval, so the end portions are extrapolated:

Open rules are useful when the function is not defined, or is difficult to evaluate, at one or both endpoints.

Trapezoidal Rule#

The trapezoidal rule is the simplest closed Newton-Cotes rule. It uses the two endpoint values and the first-order interpolating polynomial:

Integrating this straight line from to gives

For a single interval, the error is proportional to the second derivative:

If a single interval is not accurate enough, divide into equal subintervals and apply the rule to each one. With and , this gives the composite trapezoidal rule:

Simpson's Rule#

The trapezoidal rule approximates the function with a straight line. Simpson's rule uses a second-order interpolating polynomial through three equally spaced points , , and . Let ; the integration interval has width .

Integrating the quadratic Lagrange interpolant gives

This rule is exact for polynomials up to degree three. Its single-panel error is

For more intervals, apply the rule in pairs. The composite Simpson rule therefore requires an even number of subintervals:

Simpson's Rule#

The same approach can be used with a third-order interpolating polynomial through four equally spaced points. Set . Integrating the cubic interpolant gives

Like Simpson's rule, this rule is exact for polynomials up to degree three. Its single-panel error is

For example, equation uses three sampled values over two subintervals, while equation uses four sampled values over three subintervals. In composite applications, Simpson's rule is applied to pairs of subintervals; the rule is applied to groups of three.

These formulae are most useful when the function is reasonably smooth and the subintervals are not too wide. Increasing the degree of a single Newton-Cotes interpolant does not always improve the result: high-degree polynomials can oscillate between the sample points. In practice, composite low-degree rules are often a safer choice.

[fuck copyright. feel free to use this website as inspiration]

tags