Numerical integration: the trapezium rule

A level Maths (Edexcel) · Edexcel 9MA0 · P9.3 · Pure mathematics › Numerical methods

1 exam-style question plus unlimited generated ones on this topic, at up to four difficulty levels, with full mark schemes. Notes and Full packs are open to everyone. Practice needs a free account.

Or take a quick quiz: 10 questions on this subtopic in A level Maths (Edexcel), marked as you tap.

Revision notes

The trapezium rule estimates \(\int_a^b y\,\mathrm{d}x\) by splitting the area into strips and treating each strip as a trapezium. You need to complete a table of values, apply the formula, decide from the shape of the curve whether the estimate is too big or too small, and say how to improve it. Questions are usually 3 to 6 marks, sometimes followed by a 'hence' part.

Key facts

  • \(\int_a^b y\,\mathrm{d}x \approx \dfrac{1}{2}h\left\{(y_0 + y_n) + 2(y_1 + \cdots + y_{n-1})\right\}\)
  • \(h = \dfrac{b - a}{n}\); \(n\) strips, \(n + 1\) ordinates
  • Convex (\(\mathrm{f}'' \gt 0\)): overestimate
  • Concave (\(\mathrm{f}'' \lt 0\)): underestimate
  • More strips (smaller \(h\)): more accurate
  • \(\int_a^b (\mathrm{f}(x) + k)\,\mathrm{d}x = \int_a^b \mathrm{f}(x)\,\mathrm{d}x + k(b - a)\)
  • Percentage error \(= \dfrac{|\text{estimate} - \text{exact}|}{\text{exact}} \times 100\%\)

Notes

The rule

diagram
  • \(\int_a^b y\,\mathrm{d}x \approx \dfrac{1}{2}h\left\{(y_0 + y_n) + 2(y_1 + \cdots + y_{n-1})\right\}\)⁠, where \(h = \dfrac{b - a}{n}\). It is in the formula booklet.
  • \(n\) strips need \(n + 1\) ordinates (\(y\)-values): the first and last are used once, all the others twice.
  • xyOy0 0.5y1 1y2 1.5y3 2y4 y = √(x³ + 1)
    4 strips of width \(h = 0.5\) need 5 ordinates: \(y_0\) and \(y_4\) are used once, \(y_1\), \(y_2\) and \(y_3\) twice.
  • Keep table values to the accuracy given (often 4 or 5 d.p.) and round only the final answer.

Overestimate or underestimate?

diagram
  • If the curve is convex on the interval (bends upwards, \(\mathrm{f}''(x) \gt 0\)), the top of each trapezium lies above the curve: the rule overestimates.
  • If the curve is concave (bends downwards, \(\mathrm{f}''(x) \lt 0\)), the trapezia lie below the curve: the rule underestimates.
  • convex: overestimateconcave: underestimate
    Only the bending matters: on a convex curve the straight top of each trapezium is above the curve; on a concave curve it is below.
  • Whether the curve is increasing or decreasing does not matter, only which way it bends. If it changes concavity in the interval, you cannot tell without more work.

Improving and using the estimate

  • More strips (smaller \(h\)) give a better estimate.
  • Bounds: if one method gives an underestimate and another an overestimate (e.g. lower rectangles and the trapezium rule on a convex, increasing curve), the exact value lies between them.
  • 'Hence' parts use properties of integrals: \(\int_a^b k\,\mathrm{f}(x)\,\mathrm{d}x = k\int_a^b \mathrm{f}(x)\,\mathrm{d}x\) and \(\int_a^b (\mathrm{f}(x) + k)\,\mathrm{d}x = \int_a^b \mathrm{f}(x)\,\mathrm{d}x + k(b - a)\)⁠. Log laws such as \(\ln x^2 = 2\ln x\) also help.

How to answer each type of question

M = method mark, A = answer mark, B = a mark on its own.

Complete a table and apply the trapezium rule

5 marksGrade D
  1. Fill in the missing values with your calculator, to the accuracy asked.
  2. Find \(h\) from the table (the gap between \(x\)-values).
  3. Substitute into the formula, showing the bracket, and give the answer to the accuracy asked.

Example. The table shows some values of \(y = \sqrt{x^3 + 1}\) for \(0 \le x \le 2\).

\(x\)00.511.52
\(y\)11.41423
(a) Complete the table, giving values to 4 decimal places.
(b) Use the trapezium rule with all the values in the table to estimate \(\displaystyle\int_0^2 \sqrt{x^3 + 1}\,\mathrm{d}x\), giving your answer to 3 significant figures.

