Mathematics/Lessons/Integration/The Trapezium Rule
Pure · Integration · Year 2

The Trapezium Rule

When a curve refuses to integrate exactly, slice the area beneath it into trapezia instead, and add up the pieces.

9 min read 4 worked examples

Approximating an area with strips

Not every function has a "nice" antiderivative — for some curves, exact integration is impossible or impractical with A-level techniques. The trapezium rule sidesteps this by approximating the area under $y=f(x)$ using a series of trapezia rather than finding an exact antiderivative.

Split the interval $[a,b]$ into $n$ strips of equal width $h=\dfrac{b-a}{n}$, and record the y-values $y_0,y_1,\dots,y_n$ at each of the $n+1$ dividing points $x_0=a,x_1,\dots,x_n=b$. Joining consecutive points $(x_i,y_i)$ with a straight line turns each strip into a trapezium, whose area is easy to compute exactly.

A curve y = f(x) on a set of axes, divided into 5 vertical strips of equal width by dashed lines at the ordinates y0 through y5. A straight line joins the top of each dashed line to the next, turning each strip into a trapezium, and the trapezia are shaded with diagonal hatching to show they approximate the area under the curve.
The area under y = f(x) approximated by 5 trapezia of equal width h, using ordinates y₀ through y₅ at each dividing point.
The trapezium rule formula
$\displaystyle\int_a^b y\,dx \approx \dfrac{h}{2}\Big[(y_0+y_n) + 2(y_1+y_2+\cdots+y_{n-1})\Big], \qquad h=\dfrac{b-a}{n}$

The first and last ordinates ($y_0$ and $y_n$) appear once each, since they belong to only one trapezium; every ordinate in between is shared by two adjacent trapezia and so is counted twice.

Over-estimate or under-estimate?

Because each strip is topped with a straight line rather than the true curve, the trapezium rule's approximation is not exact — and a sketch reveals which way the error runs.

Reading the concavity

If the curve is convex (concave up, curving away from the x-axis) on the interval, each chord lies above the curve, so the trapezium rule gives an over-estimate. If the curve is concave (concave down, curving towards the x-axis), each chord lies below the curve, giving an under-estimate. Where a curve changes concavity within the interval, the two effects can partially cancel.

Worked example 1

Applying the rule with 4 strips
Use the trapezium rule with 4 strips to estimate $\displaystyle\int_0^4 \sqrt{x^2+1}\,dx$, giving your answer to 3 significant figures.
MethodTabulate the ordinates, then apply the formula
1
$h=\dfrac{4-0}{4}=1$, so the x-values are $0,1,2,3,4$.
Strip width from n = 4 strips over the interval [0, 4].
2
$y_0=\sqrt1=1$, $y_1=\sqrt2\approx1.4142$, $y_2=\sqrt5\approx2.2361$, $y_3=\sqrt{10}\approx3.1623$, $y_4=\sqrt{17}\approx4.1231$.
Evaluate y = √(x² + 1) at each of the 5 ordinates.
3
$\displaystyle\int_0^4\sqrt{x^2+1}\,dx \approx \dfrac12\Big[(1+4.1231)+2(1.4142+2.2361+3.1623)\Big]$.
Apply the formula: first + last ordinate once, middle ordinates doubled.
4
$=\dfrac12\big[5.1231+2(6.8126)\big] = \dfrac12(5.1231+13.6252) = \dfrac12(18.7483)$.
Simplify inside the brackets.
5
$\approx 9.37$ (3 s.f.).
Final approximation.
▪ solved

Worked example 2

Working from a table of values
The table shows values of $y=f(x)$ at 6 equally spaced x-values. Use the trapezium rule to estimate $\int_1^3.5 f(x)\,dx$.
x: 1, 1.5, 2, 2.5, 3, 3.5  |  y: 2.1, 3.4, 4.8, 5.9, 6.5, 6.8
MethodIdentify h from the table, then apply the formula directly
1
There are 6 ordinates, so $n=5$ strips; $h=1.5-1=0.5$ (consistent spacing confirmed across the table).
n is the number of strips, one fewer than the number of ordinates.
2
$y_0=2.1$, $y_5=6.8$ (first and last); middle ordinates $y_1,\dots,y_4 = 3.4,4.8,5.9,6.5$.
Identify which ordinates are doubled and which are not.
3
$\displaystyle\int_1^{3.5} f(x)\,dx \approx \dfrac{0.5}{2}\Big[(2.1+6.8)+2(3.4+4.8+5.9+6.5)\Big]$.
Substitute into the formula.
4
$=0.25\big[8.9+2(20.6)\big] = 0.25(8.9+41.2) = 0.25(50.1)$.
Simplify.
5
$=12.525$.
Final estimate.
▪ solved

