5.8 Trapezoidal rule

5.8 Trapezoidal rule

IB Maths: Applications and Interpretation SL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • The trapezoidal rule estimates an area by splitting it into strips of equal width hh.
  • A≈h2[y0+yn+2(y1+⋯+yn−1)]A \approx \dfrac h2[y_0 + y_n + 2(y_1 + \dots + y_{n-1})], with nn intervals and n+1n+1 values.
  • For a function on a≤x≤ba \le x \le b, the strip width is h=b−anh = \dfrac{b-a}{n}.
  • Concave up gives an over-estimate; concave down gives an under-estimate.
  • The area under a rate–time graph is the total amount, so state the unit.

Splitting into trapezoids

Strips of equal width are treated as trapezoids, and their areas are added.

The area under a curve (or a graph made from data) is estimated by vertical strips of equal width hh, each treated as a trapezoid.

A strip between y0y_0 and y1y_1 has area h2(y0+y1)\frac h2(y_0 + y_1). Interior values belong to two strips, so they are used twice. The first and last values are used once.

There are nn intervals and n+1n + 1 values.

ABCDPQRS
Three trapezoids of width h = 2 under a graph through the readings 3, 5, 6, 4
  • Areah2[y0+yn+2(y1+⋯+yn−1)]\dfrac h2\left[y_0 + y_n + 2(y_1 + \dots + y_{n-1})\right]

Worked example

Estimate the area using the readings 3, 5, 6, 4 taken at x=0,2,4,6x = 0, 2, 4, 6.

Seven readings are taken at equal spacing. How many intervals are there?

Using a table of data

The readings must be equally spaced; list hh, nn and the values before substituting.

When data is given in a table, the values need equal spacing.

Example: widths 12, 30, 44, 50, 36 and 8 metres measured every 20 m give five intervals with h=20h = 20.

A≈202[12+8+2(30+44+50+36)]=10×340=3400 m2A \approx \frac{20}{2}\left[12 + 8 + 2(30 + 44 + 50 + 36)\right] = 10 \times 340 = 3400\ \text{m}^2

Check units: width (m) times distance (m) gives m². Multiplying by an average depth of 2.5 m gives a volume of 8500 m³.

01020304050020406080100Distance along the lake (m)Width (m)
Width of a lake measured every 20 m along its length

Readings are taken every 20 m and there are 6 readings. What is nn in the trapezoidal rule?

Using a function

Choose nn, work out hh, then find each ordinate from the function.

Given a function, choose nn and find h=b−anh = \dfrac{b - a}{n}. Use your GDC table to find each ordinate.

For R(t)=t2+1R(t) = t^2 + 1 on 0≤t≤40 \le t \le 4 with n=4n = 4, h=1h = 1 and the values are 1,2,5,10,171, 2, 5, 10, 17.

Then A≈12[1+17+2(2+5+10)]=26A \approx \frac12[1 + 17 + 2(2 + 5 + 10)] = 26.

You can use the GDC to generate the table, but show the substitution into the rule.

0.511.522.533.5424681012141618xy1251017R(t) = t² + 1
y = t² + 1 with the five ordinates used for n = 4

Which values are multiplied by 2 in the rule?

Accuracy and percentage error

The sign of the error depends on whether the curve bends up or down.

The exact area is found by integration on your GDC: ∫04(t2+1) dt=25.3\int_0^4 (t^2 + 1)\,dt = 25.3. The estimate 26 is an over-estimate because the curve bends upwards and the chords lie above it.

If the curve bends downwards, as for y=xy = \sqrt{x}, the estimate is an under-estimate.

Percentage error =∣approximate−exact∣∣exact∣×100= \dfrac{|\text{approximate} - \text{exact}|}{|\text{exact}|} \times 100.

More, narrower strips usually reduce the error.

0.511.522.533.540.511.52xy(2, 1.41)(3, 1.73)(4, 2)y = √x
y = √x is concave down, so chords lie below it

Worked example

Find the percentage error when the trapezoidal rule with n=4n = 4 estimates ∫04(t2+1) dt\int_0^4 (t^2 + 1)\,dt.

A curve bends downwards. The trapezoidal rule gives…

Upper and lower bounds

Use the lower bound of every reading for the lower bound of the area, and the upper bounds for the upper bound.

A reading of 4.2 to 1 decimal place lies between 4.15 and 4.25.

For the lower bound of a trapezoidal estimate, use the lower bound of every reading. For the upper bound, use the upper bounds.

For rainfall readings 0.4, 4.2, 9.6, 12.4, 8.8, 3.6, 0.8 (mm per hour, every 0.5 hours) the estimate is 19.6 mm, with lower bound 19.45 mm and upper bound 19.75 mm.

19.419.4519.519.5519.619.6519.719.7519.819.4519.619.75

Worked example

Find the lower bound of the area for the rainfall readings, with h=0.5h = 0.5.

Which readings give the upper bound of the area?

Interpreting the area

The area under a rate–time graph is the total amount.

The area under a rate against time graph is the total amount. A rainfall rate in mm per hour multiplied by hours gives mm of rain. A flow rate in litres per minute multiplied by minutes gives litres.

Always state the unit and what the area represents.

The rule joins readings with straight lines, so the result is an approximation.

Rainfall rate against time

Area represents:
Total rainfall
Unit:
mm

Flow rate against time

Area represents:
Total volume
Unit:
litres

Width against distance

Area represents:
Surface area
Unit:
m²

A graph shows a flow rate in litres per minute against time in minutes. What does the area under it represent?

Try an exam question

The speed of a car, in m s⁻¹, is measured every 2 s: 0, 6, 10, 12, 12 at t=0,2,4,6,8t = 0, 2, 4, 6, 8. Use the trapezoidal rule to estimate the distance travelled in the 8 s.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

How many trapezoids are used when the trapezoidal rule is applied to all the measurements?

1 mark, marked against the mark scheme

Revision notes