5.8 · SLPaper 1Paper 2

Trapezoidal rule

In a minute

The estimates the area under a curve. It splits the area into strips of equal width and treats each strip as a trapezoid with a straight top. It works from a table of measurements or from a function, and when the curve bends the same way throughout, its shape tells you whether the estimate is too big or too small.

You'll be able to

  • Estimate an area with the trapezoidal rule from a table of values at equal intervals, counting the intervals correctly.
  • Use the trapezoidal rule when the curve is given as a function, finding its values on your GDC.
  • Interpret a trapezoidal estimate in context, with units, including a total found from a rate.
  • Explain from the shape of the curve whether an estimate is too big or too small, and find its against the .
  • Find the and of an estimate made from rounded measurements.
Before you start2 quick questions on what this builds on
Check yourself
Use your GDC to find the area between the curve y=0.5x2+3y = 0.5x^{2} + 3, the xx-axis and the lines x=1x = 1 and x=4x = 4. Give your answer to 3 s.f.
Check yourself
An estimate of a quantity is 6363, and its exact value is 60.860.8. Find the percentage error of the estimate. Give your answer to 3 s.f.

Revise first: 1.6 Rounding, bounds and percentage error and 5.5 Antidifferentiation, definite integrals and area

The trapezoidal rule

Often you need an area under a curve but have only measurements, such as a width every few metres. The trapezoidal rule turns a table like this into an estimate.

Join each pair of neighbouring points with a straight line. The region splits into vertical strips of equal width hh. Each strip is a trapezoid (also called a trapezium): two parallel vertical sides and a straight top.

x y y0 y1 y2 y3 y4 a b h curve
Four strips of width hh use five heights, y0y_{0} to y4y_{4}. The straight tops follow the curve closely.

A trapezoid whose parallel sides pp and qq are a distance hh apart has area 12(p+q)h\frac{1}{2}(p + q)h. This is in the prior-learning section of the formula booklet.

Now add the strips. The first uses heights y0y_{0} and y1y_{1}, the second y1y_{1} and y2y_{2}, and so on. Each inside height is a side of two strips, so it is counted twice. The two end heights belong to one strip each.

In the formula booklet
∫aby dx≈12h((y0+yn)+2(y1+y2+⋯+yn−1)),where h=b−an\int_{a}^{b} y\,\mathrm{d}x \approx \frac{1}{2}h\left((y_{0} + y_{n}) + 2(y_{1} + y_{2} + \dots + y_{n-1})\right),\quad \text{where } h = \frac{b - a}{n}

Here y0,y1,…,yny_{0}, y_{1}, \dots, y_{n} are the heights at equally spaced xx-values from aa to bb. With nn intervals there are n+1n + 1 heights. The rule is in the formula booklet: your job is to count nn, find hh and substitute correctly.

Adding the areas of the separate trapezoids one by one gives exactly the same total. The formula is just faster.

Worked exampleA flower bed lies between a straight wall and a curved path. Its width, yy metres, is measured every 2.52.5 m along the wall, at distance xx metres from one end. x02.557.510y4.25.15.64.83.7\begin{array}{c|ccccc} x & 0 & 2.5 & 5 & 7.5 & 10 \\ \hline y & 4.2 & 5.1 & 5.6 & 4.8 & 3.7 \end{array} Use the trapezoidal rule to estimate the area of the flower bed. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. Count the intervals: 55 values give n=4n = 4 intervals, so h=10−04=2.5h = \frac{10 - 0}{4} = 2.5.
Check yourself
A table gives the depth of a canal at 99 equally spaced points across it, from x=0x = 0 to x=12x = 12 metres. For the trapezoidal rule, what are nn and hh?

The rule estimates any definite integral, not only a geometric area. If yy is a rate, the area under its graph is a total change (5.5). Its units are the rate's units times the xx-units.

Worked exampleA solar panel's power output, PP kilowatts (kW), is recorded every 22 hours, tt hours after 06:00. t024681012P01.83.94.63.51.60.2\begin{array}{c|ccccccc} t & 0 & 2 & 4 & 6 & 8 & 10 & 12 \\ \hline P & 0 & 1.8 & 3.9 & 4.6 & 3.5 & 1.6 & 0.2 \end{array} The energy produced, EE kilowatt hours (kWh), is the area under the graph of PP against tt. Use the trapezoidal rule to estimate EE from 06:00 to 18:00, and interpret your answer.

Try it first, then reveal one step at a time.

  1. 77 values give n=6n = 6 intervals, and h=12−06=2h = \frac{12 - 0}{6} = 2.
