Skip to main content

The trapezoidal rule for approximating integrals (TCE Mathematics Methods, Tasmania)

Syllabus dot point

“Use the trapezoidal rule to approximate definite integrals and areas under curves.”

8 min read

Quick answer

The trapezoidal rule estimates a definite integral by slicing the region into strips of equal width hh and treating each strip as a trapezium. With ordinates y0,y1,…,yny_0, y_1, \dots, y_n the estimate is h2[y0+yn+2(y1+⋯+yn−1)]\dfrac{h}{2}\big[y_0 + y_n + 2(y_1 + \dots + y_{n-1})\big], useful when there is no neat antiderivative or only data points are given.

What this dot point is asking

Sometimes you cannot integrate a function exactly, or you are only handed measurements at intervals rather than a formula. The trapezoidal rule gives a numerical estimate of the area under the curve in these situations.

The idea

Divide the interval from x=ax=a to x=bx=b into nn strips of equal width h=b−anh = \dfrac{b-a}{n}. Instead of finding the exact area of each strip, approximate it by a trapezium whose parallel sides are the two ordinates (function values) at the edges of the strip. Adding the areas of all the trapezia gives the estimate.

The trapezoidal rule

∫abf(x) dx≈h2[y0+yn+2(y1+y2+⋯+yn−1)]\int_a^b f(x)\,dx \approx \frac{h}{2}\Big[y_0 + y_n + 2\big(y_1 + y_2 + \dots + y_{n-1}\big)\Big]

where h=b−anh = \dfrac{b-a}{n} and yi=f(a+ih)y_i = f(a + ih) are the n+1n+1 ordinates.

The pattern is easy to remember: the first and last ordinates count once, and every interior ordinate counts twice, all multiplied by half the strip width.

Number of ordinates versus number of strips

With nn strips you have n+1n+1 ordinates, from y0y_0 to yny_n. A frequent setup error is using the wrong count. If a question gives you a table with 55 values, you have 44 strips, so n=4n=4 and hh is one quarter of the total width.

Worked example

Estimating an integral with four strips

Use the trapezoidal rule with four strips to estimate ∫021+x2 dx\displaystyle\int_0^2 \sqrt{1+x^2}\,dx.

Step 1: Find the strip width and the xx-values

With a=0a = 0, b=2b = 2 and n=4n = 4 strips, divide the total width by the number of strips to get hh. The five xx-values (one more than the number of strips) are spaced hh apart:

h=2−04=0.5,x=0, 0.5, 1, 1.5, 2.h = \frac{2 - 0}{4} = 0.5, \qquad x = 0,\ 0.5,\ 1,\ 1.5,\ 2.

Step 2: Compute the five ordinates

Evaluate f(x)=1+x2f(x) = \sqrt{1 + x^2} at each xx-value. These are the heights of the trapezium sides:

y0=1=1,y1=1.25≈1.1180,y2=2≈1.4142,y3=3.25≈1.8028,y4=5≈2.2361.y_0 = \sqrt{1} = 1, \quad y_1 = \sqrt{1.25} \approx 1.1180, \quad y_2 = \sqrt{2} \approx 1.4142, \quad y_3 = \sqrt{3.25} \approx 1.8028, \quad y_4 = \sqrt{5} \approx 2.2361.

Step 3: Apply the trapezoidal rule formula

The end ordinates y0y_0 and y4y_4 count once; every interior ordinate counts twice. Multiply the whole bracket by h2\tfrac{h}{2}:

∫021+x2 dx≈0.52[y0+y4+2(y1+y2+y3)]=0.25[1+2.2361+2(1.1180+1.4142+1.8028)].\int_0^2 \sqrt{1+x^2}\,dx \approx \frac{0.5}{2}\big[y_0 + y_4 + 2(y_1 + y_2 + y_3)\big] = 0.25\big[1 + 2.2361 + 2(1.1180 + 1.4142 + 1.8028)\big].

The interior sum is 1.1180+1.4142+1.8028=4.33501.1180 + 1.4142 + 1.8028 = 4.3350, doubled to 8.67008.6700. Adding the end ordinates gives 1+2.2361+8.6700=11.90611 + 2.2361 + 8.6700 = 11.9061, and multiplying by 0.250.25:

∫021+x2 dx≈0.25×11.9061≈2.977.\int_0^2 \sqrt{1+x^2}\,dx \approx 0.25 \times 11.9061 \approx 2.977.

Final answer: The trapezoidal rule estimate is approximately 2.9772.977.

Working from a table of data

Many TASC questions never give you a formula at all: instead you receive measured values, such as a vehicle's speed recorded every few seconds, or the cross-sectional width of a river at equal spacings. The trapezoidal rule is the natural tool here because it only needs the ordinates, not an antiderivative. Read the spacing of the measurements straight off the table to get hh, count the readings to get n+1n+1 ordinates (so nn strips), then apply the rule exactly as before. When the readings are a rate of change (a speed, a flow rate, a rate of production), the area you are estimating is the accumulated total: distance from a speed, volume from a flow rate, and so on. Always state the units of the answer, which are the units of the ordinate multiplied by the units of the horizontal spacing.