Show the model answerHide the model answer
(a)
\(x\)00.511.52
\(y\)11.06071.41422.09173
B1 B1
(one for each new value)
(b) \(h = 0.5\)
B1
\(\dfrac{1}{2} \times 0.5\)
\(\times \left[1 + 3 + 2(1.0607 + 1.4142 + 2.0917)\right]\)
M1
\[\begin{aligned}[b]&= 0.25 \times 13.1332 \\ &= 3.28\end{aligned}\]
(3 s.f.)
A1

Decide whether the estimate is too big or too small

1 to 2 marksGrade B
  1. Decide which way the curve bends on the interval (from a sketch, or the sign of \(\mathrm{f}''(x)\)).
  2. State overestimate (convex) or underestimate (concave).
  3. Give the reason: where the tops of the trapezia lie compared with the curve.

Example. The curve \(y = \sqrt{x^3 + 1}\) is convex (bends upwards) for \(0 \le x \le 2\). The trapezium rule gives 3.28 as an estimate of \(\displaystyle\int_0^2 \sqrt{x^3 + 1}\,\mathrm{d}x\).
State, with a reason, whether this is an overestimate or an underestimate.

Show the model answerHide the model answer
Overestimate B1, because the curve bends upwards, so the top edge of each trapezium lies above the curve and each trapezium has a larger area than the strip under the curve B1

Use the estimate in a 'hence' question

2 marksGrade A
  1. Split the new integral into parts you can relate to the one already estimated.
  2. Integrate any constant exactly and multiply the estimate by any constant factor.

Example. Given that \(\displaystyle\int_0^2 \sqrt{x^3 + 1}\,\mathrm{d}x \approx 3.2833\), estimate \(\displaystyle\int_0^2 \left(3 + 2\sqrt{x^3 + 1}\right)\mathrm{d}x\)

Show the model answerHide the model answer
\(\int_0^2 3\,\mathrm{d}x + 2\int_0^2 \sqrt{x^3 + 1}\,\mathrm{d}x \approx 6 + 2 \times 3.2833\)
M1
\(= 12.6\) (3 s.f.)
A1

Find the percentage error

5 marksGrade A
  1. Apply the trapezium rule as usual.
  2. Integrate exactly to find the true value.
  3. Percentage error = difference ÷ exact value × 100, using unrounded values.

Example. (a) Use the trapezium rule with 4 strips to estimate \(\displaystyle\int_1^3 \dfrac{1}{x}\,\mathrm{d}x\), giving your answer to 3 decimal places.
(b) Find the percentage error in your estimate.

Show the model answerHide the model answer
(a) \(h = 0.5\)
\(x\)11.522.53
\(y\)10.66670.50.40.3333
B1
\(\dfrac{1}{2} \times 0.5\)
\(\times \left[1 + 0.3333 + 2(0.6667 + 0.5 + 0.4)\right]\)
M1
\(= 1.117\) (3 d.p.)
A1
(b) The exact value is \(\ln 3 = 1.0986\ldots\), so the percentage error is \(\dfrac{1.1166\ldots - 1.0986\ldots}{1.0986\ldots} \times 100\)
M1
\(= 1.64\%\) (3 s.f.)
A1

Don’t lose marks

  • Using the number of ordinates instead of the number of strips to find \(h\)
  • Doubling the end values, or forgetting to double the middle ones.
  • Missing the \(\dfrac{1}{2}\), i.e. using \(h\) instead of \(\dfrac{1}{2}h\)
  • Saying 'overestimate because the curve is increasing': the reason must be about which way the curve bends.
  • Working in degrees for trigonometric functions in the table.

More tips

Memory tricks

  • 'Ends once, middles twice, times half the strip width.'
  • A convex curve looks like a smile: the tops of the trapezia sit above it, so the rule overestimates. Concave (a frown): underestimate.
  • Count check: 4 strips means 5 values of \(y\)
  • Store table values in the calculator's memory to avoid retyping errors.

Exam technique

  • Write the formula with your numbers substituted before the final value: it earns the method mark.
  • Use all the values in the table unless told otherwise, and give the answer to the accuracy asked.
  • For 'how could the estimate be improved?', say 'use more strips' (a smaller \(h\)); 'use a calculator' earns nothing.
  • If a sketch is given, use its shape to judge over- or underestimate; otherwise find \(\mathrm{f}''(x)\) or reason from a graph you know.

