Integrals
Riemann Sums
Approximating the area under a curve using left, right, and midpoint Riemann sums.
Advanced20 min lesson2 min readUpdated August 12, 2026Author not yet attributed
Approximating Area from Rectangles
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 one rectangle's area per subinterval — a left sum uses each subinterval's left endpoint for height, a right sum the right endpoint, and a midpoint sum the midpoint.
Worked Example — Comparing Left, Right, and Midpoint Sums
Approximate ∫₀⁴ (x² + 2) dx using n = 4 (Δx = 1). With f(0)=2, f(1)=3, f(2)=6, f(3)=11, f(4)=18: left sum L = 1(2+3+6+11) = 22; right sum R = 1(3+6+11+18) = 38; midpoint sum, using f(0.5)=2.25, f(1.5)=4.25, f(2.5)=8.25, f(3.5)=14.25, gives M = 29. The exact value: ∫₀⁴(x²+2)dx = [x³/3+2x]₀⁴ = 64/3+8 = 88/3 ≈ 29.33. As expected for an increasing, concave-up function, L underestimates, R overestimates, and M lands closest, slightly under the exact value.
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
- 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.
- The Fundamental Theorem of Calculus says A'(x) = f(x): differentiating the accumulation function gives the original function back.
- Confirmed numerically here: differentiating the accumulation curve gives A'(b) ≈ 4, matching f(b) ≈ 4.
Numerical approximation comparison
| Method | Estimate |
|---|---|
| Left Riemann sum | 2.28 |
| Right Riemann sum | 3.08 |
| Midpoint Riemann sum | 2.66 |
| Trapezoidal Rule | 2.68 |
| Simpson's Rule | 2.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
For an increasing function, the left sum always underestimates and the right sum always overestimates the true area — check monotonicity first to predict the direction of error.
Common Mistakes
Using the wrong endpoint of each subinterval for a left or right sum.
A left sum uses the smallest x-value in each subinterval; a right sum uses the largest — mixing them up flips which estimate over- or underestimates.
Key Takeaways
- Left, right, and midpoint sums approximate area with rectangles of a chosen width.
- Monotonicity predicts whether left/right sums over- or underestimate the true area.
Summary
The next lesson takes the number of rectangles to infinity, defining the definite integral exactly.
Sign in to track your progress and mark this lesson complete.
Track your progress