Trapezoidal Rule (AI SL)
When a curve is awkward to integrate exactly, or you're only given a table of values, the trapezoidal rule slices the region into strips and approximates each one with a straight-sided trapezium instead. This page covers the formula, how to read off strip width and ordinates, and where the estimate typically goes wrong. It's part of the broader Integration topic.
16 questions on this sub-topic.
The trapezoidal rule
Covered under IB syllabus reference SL5.8: approximating areas using the trapezoidal rule, given a table of data or a function, with intervals of equal width.
Trapezoidal rule
\(\dfrac{h}{2}\big[y_0+y_n+2(y_1+\cdots+y_{n-1})\big]\)
In the formula booklet, so you don't need to memorise it. \(y_0\) and \(y_n\) are the first and last ordinates; every ordinate in between is doubled.
Strip width
\(h = \dfrac{b-a}{n}\)
With \(n\) strips over \([a,b]\) there are \(n+1\) ordinates. If a table is given directly, \(h\) is just the gap between consecutive \(x\)-values.
Need the full syllabus wording and GDC steps for evaluating integrals directly? See Integration.
Worked examples
Use the trapezoidal rule with 4 strips (5 ordinates) to estimate \(\displaystyle\int_0^4 (x^2 + 1)\,dx.\)
Worked solution
\(h = \dfrac{4-0}{4} = 1.\) Values of \(y = x^2 + 1\) at \(x\) M1 \(= 0,1,2,3,4\) are \(1, 2, 5, 10, 17.\) A1
\(A \approx \dfrac{h}{2}\big[(y_0 + y_4) + 2(y_1 + y_2 + y_3)\big] = \dfrac{1}{2}\big[18 + 2(17)\big].\) M1 \(A \approx \frac{1}{2}(52) = 26.\) A1
The table gives values of a function \(f.\)
| x | 2 | 4 | 6 | 8 |
|---|---|---|---|---|
| f(x) | 5 | 9 | 11 | 10 |
Use the trapezoidal rule to estimate \(\displaystyle\int_2^8 f(x)\,dx.\)
Worked solution
Apply the rule with \(h = 2.\) M1
\(A \approx \frac{2}{2}\big[(5 + 10) + 2(9 + 11)\big] = 15 + 40.\) A1
\(A \approx 55.\) A1
\(\displaystyle\int_0^2 (x^3 + 1)\,dx.\)
(a) Use the trapezoidal rule with 4 strips to estimate it.
(b) Find the exact value using your GDC and the percentage error of the estimate.
Worked solution
(a) \(h = 0.5\); ordinates at \(x = 0, 0.5, 1, 1.5, 2\): \(1, 1.125, 2, 4.375, 9.\) \(A \approx \dfrac{0.5}{2}\big[(1 + 9) + 2(1.125 + 2 + 4.375)\big] = 0.25(10 + 15)\) M1
\(= 6.25.\) A1
(b) GDC: \(\displaystyle\int_0^2 (x^3 + 1)\,dx = 6.\) A1
Percentage error \(= \dfrac{6.25 - 6}{6}\times 100\) M1
\(\approx 4.17\%.\) A1
Common mistakes
- Using the trapezoidal rule when the exact integral is asked for. The trapezoidal rule gives an estimate from data points; if you're given an explicit function and asked to "evaluate" or "find" the integral, integrate it directly instead.
- Forgetting to double the middle ordinates. Only \(y_0\) and \(y_n\) are used once - every ordinate strictly between them is doubled inside the bracket, and it's easy to add them all with the same weight under time pressure.
- Getting the over- or under-estimate reasoning backwards. A trapezium sits above a concave-up curve (so the estimate is too big) and below a concave-down curve (so it's too small) - it helps to sketch the curve and a trapezium on it before deciding.
Ready to practise properly?
16 trapezoidal-rule questions, marked instantly like the real exam.
Quick answers
What is the formula for the trapezoidal rule?
\(\dfrac{h}{2}\big[y_0+y_n+2(y_1+\cdots+y_{n-1})\big]\), where \(h\) is the strip width and \(y_0 \ldots y_n\) are the ordinates at each strip boundary.
Does the trapezoidal rule give the exact value of an integral?
No - it only gives an estimate, since it approximates the area under a curve with straight-sided trapeziums rather than the curve itself. Integrate directly if the exact value is needed.