Lesson 6 of 8 · 17 min

The trapezoidal rule

Approximate a definite integral or an area with trapezia, from a function or a table of measurements, and judge whether the estimate is too big or too small.

What you will be able to do

  • Apply the trapezoidal rule with nn strips of width w=b−anw = \frac{b - a}{n}.
  • Use the rule on a table of measured values as well as on a formula.
  • Decide whether the trapezoidal rule overestimates or underestimates from the concavity of the curve.
  • Use technology to carry out the rule and compare it with the exact value.

The fundamental theorem needs an antiderivative. Sometimes you do not have one: no function you know differentiates to ex2e^{x^2} or 1+x3\sqrt{1 + x^3}. And sometimes you have no formula at all, only measurements, like the depth of a creek every 2 metres. Then you estimate.

Rectangles have flat tops, so they always miss the slope of the curve. Join the points on the curve with straight lines instead, and each strip becomes a trapezium that hugs the curve much more closely.

Interactive

Trapezia under y = 1/x

With 4 strips the trapezia already come within 0.020.02 of ln⁡(3)\ln(3). The tops of the trapezia sit just above the curve, because it bends upwards.

Each strip is a trapezium with parallel sides f(xi−1)f(x_{i-1}) and f(xi)f(x_i) and width ww, so its area is w2(f(xi−1)+f(xi))\frac{w}{2}\big(f(x_{i-1}) + f(x_i)\big). Add them up. Every inside value x1,…,xn−1x_1, \ldots, x_{n-1} is shared by two neighbouring trapezia, so it appears twice; only the two ends appear once.

Key idea

The trapezoidal rule

With nn strips of equal width w=b−anw = \frac{b - a}{n} and xi=a+iwx_i = a + iw,

∫abf(x) dx≈w2[f(x0)+2(f(x1)+f(x2)+⋯+f(xn−1))+f(xn)]\int_a^b f(x)\,dx \approx \frac{w}{2}\Big[f(x_0) + 2\big(f(x_1) + f(x_2) + \cdots + f(x_{n-1})\big) + f(x_n)\Big]

Ends once, middles twice. nn strips use n+1n + 1 values. This is on the formula sheet.

Worked example

Trapezoidal estimate of ∫131x dx\int_1^3 \frac{1}{x}\,dx

  • Simple familiar
  • Technology free

Use the trapezoidal rule with 4 strips to estimate ∫131x dx\int_1^3 \frac{1}{x}\,dx. Compare your estimate with the exact value, ln⁡(3)≈1.0986\ln(3) \approx 1.0986, and explain why it is too big.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Find ww and list x0x_0 to xnx_n.

  2. Tabulate ff.

  3. Substitute: ends once, middles twice, times w2\frac{w}{2}.

  4. Use concavity to explain over or under.

Watch out for

  • Using w2=0.5\frac{w}{2} = 0.5 instead of 0.250.25.

  • Doubling the end values too.

Use the trapezoidal rule with 2 strips to estimate ∫02x3 dx\int_0^2 x^3\,dx.

A function ff has the values in the table. Use the trapezoidal rule with 4 strips to estimate ∫08f(x) dx\int_0^8 f(x)\,dx.

xx02468
f(x)f(x)35642

Key idea

Over or under?

The top of each trapezium is a chord of the curve.

  • If the curve is concave up (bending upwards, f′′(x)>0f''(x) > 0), chords lie above it, so the rule overestimates.
  • If the curve is concave down (f′′(x)<0f''(x) < 0), chords lie below it, so the rule underestimates.

More strips always help: the error shrinks roughly by a factor of 4 each time you double nn.

The trapezoidal rule is used to estimate ∫19x dx\int_1^9 \sqrt{x}\,dx. Which statement is true?

Choose one answer

Worked example

Cross-section of a creek

  • Complex unfamiliar

A hydrologist measures the depth of a creek every 2 m across its 12 m width.

Distance from left bank (m)024681012
Depth (m)01.22.02.41.81.00

(a) Use the trapezoidal rule to estimate the area of the creek's cross-section.

(b) The water flows at an average speed of 0.5 m s−10.5\ \mathrm{m\,s^{-1}}. Estimate the volume of water that passes the measuring line each second.

(c) Is your answer to (a) likely to be an overestimate or an underestimate? Justify your answer.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Count strips as measurements minus one.

  2. Apply the rule exactly as for a function.

  3. Use the pattern in the data to judge concavity.

Watch out for

  • Taking n=7n = 7 because there are 7 measurements.

  • Saying "overestimate" because the creek is "curved", without saying which way it bends.

Without technology

Choose numbers that are easy to evaluate, set out a table of xix_i and f(xi)f(x_i), and leave the answer as a fraction or a short decimal.

With technology

Store ff in the calculator, generate the list of f(xi)f(x_i) with a table or sequence command, and let it do the sum. You can also evaluate the exact integral with the integral tool to measure the error.

Common mistake

Count the strips, not the points

nn is the number of strips. Four strips need five values, x0x_0 to x4x_4. And ww is the width of one strip: b−an\frac{b - a}{n}, not b−an+1\frac{b - a}{n + 1}.

Summary

  • The trapezoidal rule replaces the curve on each strip with a chord.

  • ∫abf(x) dx≈w2[f(x0)+2(f(x1)+⋯+f(xn−1))+f(xn)]\int_a^b f(x)\,dx \approx \frac{w}{2}\big[f(x_0) + 2(f(x_1) + \cdots + f(x_{n-1})) + f(x_n)\big], w=b−anw = \frac{b - a}{n}.

  • Ends once, middles twice; nn strips need n+1n + 1 values.

  • Concave up: overestimate. Concave down: underestimate.

  • It works on tables of measurements as well as on formulas.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 6 of 80% read

Save your progress with a free account