Writing Riemann sums

AP Calculus BC · Unit 6. Learn to set up, write, and evaluate left, right, midpoint, and trapezoidal sums, then check yourself with practice problems.

The big idea

To find the area under a curve, slice the interval into n pieces, build a simple shape on each piece, and add them up. More slices means a better approximation. In the limit, the sum becomes the definite integral.

Every Riemann sum follows the same four steps:

  1. Find the width. Δx = (b − a) / n for equal subintervals.
  2. List the endpoints. xi = a + i·Δx, for i = 0, 1, …, n.
  3. Pick a sample point in each subinterval: left endpoint, right endpoint, or midpoint.
  4. Add the areas. Each rectangle has area f(sample)·Δx.

Explore it

Pick a function and a method, then drag n. Watch what happens to the error, and notice when the sum overestimates or underestimates.

Writing the sum in sigma notation

With Δx = (b − a)/n and xi = a + i·Δx, the four methods differ only in which point they use and where the index starts and stops.

Left: n−1Σi=0 f(xi)·Δx

Right: nΣi=1 f(xi)·Δx

Midpoint: nΣi=1 f(a + (i − ½)Δx)·Δx

Trapezoidal: (Δx/2)·[ f(x0) + 2f(x1) + … + 2f(xn−1) + f(xn) ]

Over or under? If f is increasing, left sums underestimate and right sums overestimate (reverse for decreasing). If f is concave up, trapezoids overestimate and midpoints underestimate (reverse for concave down).

From a sum to an integral

As n → ∞, a right Riemann sum becomes a definite integral:

limn→∞ nΣi=1 f(a + i·Δx)·Δx = ∫ab f(x) dx

To read a limit as an integral, match the pieces: Δx = (b − a)/n gives the width, the first term gives the starting value a (or a + Δx), and the rest of the expression is f evaluated at a + iΔx. For example, in lim Σ (1 + 3i/n)2·(3/n), the width 3/n means b − a = 3, and 1 + 3i/n means a = 1, so b = 4 and the integral is ∫14 x2 dx.

Unequal widths and tables

AP questions often give a table with uneven spacing. Then Δx changes: each rectangle uses its own width, (xi+1 − xi).

t025610
v(t)35486

Left sum = 2·3 + 3·5 + 1·4 + 4·8. Each value of v is paired with the width of the interval that follows it. A right sum pairs each value with the interval that precedes it.

AP-style free response

Water flows into a tank at a rate R(t), in liters per minute, for 0 ≤ t ≤ 15 minutes. Selected values of R are given.

t (min)0471015
R(t)691185

(a) Use a trapezoidal sum with the four subintervals from the table to approximate ∫₀¹⁵ R(t) dt.
(b) Using correct units, explain the meaning of your answer to (a).
(c) Find the left Riemann sum for the same subintervals. Can the table alone tell you whether it over- or underestimates?
(d) Use your answer to (a) to approximate the average flow rate on [0, 15].

Show solution

(a) 4·(6+9)/2 + 3·(9+11)/2 + 3·(11+8)/2 + 5·(8+5)/2 = 30 + 30 + 28.5 + 32.5 = 121.

(b) The integral approximates the total volume of water, in liters, that flowed into the tank during the first 15 minutes. State units and context to earn the point.

(c) 4·6 + 3·9 + 3·11 + 5·8 = 124. R rises and then falls, so it is not monotonic. The table cannot show whether the left sum is over or under, and a justification needs more information, such as the sign of R′.

(d) Average rate ≈ (1/15)·121 ≈ 8.07 liters per minute.

Free response 2 (graph). A particle moves along a line with velocity v(t), in meters per second. The graph of v is made of line segments through the labeled points, for 0 ≤ t ≤ 8 seconds.

024682468v(t) in m/s, t in seconds

(a) Find the left Riemann sum for ∫₀⁸ v(t) dt with four equal subintervals.
(b) Find the midpoint sum with two equal subintervals.
(c) Find the trapezoidal sum with four equal subintervals. Is it exact for this graph? Explain.
(d) What does ∫₀⁸ v(t) dt represent in this context?

Show solution

(a) Δt = 2. Left values: v(0)=2, v(2)=6, v(4)=4, v(6)=8. Sum = 2·(2+6+4+8) = 40.

(b) Δt = 4. Midpoints t = 2 and t = 6 give v = 6 and 8. Sum = 4·(6+8) = 56.

(c) 2·(2+6)/2 + 2·(6+4)/2 + 2·(4+8)/2 + 2·(8+3)/2 = 8 + 10 + 12 + 11 = 41. It is exact because v is linear on each of these subintervals, so every trapezoid matches the region under the graph. (A right sum would give 42.)

(d) The displacement of the particle, in meters, from t = 0 to t = 8. Because v ≥ 0, this is also the total distance traveled.

Check your understanding