Pure · Numerical methods
1 / 11
The trapezium rule
Estimating a definite integral by slicing the area into trapezium-topped strips: the formula (h/2)[y₀ + yₙ + 2(y₁ + … + y_(n−1))], choosing h, and deciding whether the estimate is an over- or under-estimate from the curve's shape.
Pure · Numerical methods
The trapezium rule
Estimating a definite integral by slicing the area into trapezium-topped strips: the formula (h/2)[y₀ + yₙ + 2(y₁ + … + y_(n−1))], choosing h, and deciding whether the estimate is an over- or under-estimate from the curve's shape.
Why it works
A definite integral is the area under a curve, and ideally you find it exactly by integrating. But many functions — , , — have no elementary integral. The trapezium rule estimates the area instead, by replacing the awkward curved region with strips you can measure.Cut into equal strips, each of width Over one strip the curve is nearly straight, so approximate it by the straight line joining its two ends — turning each strip into a trapezium. A trapezium with parallel sides (the two ordinates) and a distance apart has area . Add up all trapezia and every interior ordinate gets counted twice (it is the right side of one strip and the left side of the next), while the two ends are counted once: Ends once, middles twice. With strips there are ordinates , taken at .Over- or under-estimate? It depends on which way the curve bends:
- Where the curve is convex (bending upward, ), each straight
- Where the curve is concave (bending downward), the chords lie below the curve
So a quick look at the shape (or the sign of the second derivative) tells you the direction of the error. The curve above, , is convex, so the trapezium estimate of its area is an over-estimate.
Accuracy. More strips means thinner trapezia hugging the curve more closely, so a larger (smaller ) gives a better estimate. Halving roughly quarters the error.