Trapezoidal Rule
Definition
The trapezoidal rule is a numerical integration method that approximates by summing the areas of trapezoids formed between consecutive function evaluations.
Intuition
Rather than approximating the function by a flat horizontal line (rectangle rule), the trapezoidal rule connects neighbouring sample points with straight-line segments. Each trapezoid captures the slope of the function locally, giving a better approximation with the same number of evaluations.
Formal Description
Single interval : Approximate by the line through and :
Composite rule on : Divide into subintervals of width , with nodes :
All interior evaluations are multiplied by 2; the result is scaled by .
Applications
Used whenever the antiderivative of is unknown or impractical to compute analytically — e.g. integrating tabulated experimental data or numerically solving ODEs (trapezoidal method for stiff problems). It is the simplest baseline for adaptive quadrature routines.
Trade-offs
The global error is : halving the step size quarters the error. Simpson’s rule achieves at the same cost by fitting parabolas instead of lines, making it preferable for smooth functions. The trapezoidal rule is exact for linear functions and well-suited to periodic functions integrated over a full period (spectral convergence in that case).
Links
- Limits and Continuity — convergence of the approximation as