Integration · Lesson 3 of 3

The trapezium rule

Estimate a definite integral from a table of values: strips, ordinates and the rule ½h[first + last + 2(the rest)], and whether the estimate is too big or too small.

14 minYou should already know: Differentiation Calculus (JAMB bridge)
  1. 1
  2. 2
  3. 3

Some integrals are hard or impossible to work out exactly, and exam questions often say “use the trapezium rule” anyway. The rule estimates the area under a curve by splitting it into strips and treating each strip as a trapezium.

The rule

Split the interval from aa to bb into nn equal strips of width h=b−anh = \frac{b - a}{n}. The heights of the curve at the edges of the strips are the ordinates y0,y1,…,yny_0, y_1, \ldots, y_n:

xy₀y₁y₂y₃y₄h
Strips as trapeziumsEach strip is about a trapezium: ½h(yᵢ + yᵢ₊₁)

Adding up the trapeziums, every ordinate except the first and last is shared by two strips, so it is counted twice:

∫aby dx≈h2 [ y0+yn+2(y1+y2+⋯+yn−1) ]\begin{aligned} \int_a^b y\,dx &\approx \frac h2\,[\,y_0 + y_n \\ &\qquad + 2(y_1 + y_2 + \cdots + y_{n - 1})\,] \end{aligned}

Using the rule

Make a table of xx and yy, keep four decimal places, and round only at the end.

Worked example · WAEC 2023

WAEC 2023 · Paper 2 · Q2

Using the trapezium rule with five ordinates, evaluate, correct to two decimal places, ∫0241+x2 dx\displaystyle\int_0^2 \frac{4}{1 + x^2}\,dx.

Approximate value

  1. Strips and width

    • Five ordinates means four strips.
    • h=2−04=0.5{h = \frac{2 - 0}{4} = 0.5}.

    Think first. Five ordinates from 0 to 2. How many strips? What is h?

  2. The ordinates

    • x=0{x = 0}: y0=4{y_0 = 4}.
    • x=0.5{x = 0.5}: y1=41.25=3.2{y_1 = \frac{4}{1.25} = 3.2}.
    • x=1{x = 1}: y2=2{y_2 = 2}.
    • x=1.5{x = 1.5}: y3=43.25=1.2308{y_3 = \frac{4}{3.25} = 1.2308}.
    • x=2{x = 2}: y4=0.8{y_4 = 0.8}.

    Think first. Work out y = 4 ÷ (1 + x²) at x = 0, 0.5, 1, 1.5, 2.

  3. Apply the rule

    • First and last: 4+0.8=4.8{4 + 0.8 = 4.8}.
    • Twice the rest: 2(3.2+2+1.2308)=12.8615{2(3.2 + 2 + 1.2308) = 12.8615}.
    • 0.52(4.8+12.8615)=0.25×17.6615{\frac{0.5}{2}(4.8 + 12.8615) = 0.25 \times 17.6615}.
    • =4.4154{= 4.4154}, to four decimal places.
    • So the integral is about 4.42{4.42}.

Worked example · NECO 2023

NECO 2023 · Paper 2 · Q4

Using the trapezium rule with 7 ordinates x=2.0,2.5,3.0,3.5,4.0,4.5x = 2.0, 2.5, 3.0, 3.5, 4.0, 4.5 and 5.05.0, estimate the value of ∫25(2x+3)2 dx\displaystyle\int_2^5 (2x + 3)^2\,dx.

  1. Strips and width

    • Seven ordinates means six strips, and h=0.5{h = 0.5}.

    Think first. Seven ordinates from 2 to 5. How many strips?

  2. The ordinates

    • (2x+3)2{(2x + 3)^2} at x=2,2.5,…,5{x = 2, 2.5, \ldots, 5}: 49, 64, 81, 100, 121, 144, 169{49,\ 64,\ 81,\ 100,\ 121,\ 144,\ 169}.
  3. Apply the rule

    • First and last: 49+169=218{49 + 169 = 218}.
    • Twice the rest: 2(64+81+100+121+144)=1020{2(64 + 81 + 100 + 121 + 144) = 1020}.
    • 0.52(218+1020)=0.25×1238=309.5{\frac{0.5}{2}(218 + 1020) = 0.25 \times 1238 = 309.5}.

Too big or too small?

Try more strips, and compare the estimate with the exact value:

The trapezium rulePick an integral, change the strips
12246xy
4.75estimate, 4 strips, h = 0.54.6667exact value
5 ordinates: 1, 1.25, 2, 3.25, 5. Estimate = ½ × 0.5 × [1 + 5 + 2 × (6.5)] = 4.75. The curve bends upwards, so each trapezium sits slightly above it: an overestimate.

Each trapezium has a straight top. If the curve bends upwards (like x2x^2), the straight tops lie above it and the rule overestimates; if it bends downwards, the rule underestimates. More strips always bring the estimate closer.

More: the trapezium rule

Your turn

WAEC 2022 · Paper 2 · Q3

  1. (a)

    Using the trapezium rule with five ordinates, evaluate, correct to two decimal places, ∫132x+4 dx\displaystyle\int_1^3 \frac{2}{x + 4}\,dx.

Worked solution (try it first)
  1. Five ordinates means four strips, so h=3−14=0.5h = \dfrac{3 - 1}{4} = 0.5.
  2. The ordinates of 2x+4\dfrac{2}{x + 4} at x=1,1.5,2,2.5,3x = 1, 1.5, 2, 2.5, 3 are 0.4, 0.3636, 0.3333, 0.3077, 0.28570.4,\ 0.3636,\ 0.3333,\ 0.3077,\ 0.2857.
  3. First and last: 0.68570.6857.
  4. Twice the rest: 2(0.3636+0.3333+0.3077)=2.00932(0.3636 + 0.3333 + 0.3077) = 2.0093.
  5. Trapezium rule: 0.52(0.6857+2.0093)=0.25×2.6950\dfrac{0.5}{2}(0.6857 + 2.0093) = 0.25 \times 2.6950
    =0.6738= 0.6738, about 0.670.67.

Report a problem with this question