A Riemann sum estimates the area under a curve by adding up the areas of thin rectangles:
Each rectangle has width
The Area Under a Curve
How do you find the area under the curve
The idea is to cut the region into thin vertical strips and replace each strip by a rectangle. The rectangles don’t fit the curve exactly, so their total area is an estimate. Thinner strips leave less room for error, and the estimate improves.
For this region, the exact area turns out to be
The Riemann Sum Formula
To build a Riemann sum for
- Width. Each subinterval has width
- Endpoints. The subintervals start at
and step by :
So the
-
Sample points. Pick a point
in each subinterval. The rectangle on that subinterval has height . -
Add. The Riemann sum is
The
The three standard choices of sample point give three formulas:
| Sum | Sample point | Formula |
|---|---|---|
| Left ( | left endpoint | |
| Right ( | right endpoint | |
| Midpoint ( | midpoint |
The next three sections work out each sum for the same region:
Left Riemann Sum
A left Riemann sum uses the left endpoint of each subinterval for the height:
It uses every endpoint except the last one,
Example 1. Find
The left endpoints are 0, 0.5, 1 and 1.5:
| 0 | 0.5 | 1 | 1.5 | |
|---|---|---|---|---|
| 1 | 1.25 | 2 | 3.25 |
That’s below the exact area of 4.667. The function is increasing, so each rectangle’s height comes from the lowest point of its strip, and every rectangle sits under the curve.
Right Riemann Sum
A right Riemann sum uses the right endpoint of each subinterval:
It uses every endpoint except the first one,
Example 2. Find
The right endpoints are 0.5, 1, 1.5 and 2, with
This time the estimate is too big. For an increasing function, each height comes from the highest point of its strip, so every rectangle sticks out above the curve.
Notice that
Midpoint Riemann Sum
A midpoint Riemann sum measures each height at the middle of its subinterval:
The midpoints are not endpoints, so list them first. Each one is halfway between two neighbouring endpoints, or equivalently
Example 3. Find
The midpoints of
| 0.25 | 0.75 | 1.25 | 1.75 | |
|---|---|---|---|---|
| 1.0625 | 1.5625 | 2.5625 | 4.0625 |
That’s within 0.042 of the exact area, much closer than the left or right sum with the same four rectangles. Each midpoint rectangle overshoots the curve on one side of its strip and undershoots on the other, and the two errors nearly cancel.
Overestimate or Underestimate?
You can often tell whether a sum is too big or too small without knowing the exact area.
Left and right sums depend on whether
| Left sum | Right sum | |
|---|---|---|
| underestimate | overestimate | |
| overestimate | underestimate |
Midpoint (and trapezoidal) sums depend on concavity:
| Midpoint sum | Trapezoidal sum | |
|---|---|---|
| underestimate | overestimate | |
| overestimate | underestimate |
For
If
The Trapezoidal Sum
Replace each rectangle with a trapezoid that joins the two points on the curve. That gives the trapezoidal sum, which is simply the average of the left and right sums:
For our example,
Riemann Sums From a Table
In applied problems you often have a table of measurements instead of a formula. The method is the same, but the subintervals can have different widths, so multiply each height by its own width.
Example 4. Water flows into a tank at rate
| 0 | 2 | 5 | 9 | |
|---|---|---|---|---|
| 4 | 7 | 10 | 12 |
The subintervals are
Left sum: use the left value of each subinterval.
Right sum: use the right value of each subinterval.
Rate times time is an amount, so the area under a rate graph is a total. That’s why Riemann sums answer “how much in total” questions, from liters of water to miles driven.
Example 5 (midpoint sum from a table). Estimate the distance traveled from
| 0 | 2 | 4 | 6 | 8 | |
|---|---|---|---|---|---|
| 1 | 3 | 6 | 8 | 9 |
Two subintervals means
A midpoint sum from a table only works when the table includes the midpoints. That’s why such questions use fewer, wider subintervals than the table has.
More Rectangles: The Limit of a Riemann Sum
Here are the sums for
| 4 | 3.7500 | 5.7500 | 4.6250 |
| 8 | 4.1875 | 5.1875 | 4.6563 |
| 16 | 4.4219 | 4.9219 | 4.6641 |
| 32 | 4.5430 | 4.7930 | 4.6660 |
| 100 | 4.6268 | 4.7068 | 4.6666 |
All three columns head toward
For a continuous function, the limit is the same whichever sample points you use. When it exists, it’s called the definite integral of
Example 6. Find the exact area under
Here
The sum of the first
As
The exact area is 9. This works, but it’s slow, and it needs a summation formula for every new function. The fundamental theorem of calculus will get the same answer in one line from an antiderivative.
Negative Values and Net Area
If
Example 7. Find
The triangle below the axis has area 0.5 and the one above has area 2, so the net area is
Common Mistakes
- Using
heights. A sum with rectangles uses heights. The left sum skips ; the right sum skips . - Using endpoints for a midpoint sum. List the midpoints first, then evaluate
there. - Forgetting
. Adding the heights isn’t enough; multiply by the width. - Assuming equal widths in a table. Check the gaps between the
-values and multiply each height by its own width. - Judging the midpoint sum by increasing/decreasing. Over or under for the midpoint and trapezoidal sums depends on concavity.
- Dropping the sign below the axis. Negative function values give negative rectangle areas, so a Riemann sum gives net area.
For more worked examples with sigma notation, see Section 5.1 of the free textbook OpenStax Calculus Volume 1.
Practice Problems
Try each one before opening the answer. The practice set has 12 more with instant checking.
Problem 1. Find
Show answer
Answer:
Problem 2. Find
Show answer
The right endpoints are 1, 2, 3 and 4:
Answer:
Problem 3. Find
Show answer
The midpoints are 0.5, 1.5, 2.5 and 3.5:
Answer:
Problem 4. Find
Show answer
Answer:
Problem 5. Use the table and a right Riemann sum to estimate the distance traveled from
| 0 | 1 | 3 | 6 | |
|---|---|---|---|---|
| 40 | 50 | 55 | 60 |
Show answer
The widths are 1, 2 and 3:
Answer: 340 km
Problem 6.
Show answer
Decreasing means each right endpoint is the lowest point of its strip, so the right sum is an underestimate. Concave up means the midpoint sum is also an underestimate.
Answer: both are underestimates
Riemann sums turn area into a limit of sums. Next, the definite integral gives that limit a name and a notation, and the fundamental theorem of calculus then connects it back to antiderivatives.