IB Maths AI HL
Integration
Paper 1 & 2
~7 min read
Numerical Integration using the Trapezoidal Rule
Some areas under a curve are awkward to integrate exactly — so we approximate. The trapezoidal rule slices the region into vertical strips, treats each as a trapezoid, and adds up their areas. It’s a quick numerical estimate of ∫ab y dx, and the formula is handed to you in the booklet.
📘 What you need to know
- What it does: approximates the area under a curve by summing trapezoids (strips).
- The formula is in the booklet: 12h[(y0 + yn) + 2(y1 + … + yn−1)].
- Strip width: h = b − an, where n = number of strips.
- Count carefully: n strips but n+1 function values (y-values).
- End values once, middle values twice: the first and last y aren’t doubled; everything between is.
- Percentage error: compares the estimate to the exact (true) value.
The formula and the strips
The region is cut into n equal-width strips. Each strip is a trapezoid whose parallel sides are two neighbouring y-values; adding their areas gives the estimate.
Trapezoidal rule
∫ab y dx ≈ 12h[(y0 + yn) + 2(y1 + y2 + … + yn−1)], h = b − an
✓ given in the formula booklet
🧠 “Ends once, middles twice”
The two outer heights (y0 and yn) are counted once; every height in between is doubled. Multiply the whole bracket by 12h.
⚠ Strips vs data points
- n strips (trapezoids) but n+1 y-values. With n = 4 you compute y0 through y4 — that’s five heights, not four. Miscounting is the classic slip.
Working through it
🧭 Recipe — trapezoidal rule
- Find the strip width h = b − an.
- List the x-values x0 = a, x1 = a+h, … up to xn = b.
- Build a table of y-values y0, y1, … yn from y = f(x).
- Substitute all the y-values, h and n into the formula.
🤔 Why trapezoids and not rectangles?
A rectangle uses a flat top, so it either cuts the corner off the curve or overshoots it. A trapezoid slants its top to join the two end heights of the strip, hugging the curve far more closely. More strips means thinner trapezoids and an even better fit — which is why a larger n gives a more accurate estimate.
Percentage error: once you have both an estimate and the exact value, compare them with estimate − exactexact × 100. Take the size (ignore any minus sign) — or do exact − estimate to keep it positive.
Worked examples
All parts approximate ∫04 6x2x3 + 2 dx with n = 4.
WE 1Find the strip width h and the x-values
Use h = b − an with a = 0, b = 4, n = 4.
h = 4 − 04 = 1
x-values: 0, 1, 2, 3, 4 (five values)
WE 2Build the table of y-values
Substitute each x into y = 6x2x3 + 2.
y₀ = f(0) = 0
y₁ = f(1) = 63 = 2
y₂ = f(2) = 2410 = 2.4
y₃ = f(3) = 5429 = 1.862…
y₄ = f(4) = 9666 = 1.454…
WE 3Apply the formula (answer to 3 d.p.)
Ends once, middles twice, all × 12h.
12(1)[(0 + 1.454…) + 2(2 + 2.4 + 1.862…)]
= 12(1.454… + 12.524…)
= 12(13.978…) = 6.9893…
≈ 6.989 (3 d.p.)
WE 4The exact area is 6.993. Find the percentage error
Use estimate − exactexact × 100.
6.989 − 6.9936.993 × 100
= −0.0572…% (ignore the minus)
≈ 0.06% (2 d.p.)
WE 5Spot the count: how many strips and how many y-values when n = 6 on [1, 4]?
Strips = n; y-values = n+1; width = b−an.
strips n = 6
y-values = 6 + 1 = 7 (y₀ … y₆)
h = 4 − 16 = 0.5
💡 Top tips
- The formula’s in the booklet — but know how to read off h, n and the y-values.
- Tabulate the y-values — neat working catches arithmetic slips.
- Ends once, middles twice — only the inner heights are doubled.
- Count n+1 heights — five values for four strips.
- Write parts down even if your GDC can do it all at once — it protects method marks.
- Keep full accuracy in the y-values, round only at the end.
⚠ Common mistakes
- Confusing strips and points — n strips need n+1 y-values.
- Doubling the end values — y0 and yn are counted only once.
- Forgetting the 12h factor outside the bracket.
- Wrong h — it’s b−an, using n strips not n+1 points.
- Rounding too early — keep decimals until the final answer.
Next up — Introduction to Integration. The trapezoidal rule estimates an area numerically; the rest of this unit finds areas (and antiderivatives) exactly. The next topic flips differentiation on its head: integration is antidifferentiation, the process of recovering a function from its gradient — and it introduces the all-important constant of integration, “+ c“.
Need help with Integration?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.
Book Free Session →