Many functions β $\sqrt{1 + x^3}$, $\mathrm{e}^{x^2}$, $\dfrac{\sin x}{x}$ β cannot be integrated using the standard techniques. And in practical work you often have only a table of measured values, not a formula at all. The trapezium rule estimates $\displaystyle\int_a^b y\,\mathrm{d}x$ in either situation.
Adding the $n$ trapezia, every inner ordinate is used twice (once by the strip on each side) and the two end ordinates once:
- Find the strip width $h = \dfrac{b - a}{n}$.
- Make a table of $x$-values $a, a + h, \ldots, b$ and the corresponding $y$-values (to at least $4$ or $5$ decimal places).
- Substitute into the formula: ends once, middles twice, multiply by $\frac{h}{2}$.
- Round the final answer only, to the accuracy asked for.
Use the trapezium rule with $4$ strips to estimate $\displaystyle\int_1^3 \ln x\,\mathrm{d}x$, giving your answer to $3$ significant figures.
| $x$ | $1$ | $1.5$ | $2$ | $2.5$ | $3$ |
|---|---|---|---|---|---|
| $y = \ln x$ | $0$ | $0.40547$ | $0.69315$ | $0.91629$ | $1.09861$ |
Estimate $\displaystyle\int_0^2 \sqrt{1 + x^3}\,\mathrm{d}x$ using $5$ ordinates.
| $x$ | $0$ | $0.5$ | $1$ | $1.5$ | $2$ |
|---|---|---|---|---|---|
| $y$ | $1$ | $1.06066$ | $1.41421$ | $2.09165$ | $3$ |
Given that $\displaystyle\int_0^1 \frac{1}{1 + x^2}\,\mathrm{d}x = \frac{\pi}{4}$, use the trapezium rule with $4$ strips to estimate $\pi$.
| $x$ | $0$ | $0.25$ | $0.5$ | $0.75$ | $1$ |
|---|---|---|---|---|---|
| $y$ | $1$ | $0.94118$ | $0.8$ | $0.64$ | $0.5$ |
The tops of the trapezia are chords of the curve. Whether a chord lies above or below the curve depends on the curve's concavity β see Concavity and Points of Inflection.
| Shape of curve for $a \leqslant x \leqslant b$ | Second derivative | Chords lie⦠| Trapezium rule gives |
|---|---|---|---|
| Convex (bends upwards, βͺ) | $\mathrm{f}''(x) > 0$ | above the curve | an overestimate |
| Concave (bends downwards, β©) | $\mathrm{f}''(x) < 0$ | below the curve | an underestimate |
Use $4$ strips to estimate $\displaystyle\int_0^2 \mathrm{e}^x\,\mathrm{d}x$. Explain why it is an overestimate, and find the percentage error.
Explain whether the estimate in Worked Example 1 is too big or too small, and compare it with the exact value $3\ln 3 - 2$.
Narrower strips follow the curve more closely, so the estimate improves as $n$ increases. In the limit $n \to \infty$ the trapezium sum becomes the integral β the idea behind integration as the limit of a sum.
Compare the trapezium rule estimates of $\displaystyle\int_1^3 \ln x\,\mathrm{d}x$ with $2$, $4$ and $8$ strips.
| Strips $n$ | $h$ | Estimate | Error (exact $1.29584$) |
|---|---|---|---|
| $2$ | $1$ | $1.24245$ | $-4.12\%$ |
| $4$ | $0.5$ | $1.28211$ | $-1.06\%$ |
| $8$ | $0.25$ | $1.29238$ | $-0.267\%$ |
The area under a velocityβtime graph is distance; the area under a rate graph is a total. When the data come from measurements, the trapezium rule is often the only option.
A cyclist's speed $v$ m s$^{-1}$ is recorded every $5$ seconds:
| $t$ (s) | $0$ | $5$ | $10$ | $15$ | $20$ | $25$ | $30$ |
|---|---|---|---|---|---|---|---|
| $v$ (m s$^{-1}$) | $0$ | $4.2$ | $7.1$ | $8.9$ | $9.6$ | $9.8$ | $10.0$ |
Estimate the distance travelled in the $30$ seconds, and comment on the estimate.
Formula
$\frac{h}{2}\big[y_0 + y_n + 2(y_1 + \cdots + y_{n-1})\big]$
Strip width
$h = \dfrac{b - a}{n}$
Ordinates
$n$ strips $\leftrightarrow$ $n + 1$ ordinates.
Convex
$\mathrm{f}'' > 0$: overestimate.
Concave
$\mathrm{f}'' < 0$: underestimate.
Improve
More, narrower strips. Halving $h$ cuts the error to about a quarter.
Percentage error
$\dfrac{\text{estimate} - \text{exact}}{\text{exact}} \times 100\%$
Context
Area under $v$β$t$ is distance; under a rate graph is a total.
Use the trapezium rule with $4$ strips to estimate $\displaystyle\int_0^2 x^2\,\mathrm{d}x$. Compare with the exact value.
βΆ Show solution
$h = 0.5$; ordinates $0,\ 0.25,\ 1,\ 2.25,\ 4$.
$0.25\big[0 + 4 + 2(0.25 + 1 + 2.25)\big] = 0.25 \times 11 = 2.75$.
Exact: $\left[\tfrac{x^3}{3}\right]_0^2 = \tfrac83 = 2.667$. The estimate is too big, as expected for the convex curve $y = x^2$.
Use $4$ strips to estimate $\displaystyle\int_1^2 \frac{1}{x}\,\mathrm{d}x$ to $4$ d.p. Hence give an estimate of $\ln 2$ and state whether it is too large or too small.
βΆ Show solution
$h = 0.25$; ordinates $1,\ 0.8,\ 0.66667,\ 0.57143,\ 0.5$.
$0.125\big[1 + 0.5 + 2(0.8 + 0.66667 + 0.57143)\big] = 0.125 \times 5.57619 = 0.6970$.
$\displaystyle\int_1^2 \frac1x\,\mathrm{d}x = \ln 2$, so $\ln 2 \approx 0.6970$. Since $\dfrac{\mathrm{d}^2}{\mathrm{d}x^2}\left(\dfrac1x\right) = \dfrac{2}{x^3} > 0$, the curve is convex, so this is too large ($\ln 2 = 0.6931$).
Estimate $\displaystyle\int_0^1 \mathrm{e}^{x^2}\,\mathrm{d}x$ using the trapezium rule with $5$ ordinates, to $3$ d.p.
βΆ Show solution
$5$ ordinates $\Rightarrow 4$ strips, $h = 0.25$.
| $x$ | $0$ | $0.25$ | $0.5$ | $0.75$ | $1$ |
|---|---|---|---|---|---|
| $y$ | $1$ | $1.06449$ | $1.28403$ | $1.75505$ | $2.71828$ |
$0.125\big[1 + 2.71828 + 2(1.06449 + 1.28403 + 1.75505)\big] = 0.125 \times 11.92542 = 1.491$.
Use $4$ strips to estimate $\displaystyle\int_0^2 \sqrt{1 + x^2}\,\mathrm{d}x$. Given that $\mathrm{f}''(x) = (1 + x^2)^{-3/2}$, state whether your answer is an over- or underestimate.
βΆ Show solution
$h = 0.5$; ordinates $1,\ 1.11803,\ 1.41421,\ 1.80278,\ 2.23607$.
$0.25\big[1 + 2.23607 + 2(1.11803 + 1.41421 + 1.80278)\big] = 0.25 \times 11.90611 = 2.977$ (3 d.p.).
$\mathrm{f}''(x) > 0$ for all $x$, so the curve is convex and this is an overestimate. (The true value is $2.958$.)
Use the trapezium rule with $3$ strips to estimate $\displaystyle\int_1^4 \sqrt{x}\,\mathrm{d}x$. Find the exact value and the percentage error.
βΆ Show solution
$h = 1$; ordinates $1,\ \sqrt2,\ \sqrt3,\ 2$.
$\tfrac12\big[1 + 2 + 2(1.41421 + 1.73205)\big] = \tfrac12 \times 9.29253 = 4.64626$.
Exact: $\left[\tfrac23 x^{3/2}\right]_1^4 = \tfrac23(8 - 1) = \tfrac{14}{3} = 4.66667$.
Percentage error $= \dfrac{4.64626 - 4.66667}{4.66667} \times 100 = -0.437\%$ β an underestimate, as $\sqrt x$ is concave.
Use $4$ strips to estimate $\displaystyle\int_0^{\pi} \sin x\,\mathrm{d}x$, giving your answer to $4$ d.p. Explain why the estimate is less than the exact value $2$.
βΆ Show solution
$h = \dfrac{\pi}{4}$; ordinates $0,\ \tfrac{\sqrt2}{2},\ 1,\ \tfrac{\sqrt2}{2},\ 0$.
$\dfrac{\pi}{8}\big[0 + 0 + 2(0.70711 + 1 + 0.70711)\big] = \dfrac{\pi}{8} \times 4.82843 = 1.8961$.
For $0 \leqslant x \leqslant \pi$, $\dfrac{\mathrm{d}^2}{\mathrm{d}x^2}\sin x = -\sin x \leqslant 0$, so the curve is concave and the chords lie below it.
The trapezium rule estimates of $\displaystyle\int_1^3 \ln x\,\mathrm{d}x$ with $2$ and $4$ strips are $1.24245$ and $1.28211$. Without further calculation, predict roughly how far the $8$-strip estimate will be from the exact value $1.29584$, and explain your reasoning.
βΆ Show solution
The errors are $1.29584 - 1.24245 = 0.0534$ and $1.29584 - 1.28211 = 0.0137$. Doubling the strips cut the error to about a quarter ($0.0534 \div 4 \approx 0.013$).
So with $8$ strips expect an error of about $0.0137 \div 4 \approx 0.0034$, i.e. an estimate near $1.2924$. (The actual value is $1.29238$.)
A river is $12$ m wide. Its depth $d$ m is measured every $2$ m across:
| Distance (m) | $0$ | $2$ | $4$ | $6$ | $8$ | $10$ | $12$ |
|---|---|---|---|---|---|---|---|
| Depth (m) | $0$ | $1.1$ | $1.9$ | $2.4$ | $2.2$ | $1.3$ | $0$ |
Estimate the cross-sectional area. Water flows at $0.5$ m s$^{-1}$; estimate the volume of water passing per second.
βΆ Show solution
$6$ strips, $h = 2$: $\;\dfrac{2}{2}\big[0 + 0 + 2(1.1 + 1.9 + 2.4 + 2.2 + 1.3)\big] = 1 \times 17.8 = 17.8$ m$^2$.
Volume per second $\approx 17.8 \times 0.5 = 8.9$ m$^3$ s$^{-1}$.
(A river bed is roughly concave, so this is likely to be a slight underestimate; it also assumes the flow speed is the same everywhere.)
The quarter circle $y = \sqrt{1 - x^2}$, $0 \leqslant x \leqslant 1$, has area $\dfrac{\pi}{4}$. Use $4$ strips to estimate $\pi$, and explain why the estimate is poor.
βΆ Show solution
$h = 0.25$; ordinates $1,\ 0.96825,\ 0.86603,\ 0.66144,\ 0$.
$0.125\big[1 + 0 + 2(0.96825 + 0.86603 + 0.66144)\big] = 0.125 \times 5.99143 = 0.74893$.
$\pi \approx 4 \times 0.74893 = 2.996$ β an error of about $4.6\%$.
The circle is concave, so it is an underestimate. It is poor because the curve becomes vertical as $x \to 1$: the last strip's chord cuts off a large sliver of area. (Compare Worked Example 3, where the same number of strips gave $\pi$ to within $0.4\%$.)
The region $R$ is bounded by $y = x\ln x$, the $x$-axis and the line $x = 3$.
(a) Use the trapezium rule with $4$ strips to estimate the area of $R$, to $4$ d.p.
(b) Show that $\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} > 0$ for $x > 0$ and hence say whether your estimate is too big or too small.
(c) Use integration by parts to show that the exact area is $\tfrac92\ln 3 - 2$.
(d) Find the percentage error in (a).
βΆ Show solution
The curve meets the $x$-axis at $x = 1$ (as $\ln 1 = 0$) and is positive for $x > 1$, so $R$ runs from $x = 1$ to $x = 3$.
(a) $h = 0.5$:
| $x$ | $1$ | $1.5$ | $2$ | $2.5$ | $3$ |
|---|---|---|---|---|---|
| $y$ | $0$ | $0.60820$ | $1.38629$ | $2.29073$ | $3.29584$ |
$0.25\big[0 + 3.29584 + 2(0.60820 + 1.38629 + 2.29073)\big] = 0.25 \times 11.86628 = 2.9666$.
(b) $y' = \ln x + 1$, $y'' = \dfrac1x > 0$ for $x > 0$. Convex, so the estimate is too big.
(c) With $u = \ln x$, $\dfrac{\mathrm{d}v}{\mathrm{d}x} = x$: $\displaystyle\int x\ln x\,\mathrm{d}x = \frac{x^2}{2}\ln x - \int \frac{x}{2}\,\mathrm{d}x = \frac{x^2}{2}\ln x - \frac{x^2}{4}$.
$\left[\dfrac{x^2}{2}\ln x - \dfrac{x^2}{4}\right]_1^3 = \left(\dfrac92\ln 3 - \dfrac94\right) - \left(0 - \dfrac14\right) = \dfrac92\ln 3 - 2 = 2.94376$. (See Integration by Parts.)
(d) $\dfrac{2.96657 - 2.94376}{2.94376} \times 100 = 0.775\%$ (too big, as predicted).