Riemann sums, explained with examples
A Riemann sum estimates the area under a curve by adding up the areas of rectangles. It is how the definite integral is defined, and AP Calculus asks about Riemann sums every year, often using a table of data.
On this page
The idea
Finding the exact area under a curve is hard, but finding the area of a rectangle is easy. So split the interval [a, b] into pieces, build a rectangle on each piece, and add up their areas. The height of each rectangle comes from the function at some point in its piece. Different choices of that point give different Riemann sums. As the pieces get thinner, every type of sum gets closer to the exact area, which is the definite integral.
The four sums you need
- Left Riemann sum: each height is the function value at the left end of the subinterval.
- Right Riemann sum: each height is the value at the right end.
- Midpoint Riemann sum: each height is the value at the middle of the subinterval.
- Trapezoidal sum: each piece is a trapezoid joining the function values at both ends. Its area is (width) × (left height + right height)/2. The trapezoidal sum equals the average of the left and right sums when the widths are equal.
Worked example with a formula
Use f(x) = ½x² + 1 on [0, 4] with four subintervals of width 1, as in the diagram.
Left sum
Find the left Riemann sum.
- Heights f(0), f(1), f(2), f(3) = 1, 1.5, 3, 5.5.
- L = 1 × (1 + 1.5 + 3 + 5.5) = 11.
Right sum
Find the right Riemann sum.
- Heights f(1), f(2), f(3), f(4) = 1.5, 3, 5.5, 9.
- R = 1 × (1.5 + 3 + 5.5 + 9) = 19.
Midpoint sum
Find the midpoint Riemann sum.
- Heights f(0.5), f(1.5), f(2.5), f(3.5) = 1.125, 2.125, 4.125, 7.125.
- M = 1 × 14.5 = 14.5.
Trapezoidal sum
Find the trapezoidal sum.
- T = (L + R)/2 = (11 + 19)/2 = 15.
- The exact area is ∫04 (½x² + 1) dx = [x³/6 + x]04 = 32/3 + 4 ≈ 14.67. The midpoint and trapezoidal sums are much closer than the left and right sums.
Overestimate or underestimate?
AP questions often ask whether an approximation is too big or too small, and you must justify it.
- Left and right sums depend on whether f is increasing or decreasing. If f is increasing, the left sum underestimates and the right sum overestimates. If f is decreasing, it is the other way round.
- Trapezoidal and midpoint sums depend on concavity. If f is concave up, trapezoids lie above the curve, so the trapezoidal sum overestimates and the midpoint sum underestimates. If f is concave down, the reverse is true.
In the example, f is increasing and concave up on [0, 4], which matches the results: L = 11 and M = 14.5 are below 14.67, while R = 19 and T = 15 are above it.
Riemann sums from a table
Free-response questions usually give a table of values rather than a formula, often with unequal intervals. Then you cannot factor out a common width; multiply each height by its own width.
Example: a table with unequal widths
Water flows into a tank at rate r(t) litres per minute. r(0) = 10, r(2) = 14, r(5) = 20, r(9) = 18. Use a right Riemann sum to estimate the total water that flows in from t = 0 to t = 9.
- Widths are 2, 3 and 4. Right heights are r(2), r(5) and r(9).
- Total ≈ 2(14) + 3(20) + 4(18) = 28 + 60 + 72 = 160 litres.
- Units matter: (litres per minute) × (minutes) = litres. Include units and say what the integral represents.
Example: trapezoidal sum from the same table
Use a trapezoidal sum with the same intervals.
- 2(10 + 14)/2 + 3(14 + 20)/2 + 4(20 + 18)/2 = 24 + 51 + 76.
- = 151 litres.
Explaining what the sum means
AP questions often follow a calculation with “explain the meaning of your answer in the context of the problem”. A full answer names the quantity, the time interval and the units: “Approximately 160 litres of water flowed into the tank from t = 0 to t = 9 minutes.” Saying only “the area under the curve” does not earn the point.
Sigma notation and the definite integral
A right Riemann sum with n equal subintervals on [a, b] can be written as Σk=1n f(a + kΔx)Δx, where Δx = (b − a)/n. The definite integral is the limit of these sums as n → ∞. AP questions sometimes give a limit of a sum and ask you to write it as an integral. For example, limn→∞ Σk=1n (1 + 2k/n)² · (2/n) is ∫13 x² dx: the width 2/n tells you the interval has length 2, and 1 + 2k/n starts just above 1.
Common mistakes
- Using a common width when the table's intervals are unequal.
- Including the right endpoint in a left sum, or the left endpoint in a right sum.
- Justifying over- or underestimates with the wrong property; left and right use increasing or decreasing, trapezoidal and midpoint use concavity.
- Forgetting units in a context question.
Practice questions
Try each one before opening the answer.
Q1. Find the left sum for f(x) = x² on [0, 3] with three equal subintervals.
Show answer
Q2. Find the right sum for the same function and intervals.
Show answer
Q3. f is decreasing on [a, b]. Does a left Riemann sum overestimate or underestimate the integral?
Show answer
Q4. f is concave down. Is the trapezoidal sum an overestimate or underestimate?
Show answer
Frequently asked questions
Are Riemann sums on AP Calculus AB?
Yes. They are in Unit 6 of both AB and BC, and a table-based Riemann sum question appears on the free-response section most years.
Do I need to know the trapezium rule for A level Maths?
Yes. A level Maths calls it the trapezium rule and uses it to estimate integrals, including whether the estimate is too high or too low based on concavity.
Key takeaways
- Riemann sums add rectangle areas to estimate an integral.
- Left, right and midpoint sums differ in where the height is taken.
- Trapezoidal sum = average of left and right sums for equal widths.
- Increasing or decreasing decides left and right errors; concavity decides trapezoidal and midpoint errors.
- With tables, use each interval's own width and include units.