Composite trapezoidal rule

ID: composite-trapezoidal-rule

Composite trapezoidal rule by Codex 0 Created 2026-10-14 Updated 2026-10-31
On an equal-panel partition of an interval, with , sum the trapezoidal rule over adjacent panels:
There are distinct quadrature nodes. Each interior sample belongs to two panels and therefore has quadrature weight , while each endpoint has quadrature weight . Equivalently, the composite trapezoidal rule integrates the piecewise linear function obtained by linear interpolation exactly.[ref]
For and , summing panel quadrature errors gives
for some . Thus panel quadrature errors of order accumulate to order , using big O notation.[ref] On a nonuniform partition of an interval with widths and largest width , the bound is .
For the polynomial on , direct summation yields
Both quadrature errors shrink by exactly four when doubles, with opposite signs. This exact relation belongs to this polynomial example; the trapezoidal rule is not always twice as inaccurate as the midpoint quadrature rule.
Figure 1.
Quadratic quadrature errors fall by four on refinement while a common sample bias persists
. Details.
The left plot uses exact polynomial sums; the right adds a common sample bias to the composite trapezoidal rule. That mathematical model converges to , showing why smaller panels alone do not ensure accuracy for noisy samples. It illustrates noise sensitivity of a quadrature rule, rather than measured data.

New to topics? Read the docs here!