What each grade needs

What you need to be able to do, from the first marks up to the top grade.

  1. Grade E
    Complete a table of valuesSubstitute each \(x\) into the function (radians for trigonometric functions) and round as instructed.
  2. Grade D
    Apply the trapezium rule formula\(\dfrac{1}{2}h\left[(y_0 + y_n) + 2(y_1 + \cdots + y_{n-1})\right]\) with the values from the table.
  3. Grade C
    Find the strip width h\(h = \dfrac{b - a}{n}\) for \(n\) strips; there are \(n + 1\) values of \(y\)
  4. Grade B
    State over- or underestimate with a reasonConvex curve (bending upwards): overestimate. Concave curve (bending downwards): underestimate.
  5. Grade B
    Explain how to improve the estimateUse more strips (a smaller \(h\)), so the trapezia fit the curve more closely.
  6. Grade A
    Use the estimate for a related integralFor example \(\int_a^b (k + \mathrm{f}(x))\,\mathrm{d}x = k(b - a) + \int_a^b \mathrm{f}(x)\,\mathrm{d}x\)
  7. Grade A
    Compare an estimate with the exact valuePercentage error \(= \dfrac{|\text{estimate} - \text{exact}|}{\text{exact}} \times 100\%\)

Sample questions

Written for this site in the style of Edexcel exam questions. They are not taken from real past papers.

Question 1Easy5 marks
The table below shows corresponding values of \(x\) and \(y\) for \(y = x\ln x\). The values of \(y\) are given to 4 decimal places.
\(x\)22.42.83.23.64
\(y\)1.38633.72214.61145.5452
(a) Complete the table by giving the missing values of \(y\) to 4 decimal places.
[2]
(b) Use the trapezium rule, with all the values of \(y\) in the completed table, to find an estimate for \(\int_{2}^{4} x\ln x \, \mathrm{d}x\), giving your answer to 3 decimal places.
[3]
Show the answer and mark scheme
(a) Answer: \(x = 2.4: \ y = 2.1011\), \(x = 2.8: \ y = 2.8829\)
  • B1 for \(2.1011\)
  • B1 for \(2.8829\)

Worked solution: When \(x = 2.4\): \(y = 2.4\ln 2.4 = 2.101125\ldots = 2.1011\).
When \(x = 2.8\): \(y = 2.8\ln 2.8 = 2.882934\ldots = 2.8829\).

(b) Answer: \(6.713\)
  • B1 for the strip width \(h = 0.4\) (or \(\frac{1}{2} \times 0.4\) seen)
  • M1 for the correct bracket structure \(\left[y_0 + y_{5} + 2(y_1 + \cdots + y_{4})\right]\) with their values
  • A1 for awrt \(6.713\)

Worked solution: There are 5 strips of width \(h = 0.4\):
\(\frac{1}{2} \times 0.4 \times \left[1.3863 + 5.5452 + 2(2.1011 + 2.8829 + 3.7221 + 4.6114)\right] = 6.7133 = 6.713\) (3 d.p.).

Question 2Medium8 marks
(a) Use the trapezium rule with 4 strips of equal width to find an estimate for \(\displaystyle\int_{1}^{3} \ln x\,\mathrm{d}x\), giving your answer to 4 decimal places.
[3]
(b) Explain, with reference to the shape of the curve \(y = \ln x\), whether your answer to part (a) is an overestimate or an underestimate.
[2]
(c) Use integration by parts to find the exact value of \(\displaystyle\int_{1}^{3} \ln x\,\mathrm{d}x\), and hence find the percentage error in the estimate from part (a).
[3]
Show the answer and mark scheme
(a) Answer: 1.2821
  • B1 for \(h = 0.5\) and the ordinates \(0, 0.4055, 0.6931, 0.9163, 1.0986\)
  • M1 for \(\frac{0.5}{2}\left[0 + 1.0986 + 2(0.4055 + 0.6931 + 0.9163)\right]\)
  • A1 for 1.2821

Worked solution: \(h = 0.5\). Ordinates: \(\ln 1 = 0\), \(\ln 1.5 = 0.405465\), \(\ln 2 = 0.693147\), \(\ln 2.5 = 0.916291\), \(\ln 3 = 1.098612\).
Estimate \(= \frac{0.5}{2}\left[0 + 1.098612 + 2(2.014903)\right] = 0.25 \times 5.128418 = 1.2821\)⁠.

