Numerical Integration & Differentiation

a composite quadrature rule

A single straight line or parabola can only follow a wiggly curve so far before it drifts away. Rather than fight this by fitting one enormous high-degree polynomial across the whole interval (which backfires badly), do the sensible thing: cut the interval into many short panels, apply a simple, reliable rule on each little panel where the function barely bends, and add up the pieces. That divide-and-sum strategy is a composite quadrature rule.

Concretely, split [a, b] into n subintervals of width h = (b - a)/n and apply a basic rule — trapezoidal, Simpson, midpoint — on each, then sum the results. The local errors add up across panels, and here is the key accounting: a basic rule whose error on one panel is O(h^{p+1}) accumulates over the n = (b - a)/h panels into a GLOBAL error of O(h^p), one order lower. So the composite trapezoidal rule is O(h^2) globally and the composite Simpson rule is O(h^4) globally. Halving h then shrinks the error by 2^p, and you simply add more panels until the estimate stops changing within your tolerance.

Composite rules are how integration is actually done in practice — the basic Newton-Cotes formulas are almost never used alone on a wide interval, precisely because raising their degree triggers instability whereas subdividing is stable and convergent. They are also the natural place to be smart about WHERE you refine: a fixed uniform mesh wastes effort on flat regions, so adaptive quadrature uses an error estimate to subdivide only the panels that need it. And a composite trapezoidal rule with successively halved h is exactly the input that Romberg integration extrapolates into high order.

Composite Simpson for the integral of e^(-x^2) on [0, 1] (true 0.746824). With n = 2 panels (nodes 0, 0.5, 1) Simpson gives 0.747180, error 4e-4. With n = 4 it gives 0.746855, error 3e-5 — close to the predicted 16-fold drop, confirming the O(h^4) global rate.

Sum a simple rule over many panels; global order is one below local.

Remember the one-order penalty: a rule that is O(h^{p+1}) on a single panel is only O(h^p) globally once summed over O(1/h) panels. Doubling the panel count is the safe, stable way to gain accuracy — unlike raising a single rule's polynomial degree, which can destabilize it.

Also called
composite rulepanel methodextended rule複合法則分段求積