Check yourself
A car's speed, vv m s⁻¹, is recorded every 44 seconds as it pulls away. t0481216v06.511.214.015.3\begin{array}{c|ccccc} t & 0 & 4 & 8 & 12 & 16 \\ \hline v & 0 & 6.5 & 11.2 & 14.0 & 15.3 \end{array} The distance travelled is the area under the speed–time graph. Use the trapezoidal rule to estimate the distance, in metres, travelled in the 1616 seconds. Give your answer to 3 s.f.

Estimating from a function

When the curve is a function y=f(x)y = f(x), work out the heights yourself: y0=f(a)y_{0} = f(a), y1=f(a+h)y_{1} = f(a + h), y2=f(a+2h)y_{2} = f(a + 2h), and so on, up to yn=f(b)y_{n} = f(b). Then the rule is the same.

A table of values on your GDC, starting at aa with step hh, lists the heights for you. Keep their full values and round only the final estimate.

Worked exampleThe top edge of a glass wall is modelled by y=6+1.5x−0.25x2y = 6 + 1.5x - 0.25x^{2}, for 0≤x≤80 \le x \le 8, where xx and yy are in metres and the ground is the xx-axis. Estimate the area of glass with the trapezoidal rule, using four intervals.

Try it first, then reveal one step at a time.

  1. h=8−04=2h = \frac{8 - 0}{4} = 2, so the xx-values are 0,2,4,6,80, 2, 4, 6, 8.
Check yourself
Estimate the area under y=0.4x2+3y = 0.4x^{2} + 3 from x=0x = 0 to x=3x = 3 with the trapezoidal rule, using three intervals.

If you know the function, your GDC can also find the exact (5.5). Questions often ask for both, to judge the estimate.

Worked exampleA car's speed is modelled by v(t)=25(1−0.8t)v(t) = 25(1 - 0.8^{t}) m s⁻¹, for 0≤t≤100 \le t \le 10 seconds. The distance travelled is ∫010v dt\int_{0}^{10} v\,\mathrm{d}t. Use the trapezoidal rule with five intervals to estimate the distance travelled in the first 1010 seconds. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. h=10−05=2h = \frac{10 - 0}{5} = 2, so you need vv at t=0,2,4,6,8,10t = 0, 2, 4, 6, 8, 10.
Check yourself
Water flows from a pipe at a rate of r(t)=12×1.2tr(t) = 12 \times 1.2^{t} litres per minute, for 0≤t≤60 \le t \le 6 minutes. Estimate the volume of water, in litres, that flows in the 66 minutes, with the trapezoidal rule and n=3n = 3 strips. Give your answer to 3 s.f.

How good is the estimate?

Each trapezoid has a straight top, but the curve bends. The thin gap between them is that strip's error.

curve bends upwards overestimate curve bends downwards underestimate
The dark gap is the error in one strip. It is counted when the curve bends upwards and missed when it bends downwards.

If the curve bends upwards in some places and downwards in others, the errors partly cancel. Then the shape alone can't tell you which way the estimate is out: compare it with the definite integral instead. For a straight line the estimate is exact.

Worked exampleThe curved side of a skateboard ramp is modelled by y=0.3x2+0.4y = 0.3x^{2} + 0.4, for 0≤x≤30 \le x \le 3, in metres. Lena estimates the area of the side with the trapezoidal rule and six intervals, and gets 3.943.94 m². Without finding the exact area, explain whether her estimate is an overestimate or an underestimate.

Try it first, then reveal one step at a time.

  1. Look at the shape: y=0.3x2+0.4y = 0.3x^{2} + 0.4 is a parabola that opens upwards, so it bends upwards (is concave up) across the whole of 0≤x≤30 \le x \le 3.
Check yourself
A curve lies above the xx-axis and bends downwards across the whole interval 0≤x≤50 \le x \le 5. How does the trapezoidal estimate of the area under it compare with the true area?

When you can also find the exact value, ∫aby dx\int_{a}^{b} y\,\mathrm{d}x on your GDC, measure the estimate's accuracy with the from 1.6. The estimate is vAv_{A} and the exact integral is vEv_{E}.

