Area and Riemann Sums
Estimate distance and area with left, right and midpoint rectangles, write the sums in sigma notation, and see the definite integral as their limit.
Welcome back!
Step 1 of 13Learn
Distance from a speedometer
A test driver accelerates from a stop and reads the speedometer every 10 seconds:
| t (s) | 0 | 10 | 20 | 30 | 40 | 50 |
|---|---|---|---|---|---|---|
| v (ft/s) | 0 | 20 | 34 | 44 | 50 | 52 |
How far did the car travel in 50 seconds? If the speed were constant, distance would be speed × time. It isn't constant, but over each 10-second window it doesn't change by much. So pretend it is constant on each window and add up the pieces.
If you use the speed at the start of each window, you get a left sum: 10·(0 + 20 + 34 + 44 + 50) = 1,480 feet. Since the car is speeding up, the start of each window is its slowest moment, so this underestimates.
Using the speed at the end of each window gives a right sum, which overestimates for the same reason. The true distance lies between the two.
Graphically, each product speed × time is the area of a thin rectangle under the velocity curve. Distance traveled equals the area under the velocity graph. This is the central idea of the course: accumulated change is area under a rate curve, and you can estimate it by adding rectangles.
Step 2 of 13Practice · Chart
Left vs. right heights for each 10-second window
Tap the window where the left and right estimates disagree the most.
Tap the bar that answers the question, then press Check.
Step 3 of 13Practice · Work it out
Using the same table, compute the right sum for the distance traveled over 50 seconds, in feet.
Step 4 of 13Learn
Building a Riemann sum
Here is the general recipe for approximating the area under y = f(x) from x = a to x = b.
- Split [a, b] into n equal subintervals. Each has width Δx = (b − a)/n.
- In each subinterval pick a sample point: the left endpoint, the right endpoint or the midpoint.
- Build a rectangle with height f(sample point) and width Δx.
- Add the areas.
The result is a Riemann sum, written with sigma notation as Σ f(xᵢ)·Δx, summed over i = 1 to n. With right endpoints, xᵢ = a + i·Δx.
Worked example. Approximate the area under f(x) = x² from 0 to 2 with n = 4. Then Δx = 0.5 and the endpoints are 0, 0.5, 1, 1.5, 2.
- Left sum: 0.5·(0² + 0.5² + 1² + 1.5²) = 0.5·(0 + 0.25 + 1 + 2.25) = 1.75
- Right sum: 0.5·(0.5² + 1² + 1.5² + 2²) = 0.5·7.5 = 3.75
- Midpoint sum, using 0.25, 0.75, 1.25, 1.75: 0.5·(0.0625 + 0.5625 + 1.5625 + 3.0625) = 2.625
The exact area turns out to be 8/3 ≈ 2.667. The midpoint sum is already within 0.05 with only four rectangles, much closer than either endpoint sum. That's typical: midpoints balance the overshoot and undershoot within each rectangle.
Step 5 of 13Explore
Left rectangles under y = x²
The staircase shows the tops of the left-endpoint rectangles for y = x² on [0, b] (ignore the steps to the right of b). Increase n and watch the staircase hug the parabola while the left, right and midpoint sums all close in on the exact area b³/3.
- Left sum
- 1.75
- Right sum
- 3.75
- Midpoint sum
- 2.625
- Exact area b³/3
- 2.6667
Step 6 of 13Learn
Over or under?
You can often predict whether an approximation is too big or too small without computing anything.
Increasing function: on each subinterval the left endpoint is the lowest point, so left rectangles sit under the curve and the left sum underestimates. Right rectangles poke above it, so the right sum overestimates.
Decreasing function: everything flips. The left endpoint is now the highest point, so the left sum overestimates and the right sum underestimates.
This only works if the function is monotonic on the whole interval. For a function that rises and then falls, the errors partly cancel and you can't tell the direction without more work.
The midpoint sum depends on concavity rather than direction: for a concave-up curve the midpoint rectangle underestimates slightly, and for a concave-down curve it overestimates slightly. You'll use this again with the trapezoidal rule in Module 4.
As n grows, all three sums converge to the same number whenever f is continuous. The gap between the left and right sums for a monotonic function is exactly |f(b) − f(a)|·Δx, so doubling n halves the gap. That simple formula tells you how many rectangles you need for a given accuracy: to pin the drive from the speedometer table within 100 feet, you'd need the gap 52·Δx under 100, so readings about every 2 seconds.
Step 7 of 13Practice · Diagram
Over or under? A quick lookup
The shape of the function predicts the error before you compute anything.
Where does y = ln x on [1, 5] belong?
Tap the shape that answers the question, then press Check.
- Left over, right under, midpoint under
Example: e^(−x). Left endpoints are the highest points; a concave-up curve sits above its tangent lines, so midpoints underestimate.
- Left under, right over, midpoint under
Example: x² on [0, 2]. Left endpoints are lowest; concave up makes the midpoint rule underestimate.
- Left over, right under, midpoint over
Example: cos x on [0, π/2]. The curve bends below its tangent lines, so midpoints overestimate.
- Left under, right over, midpoint over
Example: √x on [1, 4].
Step 8 of 13Practice · Sort into groups
Does each approximation overestimate or underestimate the true area?
Tap an item, then tap its group (or drag it there).
Step 9 of 13Practice · Work it out
Approximate ∫ from 0 to 2 of x³ dx with a midpoint sum using n = 2 rectangles.
Step 10 of 13Learn
From sums to the definite integral
Rectangles always leave a little error. To get the exact area, take the limit as the number of rectangles goes to infinity:
∫ from a to b of f(x) dx = lim (n → ∞) Σ f(xᵢ)·Δx
This limit is the definite integral. The notation tells its own history: the integral sign ∫ is a stretched letter S for "sum," f(x) is the rectangle height, and dx is the infinitely thin width that replaced Δx. The numbers a and b are the limits of integration. If f is continuous on [a, b], the limit exists and does not depend on whether you used left, right or midpoint samples.
A definite integral is a number, not a family of functions. It measures net signed area: regions above the x-axis count as positive, regions below count as negative, because there f(xᵢ) is negative and so is each rectangle's contribution. For example, ∫ from 0 to 2π of sin x dx = 0, since the hump above the axis on [0, π] exactly cancels the dip below on [π, 2π].
Computing the limit directly requires summation formulas. For f(x) = x² on [0, b], the right sum works out to (b³/6)·(1 + 1/n)(2 + 1/n), which approaches b³/3 as n → ∞. That confirms the 8/3 you saw for b = 2. In the next lesson you'll get the same answer in one line.
Step 11 of 13Note
Step 12 of 13Practice · Choose one
Which expression is the right Riemann sum for ∫ from 1 to 3 of x² dx with n equal subintervals?
Step 13 of 13Practice · True or false
If f(x) < 0 for every x in [a, b], then ∫ from a to b of f(x) dx is negative.
Lesson complete!