IB Maths AI SLIntegrationPaper 1 & 2trapezoidal rule~6 min read
Numerical Integration using the Trapezoidal Rule
Some areas under a curve cannot be found by neat algebra. The trapezoidal rule gives a numerical estimate instead: slice the region into thin strips, treat each as a trapezoid, and add up their areas. This note covers the formula, how to lay out the working, and how to measure the error in the estimate.
📘 What you need to know
The trapezoidal rule estimates the area under a curve by splitting it into trapezoidal strips and summing their areas.
The formula: ∫aby dx ≈ ½h[(y0 + yn) + 2(y1 + … + yn−1)] — given in the formula booklet.
The strip width is h = (b − a)/n, where n is the number of strips.
There are n strips but n + 1 ordinates (y-values) — the first and last are not doubled.
The ordinates are the heights of the curve at x = a, a+h, a+2h, …, b.
Percentage error compares the estimate with the true area: |estimate − exact| ÷ exact × 100.
The trapezoidal rule
Not every area under a curve can be found with neat algebra. The trapezoidal rule — also called the trapezium rule — gives a numerical estimate instead. It slices the region into thin vertical strips, treats each strip as a trapezoid, and adds up their areas.
The trapezoidal rule
∫aby dx ≈ ½h[(y0 + yn) + 2(y1 + y2 + … + yn−1)]
strip width h = (b − a)/n · given in the formula booklet
Each strip is a trapezoid whose straight top (orange) is a chord of the curve. Summing the trapezoid areas estimates the area under y = f(x).
Each trapezoid has two vertical sides — the ordinates — and a straight top joining them. That straight top is only an approximation of the curve, which is why the rule gives an estimate rather than an exact value.
Strips, widths and ordinates
Two counts matter, and they are not the same. With n strips there are n + 1 ordinates — the y-values y0, y1, …, yn.
The strips all have the same width, h = (b − a)/n. The x-values run a, a+h, a+2h, … up to b; substituting each into y = f(x) gives the ordinates. Laying these out in a table keeps the working clear. In the formula, the first and last ordinates stand alone, while every ordinate in between is doubled.
Percentage error
Because the rule only estimates the area, it is natural to ask how close it is. If the true area is known — given in the question, or found by exact integration — the percentage error measures the gap.
Percentage error
% error = |estimate − exact|exact × 100
compares the trapezoidal estimate with the true area
Take the size of the difference between the estimate and the exact value, divide by the exact value, and multiply by 100. The result is always quoted as a positive percentage.
🧭 Recipe — applying the trapezoidal rule
Find the strip width: h = (b − a)/n.
List the x-values: x0 = a, x1 = a+h, …, up to xn = b.
Build a table: substitute each x-value into y = f(x) to get the ordinates.
Substitute into the formula: ½h[(y0 + yn) + 2(inner ordinates)] — the first and last are not doubled.
Evaluate, rounding only at the end as the question asks.
Worked examples
WE 1
Finding the strip width
A trapezoidal-rule estimate of ∫19f(x) dx uses n = 4 strips. Find the strip width h.
strip width: h = (b − a)/nhere a = 1, b = 9, n = 4h = (9 − 1)/4 = 8/4h = 2h is the width of one strip — the interval length divided by the number of strips.
WE 2
Strips and ordinates
A trapezoidal-rule approximation uses 6 strips. (a) How many ordinates (y-values) are needed? (b) Which ordinates are doubled in the formula?
(a) with n strips there are n + 1 ordinates6 strips → 7 ordinates: y₀, y₁, y₂, y₃, y₄, y₅, y₆(b) the first and last (y₀ and y₆) are not doubledthe inner ordinates y₁, y₂, y₃, y₄, y₅ are each doubleda common slip is to confuse the number of strips with the number of y-values — there is always one more y-value than strip.
WE 3
Applying the rule to a polynomial
Use the trapezoidal rule with n = 4 to estimate ∫04 (x2 + 1) dx.
h = (4 − 0)/4 = 1; x-values 0, 1, 2, 3, 4y = x2+1: y₀=1, y₁=2, y₂=5, y₃=10, y₄=17∫ ≈ ½(1)[(1 + 17) + 2(2 + 5 + 10)]= ½[18 + 34]∫ ≈ 26only the middle ordinates 2, 5, 10 are doubled; the end ordinates 1 and 17 are added once.
WE 4
Applying the rule to a reciprocal
Use the trapezoidal rule with n = 4 to estimate ∫15 (1/x) dx, giving your answer to 3 decimal places.
h = (5 − 1)/4 = 1; x-values 1, 2, 3, 4, 5y = 1/x: y₀=1, y₁=0.5, y₂=0.333, y₃=0.25, y₄=0.2∫ ≈ ½(1)[(1 + 0.2) + 2(0.5 + 0.333 + 0.25)]= ½[1.2 + 2(1.083)]∫ ≈ 1.683 (3 d.p.)keep extra decimals in the ordinates and round only at the very end.
WE 5
Estimate and percentage error
Use the trapezoidal rule with n = 4 to estimate ∫02x3 dx. Given that the exact value of the integral is 4, find the percentage error in the approximation.
h = (2 − 0)/4 = 0.5; x-values 0, 0.5, 1, 1.5, 2y = x3: y₀=0, y₁=0.125, y₂=1, y₃=3.375, y₄=8estimate = ½(0.5)[(0 + 8) + 2(0.125 + 1 + 3.375)]= 0.25[8 + 2(4.5)] = 0.25(17) = 4.25% error = |4.25 − 4| ÷ 4 × 100estimate 4.25 · percentage error 6.25%the curve is concave up, so the trapezoids sit above it — the rule overestimates here.
WE 6
Full question: distance from speed data
A car’s speed v (m/s) is recorded every 2 seconds. At times t = 0, 2, 4, 6, 8 s the speed was 0, 9, 16, 21, 24 m/s respectively. The distance travelled equals the area under the speed–time graph. (a) State the strip width and the number of strips. (b) Use the trapezoidal rule to estimate the distance travelled. (c) Give one reason the estimate may differ from the true distance.
(a) readings are 2 s apart, and there are 5 of themstrip width h = 2 s; number of strips = 4(b) ordinates y₀=0, y₁=9, y₂=16, y₃=21, y₄=24distance ≈ ½(2)[(0 + 24) + 2(9 + 16 + 21)]= 1[24 + 2(46)] = 24 + 92(a) h = 2 s, 4 strips · (b) ≈ 116 m · (c) straight chords don’t match the true curve(c) the rule joins the readings with straight lines, so it misses the true curved shape of the speed between them. The rule works on a table of measured values just as well as on a function.
💡 Top tips
Strips and ordinates are different counts: n strips always means n + 1 ordinates.
The first and last ordinates, y0 and yn, are added once; every ordinate in between is doubled.
Find h with h = (b − a)/n first, then list the x-values.
Lay the ordinates out in a table — it keeps the working clear and easy to follow.
For percentage error, take the size of the difference (always positive) before dividing by the exact value.
⚠ Common mistakes
Confusing the number of strips with the number of y-values — there is always one more y-value.
Doubling the first and last ordinates, or forgetting to double the inner ones.
Using the wrong h — dividing by the number of ordinates instead of the number of strips.
Rounding the ordinates too early, which throws off the final answer.
Leaving the percentage error negative, or dividing by the estimate instead of the exact value.
Next up: Introduction to Integration — where integration stops being a numerical estimate and becomes the exact reverse of differentiation. The trapezoidal rule is the approximate route to an area; integration proper is the exact one. Keep the strip-counting habit sharp — n strips, n + 1 ordinates — it’s a classic place to drop a mark.
Need help with AI SL Integration?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.