In the formula booklet
ε=∣vA−vEvE∣×100%\varepsilon = \left|\frac{v_{A} - v_{E}}{v_{E}}\right| \times 100\%
Worked exampleFor the car with speed v(t)=25(1−0.8t)v(t) = 25(1 - 0.8^{t}) m s⁻¹, the trapezoidal estimate of the distance in the first 1010 seconds was 148.339…148.339\ldots m. (a) Explain why this is an underestimate. (b) Use your GDC to find the exact distance, and hence the percentage error of the estimate. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. (a) The speed rises more and more slowly, so the graph of vv bends downwards across the whole interval. Each straight top lies below the curve, so each strip misses some area.
Check yourself
The glass wall y=6+1.5x−0.25x2y = 6 + 1.5x - 0.25x^{2}, 0≤x≤80 \le x \le 8, had a trapezoidal estimate of 5252 m². Use your GDC to find the exact area, then the percentage error of the estimate. Give your answer to 3 s.f.

More intervals usually give a closer estimate, because shorter straight tops follow the curve more closely.

Measurements in a table are usually rounded. Take the xx-values, and so hh, as exact: each height then lies between its and (1.6). Every height in the rule is multiplied by a positive number. So putting in all the upper bounds gives the upper bound of the estimate, and all the lower bounds give its lower bound.

Worked exampleThe widths of the flower bed, 4.2,5.1,5.6,4.8,3.74.2, 5.1, 5.6, 4.8, 3.7 m at x=0,2.5,5,7.5,10x = 0, 2.5, 5, 7.5, 10, were each measured to the nearest 0.10.1 m. Find the upper bound of the trapezoidal estimate of its area. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. Each width is rounded to the nearest 0.10.1 m, so its upper bound is 0.050.05 m more: 4.25,5.15,5.65,4.85,3.754.25, 5.15, 5.65, 4.85, 3.75.
Check yourself
The depth of a stream, measured to the nearest 0.10.1 m every 0.50.5 m across it, is 0.7,1.1,1.6,1.5,0.90.7, 1.1, 1.6, 1.5, 0.9 m. Find the upper bound of the trapezoidal estimate of the stream's cross-sectional area, in m². Give your answer to 3 s.f.

Common mistakes

  • Counting values instead of intervals. Six values give n=5n = 5, so h=b−a5h = \frac{b - a}{5}.
  • Doubling the end values, or forgetting to double the inside ones. Only y0y_{0} and yny_{n} appear once.
  • Leaving out the 12\frac{1}{2}, or putting the xx-values into the rule instead of the heights.
  • Rounding each height before adding. Keep full GDC values and round only the final estimate.
  • Dividing by the estimate in a percentage error. Divide by the exact value.
  • Explaining "overestimate" only with a number from a later part. Describe the curve's shape and where the straight tops lie.

Exam tips

  • "Use the trapezoidal rule": write the rule with hh and every value substituted, then the answer. The substitution earns the method mark.
  • "Explain" an over- or underestimate: say how the curve bends and whether the straight tops lie above or below it.
  • "Write down the integral" for the exact area: the limits, the function and dx\mathrm{d}x. Then evaluate it on your GDC and give the answer to 3 s.f.
  • Give units: m² for an area, and the rate's units times the xx-units for a total, such as kW × hours = kWh.

Key takeaways

In booklet∫aby dx≈12h((y0+yn)+2(y1+y2+⋯+yn−1)),where h=b−an\int_{a}^{b} y\,\mathrm{d}x \approx \frac{1}{2}h\left((y_{0} + y_{n}) + 2(y_{1} + y_{2} + \dots + y_{n-1})\right),\quad \text{where } h = \frac{b - a}{n}
Learn thisnn intervals of equal width use n+1n + 1 values, and h=b−anh = \frac{b - a}{n}. The end values y0y_{0} and yny_{n} count once; every other value counts twice.
Learn thisFor y≥0y \ge 0 the rule estimates the area under the curve. For a rate, it estimates the total change, in the rate's units times the xx-units.
Learn thisIf the curve bends upwards (concave up) across the whole interval, the trapezoidal rule overestimates ∫aby dx\int_{a}^{b} y\,\mathrm{d}x. If it bends downwards (concave down) across the whole interval, it underestimates. If the bending changes, the shape alone can't tell you.
Learn thisPercentage error of a trapezoidal estimate: ∣estimate−exactexact∣×100%\left|\frac{\text{estimate} - \text{exact}}{\text{exact}}\right| \times 100\%, where the exact value is the definite integral from your GDC.
Learn thisIf every height is rounded and the xx-values are exact, using all the upper bounds gives the upper bound of the trapezoidal estimate, and all the lower bounds its lower bound.

Practise this

10 past-paper questions on Trapezoidal rule in the AI HL bank, each with a mark scheme and a worked explanation.

Practise Trapezoidal rule →