AP® Calculus AB & BC · Unit 6

How Do Riemann Sums and the Trapezoidal Rule Approximate an Integral?

A Riemann sum approximates ∫abf(x) dx\int_a^b f(x)\,dx by adding the areas of thin rectangles, using the function’s value at the left, right, or midpoint of each subinterval. The Trapezoidal Rule uses trapezoids instead, averaging each pair of neighboring heights — and when the subintervals are equal width, it equals the average of the left and right Riemann sums.

The Trapezoidal Rule

With equal subinterval width Δx\Delta x and values f(x0),f(x1),…,f(xn)f(x_0), f(x_1), \dots, f(x_n): ∫abf(x) dx≈Δx2[f(x0)+2f(x1)+⋯+2f(xn−1)+f(xn)]\int_a^b f(x)\,dx \approx \frac{\Delta x}{2}\left[f(x_0) + 2f(x_1) + \cdots + 2f(x_{n-1}) + f(x_n)\right] With unequal widths, each trapezoid must be computed on its own: area of one trapezoid=xi+1−xi2[f(xi)+f(xi+1)]\text{area of one trapezoid} = \frac{x_{i+1}-x_i}{2}\left[f(x_i) + f(x_{i+1})\right]

Step-by-Step Method

  1. Determine whether the subintervals in the data are equal or unequal width — this decides which formula to use.
  2. For equal widths, use the compressed formula: first and last values counted once, every interior value counted twice, the whole sum multiplied by Δx/2\Delta x/2.
  3. For unequal widths, compute each trapezoid’s area separately as width2[f(xi)+f(xi+1)]\dfrac{\text{width}}{2}\left[f(x_i)+f(x_{i+1})\right], then add all the pieces.
  4. As a check, recompute the same sum the other way — trapezoid by trapezoid instead of the compressed formula, or vice versa — and confirm the totals match.
  5. If asked for a Riemann sum instead, use only the left, only the right, or only the midpoint value on each subinterval, not an average of two values.

Worked Examples

Foundational — equal subintervalsA continuous function ff has values f(0)=2f(0)=2, f(1)=5f(1)=5, f(2)=9f(2)=9, f(3)=12f(3)=12, and f(4)=14f(4)=14. Approximate ∫04f(x) dx\displaystyle\int_0^4 f(x)\,dx using the Trapezoidal Rule with Δx=1\Delta x = 1.
  1. Compressed formula: 12[f(0)+2f(1)+2f(2)+2f(3)+f(4)]=12[2+10+18+24+14]=12(68)=34\dfrac{1}{2}\left[f(0)+2f(1)+2f(2)+2f(3)+f(4)\right] = \dfrac12\left[2+10+18+24+14\right] = \dfrac12(68) = 34.
  2. Check by summing the four trapezoids individually: 12(2+5)+12(5+9)+12(9+12)+12(12+14)=3.5+7+10.5+13=34\dfrac12(2+5)+\dfrac12(5+9)+\dfrac12(9+12)+\dfrac12(12+14) = 3.5+7+10.5+13 = 34.
  3. A third check, available only because the widths are equal: the Trapezoidal Rule equals the average of the Left sum (2+5+9+12=282+5+9+12=28) and the Right sum (5+9+12+14=405+9+12+14=40): 28+402=34\dfrac{28+40}{2} = 34. All three agree.
Harder — unequal subintervalsA continuous function gg has values g(0)=3g(0)=3, g(2)=7g(2)=7, g(5)=4g(5)=4, and g(9)=10g(9)=10. Approximate ∫09g(x) dx\displaystyle\int_0^9 g(x)\,dx using a trapezoidal sum based on these values.
  1. The widths are not equal (22, then 33, then 44), so the compressed formula does not apply — each trapezoid must be found separately.
  2. [0,2][0,2]: 22(3+7)=10\dfrac{2}{2}(3+7) = 10. [2,5][2,5]: 32(7+4)=16.5\dfrac{3}{2}(7+4) = 16.5. [5,9][5,9]: 42(4+10)=28\dfrac{4}{2}(4+10) = 28.
  3. Sum: 10+16.5+28=54.510 + 16.5 + 28 = 54.5.
  4. Check by reframing each trapezoid as average height times width: 3+72(2)=10\dfrac{3+7}{2}(2) = 10, 7+42(3)=16.5\dfrac{7+4}{2}(3) = 16.5, 4+102(4)=28\dfrac{4+10}{2}(4) = 28 — the same three values, same total.

Common Mistakes on the AP Exam

How This Appears on the AP Exam

Try a timed AP-style question on this topic — free.

Start Free

Frequently Asked Questions

What is the difference between a Riemann sum and the Trapezoidal Rule?

A Riemann sum uses one function value (left, right, or midpoint) per subinterval to build a rectangle. The Trapezoidal Rule uses the average of the two endpoint values per subinterval, building a trapezoid instead — which is usually a better approximation for a curved function.

Can you use the compressed trapezoidal formula with unequal subintervals?

No. The compressed formula Δx2[…]\dfrac{\Delta x}{2}[\ldots] assumes every subinterval has the same width. With unequal widths, you must compute each trapezoid’s area separately and add them.

Is the Trapezoidal Rule always more accurate than a Riemann sum?

Usually, but not guaranteed — for a function that is concave up, the Trapezoidal Rule actually overestimates the integral, while a midpoint Riemann sum typically underestimates it; which is closer depends on the specific function.

How do you know if a Riemann sum overestimates or underestimates the integral?

For an increasing function, a left sum underestimates and a right sum overestimates (and the reverse for a decreasing function); for a concave-up function, the Trapezoidal Rule overestimates, and the opposite holds for concave-down.

Do these methods require a calculator on the AP exam?

A calculator helps with the arithmetic, but the setup — identifying the correct widths and which values go where — is the part that earns credit, and that has to be shown whether or not a calculator is used.

Related Topics

Keep going with timed tests & full mocks, study materials for every unit, DME Nova — your AI tutorthat won't make up an answer, and FRQ feedback scored against an exam-style rubric.

Start Free

Written by the DME AP Calculus team — 20+ years of AP & STEM teaching.

Last updated: 2026-10-08

AP® is a registered trademark of the College Board, which is not affiliated with, and does not endorse, this site.