AP Calculus AB and BC

Trapezoidal Rule: Sums from Functions and Tables

A trapezoidal sum approximates a definite integral by adding trapezoid areas. Each area is the subinterval width times the average of the function values at its two ends. If the graph is concave up on the whole interval the sum is an overestimate; if it is concave down, the sum is an underestimate.

One trapezoid at a time

A trapezoidal sum estimates ∫abf(x) dx\int_a^b f(x)\,dx by cutting [a,b][a, b] into subintervals and joining the points on the graph with straight segments. Over each subinterval the region under the segment is a trapezoid lying on its side: its two parallel sides are the function values at the two ends, and the distance between them is the width of the subinterval. This is part of Topic 6.2, Approximating Areas with Riemann Sums.

area of one trapezoid=f(xi−1)+f(xi)2⋅Δxi\text{area of one trapezoid} = \frac{f(x_{i-1}) + f(x_i)}{2} \cdot \Delta x_i

Read the formula as average height times width. The trapezoidal sum is the total of these areas across all the subintervals. Everything else in this guide is a faster way to add them up or a way to judge the result.

Link to left and right sums

On the same subintervals, the trapezoidal sum equals the average of the left Riemann sum and the right Riemann sum. If you already have both, add them and divide by 22.

Equal widths: the shortcut formula

When all nn subintervals have the same width Δx=b−an\Delta x = \frac{b - a}{n}, every interior function value belongs to two trapezoids and each endpoint value belongs to one. Factoring out Δx2\frac{\Delta x}{2} gives the compact form:

Tn=Δx2[f(x0)+2f(x1)+2f(x2)+⋯+2f(xn−1)+f(xn)]T_n = \frac{\Delta x}{2}\left[f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n)\right]

The pattern of coefficients is 1,2,2,…,2,11, 2, 2, \ldots, 2, 1. The first and last values are counted once and every value in between is doubled. With nn subintervals there are n+1n + 1 function values, so a sum with four trapezoids uses five values.

Tables with unequal widths

Data tables often have gaps of different sizes between the xx values. The shortcut formula assumes one common Δx\Delta x, so it does not apply. Go back to one trapezoid at a time: for each pair of neighboring columns, average the two function values and multiply by the gap between the two xx values, then add the results.

  1. List the width of each subinterval by subtracting neighboring xx values.
  2. For each subinterval, average the two function values at its ends.
  3. Multiply each average by its own width.
  4. Add the products and attach units: the units of ff times the units of xx.

Check the widths before you choose a method. If they all match, the shortcut saves time. If even one is different, compute each trapezoid separately.

Overestimate or underestimate

The direction of the error in a trapezoidal sum depends on concavity. Where a graph is concave up, the straight segment joining two points on it lies above the curve, so each trapezoid contains extra area and the sum is too large. Where a graph is concave down, the segment lies below the curve and the sum is too small.

ApproximationWhat decides the directionOverestimate whenUnderestimate when
Left Riemann sumincreasing or decreasingff is decreasingff is increasing
Right Riemann sumincreasing or decreasingff is increasingff is decreasing
Trapezoidal sumconcavityff is concave upff is concave down
Midpoint Riemann sumconcavityff is concave downff is concave up

Each row assumes the property holds on the entire interval [a,b][a, b]. If the concavity changes inside the interval, concavity alone does not settle whether the trapezoidal sum is too high or too low. For a side by side look at the two concavity-based methods, see midpoint vs trapezoidal rule.

To justify the direction in writing, state the sign of f′′f'' or the concavity of ff on the interval, then state the conclusion. Whether ff is increasing or decreasing is the reason for left and right sums and is not a reason for trapezoidal sums.

Common mistakes

  • Using the 1,2,2,…,2,11, 2, 2, \ldots, 2, 1 shortcut on a table with unequal widths. The shortcut needs one common Δx\Delta x.
  • Dropping the factor of 12\frac{1}{2}, which doubles the answer.
  • Doubling the first or last function value. Only the interior values are doubled.
  • Miscounting: nn trapezoids need n+1n + 1 function values.
  • Justifying an overestimate with 'the function is increasing'. For a trapezoidal sum the reason has to be concavity.
  • Leaving off units in a context problem. A rate in gallons per minute integrated over minutes gives gallons.

Quick check

A trapezoidal sum always lands between the left and right Riemann sums on the same subintervals, or equals both when they agree, because it is their average. If your value falls outside that range, recheck the arithmetic.

Worked examples

Worked example

Equal widths from a formula