(b) Answer: \(\frac{\mathrm{d}^2y}{\mathrm{d}x^2} = -\frac{1}{x^2} \lt 0\), so the curve is concave; the tops of the trapezia (chords) lie below the curve, so it is an underestimate.
  • M1 for \(\frac{\mathrm{d}^2y}{\mathrm{d}x^2} = -\frac{1}{x^2} \lt 0\), so the curve is concave (or a sketch showing the chords below the curve)
  • A1 for the chords lie below the curve, so the trapezium rule gives an underestimate

Worked solution: \(y = \ln x\) has \(\frac{\mathrm{d}^2y}{\mathrm{d}x^2} = -\frac{1}{x^2} \lt 0\), so the curve is concave. The straight tops of the trapezia (chords) lie below the curve, so each trapezium’s area is less than the area under the curve: the estimate is an underestimate.

(c) Answer: \(3\ln 3 - 2\); percentage error 1.06%
  • M1 for \(\int \ln x\,\mathrm{d}x = x\ln x - \int x \times \frac{1}{x}\,\mathrm{d}x = x\ln x - x\)
  • A1 for \(3\ln 3 - 2\)
  • A1 for awrt 1.06%

Worked solution: \(\int \ln x\,\mathrm{d}x = x\ln x - x + c\), so \(\int_{1}^{3} \ln x\,\mathrm{d}x = (3\ln 3 - 3) - (0 - 1) = 3\ln 3 - 2 = 1.29584\ldots\)⁠.
Percentage error \(= \dfrac{1.29584 - 1.28210}{1.29584} \times 100 = 1.06\%\)⁠.

Question 3Hard8 marks
The region \(R\) is bounded by the curve \(y = \sqrt{3x + 1}\), the \(x\)-axis and the lines \(x = 5\) and \(x = 16\).
(a) Use the trapezium rule with 5 strips of equal width to find an estimate for \(\int_{5}^{16} \sqrt{3x + 1} \, \mathrm{d}x\), giving your answer to 3 significant figures.
[4]
(b) By considering \(\frac{\mathrm{d}^{2}y}{\mathrm{d}x^{2}}\), determine whether your answer to part (a) is an overestimate or an underestimate of the area of \(R\). Justify your answer.
[4]
Show the answer and mark scheme
(a) Answer: \(61.9\)
  • B1 for the 6 values of \(y\), \(4.0000, 4.7539, 5.4037, 5.9833, 6.5115, 7.0000\)
  • B1 for the strip width \(h = 2.2\) (or \(\frac{1}{2} \times 2.2\) seen)
  • M1 for the correct bracket structure \(\left[y_0 + y_{5} + 2(y_1 + \cdots + y_{4})\right]\) with their values
  • A1 for awrt \(61.9\)

Worked solution: \(h = 2.2\). The values of \(y\) are \(4.0000, 4.7539, 5.4037, 5.9833, 6.5115, 7.0000\)⁠.
\(\frac{1}{2} \times 2.2 \times \left[4.0000 + 7.0000 + 2(4.7539 + 5.4037 + 5.9833 + 6.5115)\right] = 61.93528 = 61.9\) (3 s.f.).

(b) Answer: Underestimate
  • M1 for differentiating once: \(\frac{\mathrm{d}y}{\mathrm{d}x} = \frac{3}{2\sqrt{3x + 1}}\)
  • A1 for \(\frac{\mathrm{d}^{2}y}{\mathrm{d}x^{2}} = -\frac{9}{4(3x + 1)^{\tfrac{3}{2}}}\) oe
  • M1 for considering the sign of \(\frac{\mathrm{d}^{2}y}{\mathrm{d}x^{2}}\) for \(5 \le x \le 16\)
  • A1 for concluding concave, so an underestimate, with a reason (the tops of the trapezia lie below the curve)

Worked solution: \(\frac{\mathrm{d}y}{\mathrm{d}x} = \frac{3}{2\sqrt{3x + 1}}\) and \(\frac{\mathrm{d}^{2}y}{\mathrm{d}x^{2}} = -\frac{9}{4(3x + 1)^{\tfrac{3}{2}}}\), which is negative wherever it is defined.
So the curve is concave for \(5 \le x \le 16\), the straight tops of the trapezia lie below the curve, and the trapezium rule gives an underestimate.

More in Numerical methods

Stuck? Get 1-to-1 help.

Chhetri Academy tutors GCSE and A level Maths and Science online, with a free 30-minute trial lesson.