Worked example 3

Deciding over- or under-estimate from a sketch
Explain, without further calculation, whether the trapezium rule applied to $\int_1^4 \ln x\,dx$ gives an over-estimate or an under-estimate of the true area.
MethodDetermine the concavity of y = ln x on the interval
1
$y=\ln x \Rightarrow \dfrac{dy}{dx}=\dfrac1x \Rightarrow \dfrac{d^2y}{dx^2}=-\dfrac{1}{x^2}$.
The second derivative determines concavity.
2
For $x\in[1,4]$, $\dfrac{d^2y}{dx^2}=-\dfrac1{x^2} < 0$ throughout.
Negative second derivative means the curve is concave (curving downward/towards the x-axis).
3
Since $y=\ln x$ is concave on $[1,4]$, each chord joining consecutive points lies below the curve.
A concave curve bulges above its chords.
4
The trapezia therefore underestimate the true area, so the trapezium rule gives an under-estimate.
Chords below the curve mean less area is captured than the true region.
▪ solved

Worked example 4

Comparing the estimate to the exact value · Challenge
Use the trapezium rule with 4 strips to estimate $\int_0^2 x^3\,dx$, then compare with the exact value and explain the sign of the error using the curve's concavity.
MethodCompute both the estimate and the exact integral, then interpret the difference
1
$h=\dfrac{2-0}{4}=0.5$, x-values $0,0.5,1,1.5,2$; $y=x^3$ gives $y_0=0,\,y_1=0.125,\,y_2=1,\,y_3=3.375,\,y_4=8$.
Set up ordinates for the trapezium rule.
2
Estimate $\approx \dfrac{0.5}{2}\big[(0+8)+2(0.125+1+3.375)\big] = 0.25\big[8+2(4.5)\big]=0.25(17)=4.25$.
Apply the trapezium rule formula.
3
Exact value: $\displaystyle\int_0^2x^3\,dx = \Big[\dfrac{x^4}{4}\Big]_0^2 = 4$.
Direct integration for comparison.
4
The estimate ($4.25$) exceeds the exact value ($4$) — an over-estimate of $0.25$.
Compare the two values.
5
$\dfrac{d^2y}{dx^2}=6x \ge 0$ on $[0,2]$, so $y=x^3$ is convex there — chords lie above the curve, consistent with the over-estimate found.
Concavity explains the direction of the error.
▪ solved
Look deeper — more strips, less error

As $n$ increases, each trapezium spans a narrower strip, so the straight-line chord deviates less from the true curve — the trapezium rule's estimate converges to the exact integral as $n\to\infty$. This is precisely why it's used only when exact integration is impractical, not as a replacement for it.

Common mistake

Doubling the wrong ordinates, or miscounting $n$ from a list of $x$-values. Remember: with $n+1$ ordinates there are $n$ strips, only $y_0$ and $y_n$ are counted once, and every other ordinate in the list is doubled — a quick recount before substituting avoids an easy arithmetic slip.

Check yourself

Use the trapezium rule with 5 strips to estimate $\displaystyle\int_0^5 \dfrac{1}{x+1}\,dx$, giving your answer to 3 significant figures.
(Hint: h = 1 here, so the x-values are 0, 1, 2, 3, 4, 5.)

Method
1
$y_0=1,\,y_1=0.5,\,y_2=0.3333,\,y_3=0.25,\,y_4=0.2,\,y_5=0.1667$.
Evaluate y = 1/(x+1) at x = 0, 1, 2, 3, 4, 5.
2
$\displaystyle\int_0^5\dfrac1{x+1}dx \approx \dfrac12\big[(1+0.1667)+2(0.5+0.3333+0.25+0.2)\big]$.
Apply the formula with h = 1.
3
$=\dfrac12\big[1.1667+2(1.2833)\big] = \dfrac12(1.1667+2.5666) = \dfrac12(3.7333) \approx 1.87$.
Simplify to 3 significant figures.
▪ solved