Use a trapezoidal sum with 44 equal subintervals to approximate ∫04(x2+1) dx\int_0^4 (x^2 + 1)\,dx. Decide whether the result is an overestimate or an underestimate.

  1. Find the width: Δx=4−04=1\Delta x = \frac{4 - 0}{4} = 1, so the partition points are x=0,1,2,3,4x = 0, 1, 2, 3, 4.
  2. Evaluate f(x)=x2+1f(x) = x^2 + 1 at each point: f(0)=1f(0) = 1, f(1)=2f(1) = 2, f(2)=5f(2) = 5, f(3)=10f(3) = 10, f(4)=17f(4) = 17.
  3. Apply the shortcut: T4=12[1+2(2)+2(5)+2(10)+17]=12(52)=26T_4 = \frac{1}{2}\left[1 + 2(2) + 2(5) + 2(10) + 17\right] = \frac{1}{2}(52) = 26.
  4. Decide the direction. f′′(x)=2>0f''(x) = 2 > 0, so ff is concave up on [0,4][0, 4] and the trapezoidal sum is an overestimate.
  5. Confirm with the exact value: ∫04(x2+1) dx=643+4=763≈25.333\int_0^4 (x^2 + 1)\,dx = \frac{64}{3} + 4 = \frac{76}{3} \approx 25.333, which is less than 2626.

T4=26T_4 = 26, an overestimate because ff is concave up on [0,4][0, 4].

Worked example

A table with unequal widths

Water flows into a tank at rate r(t)r(t) gallons per minute. Selected values: r(0)=6r(0) = 6, r(2)=10r(2) = 10, r(5)=13r(5) = 13, r(9)=9r(9) = 9, r(10)=7r(10) = 7. Use a trapezoidal sum with the four subintervals given by the data to approximate ∫010r(t) dt\int_0^{10} r(t)\,dt.

  1. Find the widths: 2−0=22 - 0 = 2, 5−2=35 - 2 = 3, 9−5=49 - 5 = 4, 10−9=110 - 9 = 1. They are unequal, so compute each trapezoid separately.
  2. First trapezoid: 6+102⋅2=16\frac{6 + 10}{2} \cdot 2 = 16.
  3. Second trapezoid: 10+132⋅3=34.5\frac{10 + 13}{2} \cdot 3 = 34.5.
  4. Third trapezoid: 13+92⋅4=44\frac{13 + 9}{2} \cdot 4 = 44.
  5. Fourth trapezoid: 9+72⋅1=8\frac{9 + 7}{2} \cdot 1 = 8.
  6. Add: 16+34.5+44+8=102.516 + 34.5 + 44 + 8 = 102.5. The units are gallons per minute times minutes, which is gallons.

About 102.5102.5 gallons flowed into the tank from t=0t = 0 to t=10t = 10.

Worked example

A concave down function

Use a trapezoidal sum with 44 equal subintervals to approximate ∫19x dx\int_1^9 \sqrt{x}\,dx, and decide whether it is an overestimate or an underestimate.

  1. Find the width: Δx=9−14=2\Delta x = \frac{9 - 1}{4} = 2, so the partition points are x=1,3,5,7,9x = 1, 3, 5, 7, 9.
  2. Evaluate f(x)=xf(x) = \sqrt{x}: f(1)=1f(1) = 1, f(3)≈1.7321f(3) \approx 1.7321, f(5)≈2.2361f(5) \approx 2.2361, f(7)≈2.6458f(7) \approx 2.6458, f(9)=3f(9) = 3.
  3. Apply the shortcut with Δx2=1\frac{\Delta x}{2} = 1: T4≈1+2(1.7321+2.2361+2.6458)+3=4+2(6.6140)=17.228T_4 \approx 1 + 2(1.7321 + 2.2361 + 2.6458) + 3 = 4 + 2(6.6140) = 17.228.
  4. Decide the direction. f′′(x)=−14x3/2<0f''(x) = -\frac{1}{4x^{3/2}} < 0 for x>0x > 0, so ff is concave down on [1,9][1, 9] and the sum is an underestimate.
  5. Confirm with the exact value: ∫19x dx=23(93/2−13/2)=23(26)=523≈17.333\int_1^9 \sqrt{x}\,dx = \frac{2}{3}\left(9^{3/2} - 1^{3/2}\right) = \frac{2}{3}(26) = \frac{52}{3} \approx 17.333, which is greater than 17.22817.228.

T4≈17.228T_4 \approx 17.228, an underestimate because ff is concave down on [1,9][1, 9].

Frequently asked questions

Do the subintervals have to be the same width for a trapezoidal sum?

No. Each trapezoid uses its own width, so unequal subintervals are fine. Only the shortcut formula with the 1,2,2,…,2,11, 2, 2, \ldots, 2, 1 pattern requires equal widths.

How do I tell if a trapezoidal sum is an overestimate or an underestimate?

Check concavity on the interval. If ff is concave up (f′′>0f'' > 0), the segments lie above the curve and the sum is an overestimate. If ff is concave down (f′′<0f'' < 0), the segments lie below the curve and the sum is an underestimate.

How is a trapezoidal sum related to left and right Riemann sums?

On the same subintervals it is their average: add the left sum and the right sum and divide by 22. This holds for unequal widths too, because it is true for each subinterval separately.