Math Bytes · Calculus · Episode 17 · Integrals
Riemann sums
A Riemann sum estimates the area under a curve by adding up rectangles. For y = x² from 0 to 4 with four slices 1 wide, right edges give 1 + 4 + 9 + 16 = 30 and left edges give 0 + 1 + 4 + 9 = 14; the true area, 21⅓, sits in between, and thinner rectangles squeeze in on it.
The setup: y = x² from 0 to 4
The region under y = x² from x = 0 to x = 4 isn't a rectangle or a triangle, so there's no simple area formula for it yet. Instead, cut it into 4 slices, each 1 wide: [0, 1], [1, 2], [2, 3] and [3, 4].
Right edges: 30
On each slice, build a rectangle as tall as the curve at the slice's right edge:
- at
x = 1: height1² = 1 - at
x = 2: height2² = 4 - at
x = 3: height3² = 9 - at
x = 4: height4² = 16
Each rectangle's area is height × width, and every width is 1, so the sum is
1 + 4 + 9 + 16 = 30
That's a Riemann sum: add up f(x) · Δx over the slices, where Δx is the slice width.
Left edges: 14
Because x² rises from left to right, each right-edge rectangle pokes above the curve, so 30 is too big. Use the height at each left edge instead (x = 0, 1, 2, 3) and every rectangle sits under the curve, leaving gaps:
0 + 1 + 4 + 9 = 14, which is too small.
So the true area is somewhere between 14 and 30.
Thinner rectangles squeeze in
The true area is 21⅓ (that is, 64/3; the next lesson shows how to get it exactly). With more, thinner slices, the rectangles hug the curve more tightly: the right sum comes down, the left sum comes up, and both close in on 21⅓. The limit of the sums as the slices get thinner is the definite integral, ∫₀⁴ x² dx = 21⅓.
Try it yourself
- Estimate the area under
y = 2xfromx = 0tox = 3with slices 1 wide. Find the right-edge sum and the left-edge sum. - Estimate the area under
y = x²fromx = 0tox = 2with slices 1 wide, using left edges.
(Answers: 1. Right edges: heights 2, 4, 6, so 2 + 4 + 6 = 12. Left edges: heights 0, 2, 4, so 0 + 2 + 4 = 6. The true area is the triangle ½ · 3 · 6 = 9, between them. 2. Heights at x = 0 and x = 1 are 0 and 1, so the left sum is 0 + 1 = 1, an underestimate.)
Good to know
- A Riemann sum adds
f(xᵢ) · Δxover the slices, wherexᵢis a point in each slice. Left and right endpoints are the most common choices. - "Right edges overestimate, left edges underestimate" holds here because
x²is increasing on[0, 4]. For a decreasing curve it flips. - Midpoint and trapezoid sums are other ways to estimate the same area; they aren't covered in this lesson.
- "Both sums squeeze in" on the same number is true for continuous functions such as
x². - The true area
64/3 = 21⅓comes from the next lesson's method:x³/3from 0 to 4. - The sums are named for the mathematician Bernhard Riemann.
Answer to the comment question
y = x² from x = 1 to x = 4, slices 1 wide, right edges: what's the Riemann sum? 29. The slices are [1, 2], [2, 3] and [3, 4], so the right edges are x = 2, 3, 4, with heights 4, 9 and 16: 4 + 9 + 16 = 29. The true area is 21, so 29 is an overestimate, as expected for right edges on a rising curve.
Test your knowledge
Quick quiz: Riemann sums
4 multiple-choice questions. Pick one answer for each, then check how you did.
Sources
- OpenStax, "Calculus Volume 1, 5.1 Approximating Areas": left- and right-endpoint approximations; Riemann sums; better estimates with more slices
- OpenStax, "Calculus Volume 1, 5.2 The Definite Integral": the definite integral as the limit of Riemann sums
- College Board, "AP Calculus AB and BC Course and Exam Description": Unit 6, Integration and Accumulation of Change (approximating areas with Riemann sums)
- Wolfram MathWorld, "Topics in a Calculus I Course": a Riemann sum estimates the area under a curve with rectangles; the definite integral is their limit
Video transcript
How can rectangles under a curve estimate its area?
Take the curve y equals x squared, from zero to four. That area isn't a simple shape.
Split it into four slices, each one wide. Use the curve's height at each right edge: one, four, nine and sixteen.
Add up the rectangles and you get thirty. That's a Riemann sum.
The rectangles poke above the curve, so thirty is too big. Using left edges gives fourteen, which is too small.
The true area is twenty-one and a third. With thinner rectangles, both sums squeeze in on it. That limit is the integral.
Your turn. y equals x squared, from one to four. Slices one wide, right edges. What's the Riemann sum? Comment your answer below!
That's your byte.
More from Calculus
- Calculus EP14Concavity
- Calculus EP15The mean value theorem
- Calculus EP19u-substitution
- Calculus EP20Integration by parts