Skip to main content
Daily Math Minute

Unit 6: Integration & Accumulation of Change

Riemann Sums & the Trapezoidal Rule

Approximating area under a curve using Riemann sums and the trapezoidal rule.

Advanced25 min lesson3 min readUpdated August 12, 2026Author not yet attributed

Approximating Area from Rectangles

The area under a curve isn't a rectangle or triangle with a ready-made formula — but it can be approximated by shapes that do have one. Before reading on: if you sliced the region under a curve into several thin rectangles, would using the left edge, the right edge, or the midpoint of each slice to set the rectangle's height make a genuine difference in the total?

Definition — Riemann Sum

A Riemann sum approximates the area under f on [a, b] by dividing it into n subintervals of width Δx and summing the area of one rectangle per subinterval. A left sum uses each subinterval's left endpoint for height; a right sum uses the right endpoint; a midpoint sum uses the midpoint. A trapezoidal sum instead averages the left and right heights of each subinterval, forming trapezoids instead of rectangles.

Worked Example — Comparing Four Approximation Methods

Approximate ∫₀⁴ x² dx using n = 4 subintervals (Δx = 1). With f(0)=0, f(1)=1, f(2)=4, f(3)=9, f(4)=16: the left sum uses x = 0,1,2,3: L = 1(0+1+4+9) = 14. The right sum uses x = 1,2,3,4: R = 1(1+4+9+16) = 30. The midpoint sum uses x = 0.5, 1.5, 2.5, 3.5, with f-values 0.25, 2.25, 6.25, 12.25: M = 1(0.25+2.25+6.25+12.25) = 21. The trapezoidal sum: T = (L+R)/2 = (14+30)/2 = 22. The exact value, ∫₀⁴x²dx = [x³/3]₀⁴ = 64/3 ≈ 21.333, sits between all of these — closest to the midpoint sum. Since f(x) = x² is increasing, the left sum (using the smaller left-edge heights) underestimates and the right sum overestimates. Since f is also concave up (f''(x) = 2 > 0), the straight trapezoid tops sit above the curve, so the trapezoidal sum overestimates too — matching T = 22 > 21.333.

Worked Example — The Trapezoidal Rule from Unevenly Spaced Data

A car's velocity is measured at uneven time intervals: v(0) = 3, v(2) = 7, v(5) = 10, v(9) = 6 (m/s). Approximate the total distance traveled, ∫₀⁹ v(t) dt, using the trapezoidal rule on each unequal subinterval. For [0,2]: (2/2)(3+7) = 10. For [2,5]: (3/2)(7+10) = 25.5. For [5,9]: (4/2)(10+6) = 32. Total: 10 + 25.5 + 32 = 67.5 meters.

Integral Visualizer

Integration bounds
0
2

Animate b (the play button above) to watch the shaded area — and the accumulation curve below — grow.

Approximation method
10

f(x), with the region between a and b shaded

Accumulation function A(x) = ∫ₐˣ f(t) dt — linked to the graph above; panning or zooming either moves both

What the Fundamental Theorem of Calculus tells us
  1. A(x) = ∫ from a to x of f(t) dt is the accumulation function. At x = b ≈ 2, A(b) ≈ 2.67 — the signed area under f from a ≈ 0 to b.
  2. The Fundamental Theorem of Calculus says A'(x) = f(x): differentiating the accumulation function gives the original function back.
  3. Confirmed numerically here: differentiating the accumulation curve gives A'(b) ≈ 4, matching f(b) ≈ 4.
Numerical approximation comparison
Every method's estimate of ∫ₐᵇ f(x) dx at n = 10 subdivisions, against a high-resolution reference — all should converge toward the same value.
MethodEstimate
Left Riemann sum2.28
Right Riemann sum3.08
Midpoint Riemann sum2.66
Trapezoidal Rule2.68
Simpson's Rule2.66667
Exact (high-resolution reference)2.66667
Analysis of f(x)
y-intercept
(0, 0)
x-intercepts
(0, 0)
Extrema
local min at (0, 0)
Inflection points
none found in view
Vertical asymptotes
none found in view
Horizontal asymptotes
none found
Domain
all real numbers in view
Range (estimated)
approximately [0, 100]

Tip

To predict whether an approximation overestimates or underestimates without computing the exact value, check monotonicity (increasing/decreasing decides left vs. right sum direction) and concavity (concave up means trapezoidal overestimates and midpoint underestimates; concave down reverses both).

Common Mistakes

  • Using a subinterval's full width when the data points are unevenly spaced, instead of that subinterval's own Δt.

    Each trapezoid in an unevenly-spaced trapezoidal sum uses its own width — [2,5] has width 3, not the same width as [0,2]'s width of 2 — mixing up the widths gives a wrong weighted total.

  • Assuming the midpoint sum is always the most accurate Riemann sum, for any function.

    The midpoint sum's strong accuracy specifically comes from concave functions' errors partially cancelling within each rectangle — it's a reliably good approximation, not a universally exact one, and the trapezoidal rule can occasionally outperform it depending on the function's shape.

Key Takeaways

  • Left, right, midpoint, and trapezoidal sums approximate area under a curve using rectangles or trapezoids of a chosen width.
  • Monotonicity determines whether left/right sums overestimate or underestimate; concavity determines the same for the trapezoidal and midpoint sums.
  • The trapezoidal rule extends directly to unevenly spaced data, weighting each subinterval by its own actual width.

Summary

Riemann sums approximate area with a finite number of rectangles. The next lesson takes the number of rectangles to infinity, defining the definite integral exactly.