Is the estimate too high or too low?

Whether the trapezoidal rule over or underestimates depends on concavity. For a concave up curve the straight tops of the trapezia sit above the curve, so the rule overestimates the true area. For a concave down curve the trapezia tops sit below the curve, so the rule underestimates. Increasing the number of strips reduces the error in either case.

Forgetting to double the interior ordinates

The single most common slip is adding all the ordinates with equal weight. Only the first and last are counted once; every value in between is multiplied by two. Writing the bracket out as y0+yn+2(interior sum)y_0 + y_n + 2(\text{interior sum}) before substituting numbers prevents this error.

Comparing with the exact value

When an antiderivative does exist, you can measure the error of the rule directly. For ∫141x dx\displaystyle\int_{1}^{4}\frac{1}{x}\,dx the exact value is ln⁡4−ln⁡1=ln⁡4≈1.3863\ln 4 - \ln 1 = \ln 4 \approx 1.3863. The three-strip trapezoidal estimate 3524≈1.4583\dfrac{35}{24} \approx 1.4583 overestimates by about 0.0720.072, consistent with 1x\dfrac{1}{x} being concave up on [1,4][1, 4]. Doubling the number of strips to six roughly quarters the error, because the trapezoidal error falls in proportion to h2h^{2}: halving hh divides the error by about four. This relationship is worth quoting when a question asks how to improve an estimate.

Summary

Choose your strip width h=(b−a)/nh = (b-a)/n, list the n+1n+1 ordinates, then combine them as h2\dfrac{h}{2} times the first plus the last plus twice everything in between. The rule shines when no antiderivative exists or when only tabulated data is available. Use concavity to predict whether the estimate is high or low, and add more strips for a sharper result.

Exam-style questions

Questions in the style of TASC exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

Practice4 marks
Calculator-assumed. The speed of a car (in m/s) is recorded every 22 seconds: at t=0,2,4,6,8t = 0, 2, 4, 6, 8 the speeds are 0,7,12,15,160, 7, 12, 15, 16. (a) Use the trapezoidal rule to estimate the distance travelled in the first 88 seconds. (b) State, with a reason, whether the estimate is likely to be an over or under-estimate.
Show worked answer →

(a) Distance is ∫08v dt\displaystyle\int_{0}^{8} v\,dt. There are 55 ordinates, so n=4n = 4 strips and h=2h = 2.

∫08v dt≈h2[y0+y4+2(y1+y2+y3)]=22[0+16+2(7+12+15)].\int_{0}^{8} v\,dt \approx \frac{h}{2}\big[y_{0} + y_{4} + 2(y_{1} + y_{2} + y_{3})\big] = \frac{2}{2}\big[0 + 16 + 2(7 + 12 + 15)\big].

The interior sum is 7+12+15=347 + 12 + 15 = 34, doubled to 6868. Total bracket =0+16+68=84= 0 + 16 + 68 = 84, times 11, so the distance is approximately 8484 m.

(b) The speed values rise but level off, so the curve is concave down. For a concave-down curve the trapezia tops sit below the curve, so the rule under-estimates the true distance. One mark for hh and the setup, two for the value, one for the justified over/under reason.

Practice3 marks
Calculator-free. Use the trapezoidal rule with three strips to estimate ∫141x dx\displaystyle\int_{1}^{4} \dfrac{1}{x}\,dx, giving your answer as an exact fraction.
Show worked answer →

With a=1a = 1, b=4b = 4 and n=3n = 3, the strip width is h=4−13=1h = \dfrac{4 - 1}{3} = 1. The ordinates of f(x)=1xf(x) = \dfrac{1}{x} at x=1,2,3,4x = 1, 2, 3, 4 are 1,12,13,141, \dfrac{1}{2}, \dfrac{1}{3}, \dfrac{1}{4}.

∫141x dx≈12[1+14+2(12+13)]=12[54+2⋅56]=12[54+53].\int_{1}^{4}\frac{1}{x}\,dx \approx \frac{1}{2}\left[1 + \frac{1}{4} + 2\left(\frac{1}{2} + \frac{1}{3}\right)\right] = \frac{1}{2}\left[\frac{5}{4} + 2\cdot\frac{5}{6}\right] = \frac{1}{2}\left[\frac{5}{4} + \frac{5}{3}\right].

Common denominator: 54+53=15+2012=3512\dfrac{5}{4} + \dfrac{5}{3} = \dfrac{15 + 20}{12} = \dfrac{35}{12}, so the estimate is 12×3512=3524\dfrac{1}{2}\times\dfrac{35}{12} = \dfrac{35}{24}. Marks for hh, the weighted bracket, and the exact fraction.

Practise this

Sources & how we know this

ExamExplained