Skip to content
Family Table Math

Riemann Sums

When a rate graph is curved, you can’t find the area under it with triangles and rectangles exactly. But you can approximate it: slice the region into thin strips, approximate each strip with a rectangle or trapezoid, and add up the areas. These approximations are called Riemann sums, and they show up on almost every AP exam, often with a table of real data.

Split the interval [a,b][a, b] into pieces called subintervals. If there are nn pieces of equal width, each has width

Δx=b−an.\Delta x = \frac{b - a}{n}.

Subintervals don’t have to be equal. With data from a table, the widths are often different, so find each width separately.

On each subinterval, build a shape and find its area:

SumHeight of each rectangle (or shape)
Leftthe function value at the left end of the subinterval
Rightthe function value at the right end
Midpointthe function value at the middle of the subinterval
Trapezoidala trapezoid joining the values at both ends

Each rectangle’s area is height × width. A trapezoid with parallel sides f(xk−1)f(x_{k-1}) and f(xk)f(x_k) and width Δxk\Delta x_k has area

f(xk−1)+f(xk)2⋅Δxk.\frac{f(x_{k-1}) + f(x_k)}{2} \cdot \Delta x_k .

The trapezoidal sum is always the average of the left and right sums.

Four copies of the graph of f(x) = x squared over 4, plus 1, on the interval 0 to 4, each with four subintervals of width 1. Left rectangles give 7.5, right rectangles give 11.5, midpoint rectangles give 9.25, and trapezoids give 9.5. The exact area is 28/3, about 9.333. 1 2 3 4 1 2 3 4 5 Left sum = 7.5 1 2 3 4 1 2 3 4 5 Right sum = 11.5 1 2 3 4 1 2 3 4 5 Midpoint sum = 9.25 1 2 3 4 1 2 3 4 5 Trapezoidal sum = 9.5
Four approximations of the area under f(x)=14x2+1f(x) = \tfrac{1}{4}x^2 + 1 from 00 to 44. The exact area is 283≈9.333\tfrac{28}{3} \approx 9.333.

For a function that is increasing on the interval:

  • the left sum is an underestimate (each rectangle uses the smallest height on its strip);
  • the right sum is an overestimate.

For a decreasing function, it’s the other way around: left over, right under.

Concavity tells you about trapezoids: if the graph is concave up, the trapezoids sit above the curve, so the trapezoidal sum is an overestimate (and the midpoint sum is an underestimate). If it’s concave down, the trapezoidal sum is an underestimate.

A Riemann sum of a rate is an approximation of an accumulated change, so it has the same units as the area under a rate graph. With a table, you can only use the values you’re given: a midpoint sum needs a data value at the middle of each subinterval.

Approximate the area under f(x)=14x2+1f(x) = \tfrac{1}{4}x^2 + 1 from x=0x = 0 to x=4x = 4 using n=4n = 4 equal subintervals, with left, right, midpoint, and trapezoidal sums.

Solution. Δx=4−04=1\Delta x = \tfrac{4 - 0}{4} = 1. The function values you need are:

xx000.50.5111.51.5222.52.5333.53.544
f(x)f(x)111.06251.06251.251.251.56251.5625222.56252.56253.253.254.06254.062555
L4=1 (1+1.25+2+3.25)=7.5R4=1 (1.25+2+3.25+5)=11.5M4=1 (1.0625+1.5625+2.5625+4.0625)=9.25T4=12(L4+R4)=12(7.5+11.5)=9.5\begin{aligned} L_4 &= 1\,(1 + 1.25 + 2 + 3.25) = 7.5 \\ R_4 &= 1\,(1.25 + 2 + 3.25 + 5) = 11.5 \\ M_4 &= 1\,(1.0625 + 1.5625 + 2.5625 + 4.0625) = 9.25 \\ T_4 &= \tfrac{1}{2}(L_4 + R_4) = \tfrac{1}{2}(7.5 + 11.5) = 9.5 \end{aligned}

Since ff is increasing on [0,4][0, 4], L4L_4 is an underestimate and R4R_4 is an overestimate. The exact area turns out to be 283≈9.333\tfrac{28}{3} \approx 9.333, which is between them.

Example 2: A table with uneven subintervals

Section titled “Example 2: A table with uneven subintervals”

Water flows into a tank at the rate r(t)r(t) litres per minute. Some values are shown below.

tt (min)002255991010
r(t)r(t) (L/min)4477996655

Use a right Riemann sum and a trapezoidal sum, with the four subintervals in the table, to approximate how much water flows in from t=0t = 0 to t=10t = 10.

Solution. The widths are 22, 33, 44, and 11.

Right sum (use the value at the right end of each subinterval):

2(7)+3(9)+4(6)+1(5)=14+27+24+5=702(7) + 3(9) + 4(6) + 1(5) = 14 + 27 + 24 + 5 = 70

Trapezoidal sum:

2⋅4+72+3⋅7+92+4⋅9+62+1⋅6+52=11+24+30+5.5=70.5\begin{aligned} &2 \cdot \frac{4 + 7}{2} + 3 \cdot \frac{7 + 9}{2} + 4 \cdot \frac{9 + 6}{2} + 1 \cdot \frac{6 + 5}{2} \\ &= 11 + 24 + 30 + 5.5 = 70.5 \end{aligned}

About 7070 L (right sum) or 70.570.5 L (trapezoidal sum) flows in. You can’t say whether these are over- or underestimates, because rr is neither always increasing nor always decreasing.

Find the left Riemann sum for f(x)=1xf(x) = \dfrac{1}{x} on [1,3][1, 3] with n=4n = 4 equal subintervals. Is it an overestimate or an underestimate?

Solution. Δx=3−14=0.5\Delta x = \tfrac{3 - 1}{4} = 0.5, and the left endpoints are 11, 1.51.5, 22, 2.52.5:

L4=0.5(1+23+12+25)=0.5⋅7730=7760≈1.283L_4 = 0.5\left(1 + \frac{2}{3} + \frac{1}{2} + \frac{2}{5}\right) = 0.5 \cdot \frac{77}{30} = \frac{77}{60} \approx 1.283

Since f(x)=1xf(x) = \tfrac{1}{x} is decreasing on [1,3][1, 3], each left rectangle is as tall as the highest point of its strip. The left sum is an overestimate.

A runner’s velocity v(t)v(t), in m/s, is recorded every 22 seconds.

tt (s)0022446688
v(t)v(t) (m/s)003355666.56.5

Use a midpoint sum with two subintervals of equal width to approximate the distance the runner covers from t=0t = 0 to t=8t = 8.

Solution. Two equal subintervals are [0,4][0, 4] and [4,8][4, 8], each 44 s wide. Their midpoints are t=2t = 2 and t=6t = 6, which are in the table:

M2=4 v(2)+4 v(6)=4(3)+4(6)=36M_2 = 4\,v(2) + 4\,v(6) = 4(3) + 4(6) = 36

The runner covers about 3636 m.

Using the same width for uneven subintervals. In a table, check every gap. In Example 2 the widths are 22, 33, 44, and 11, not all 2.52.5.

Using too many or too few function values. With nn subintervals, a left sum uses the first nn values and a right sum uses the last nn. If you’ve added n+1n + 1 heights, something is wrong.

Making up values for a midpoint sum. With a table, you can only use a midpoint sum when the table gives the value at each midpoint. Don’t average neighbouring values and call it a midpoint sum.

Mixing up over and under. Picture it: for an increasing function, right rectangles poke above the curve, so the right sum is too big. Decide using whether ff is increasing or decreasing on the whole interval; if it changes direction, you usually can’t tell.

Forgetting units. A sum of (L/min) × (min) is in litres. AP free-response answers need units.

1. (Warm-up) The interval [2,8][2, 8] is split into 33 equal subintervals. What is Δx\Delta x, and what are the endpoints of the subintervals?

Solution

Δx=8−23=2\Delta x = \dfrac{8 - 2}{3} = 2. The subintervals are [2,4][2, 4], [4,6][4, 6], and [6,8][6, 8].

2. (Warm-up) Find the left Riemann sum for f(x)=x2f(x) = x^2 on [0,3][0, 3] with 33 equal subintervals.

Solution

Δx=1\Delta x = 1, and the left endpoints are 00, 11, 22:

L3=1 (02+12+22)=5L_3 = 1\,(0^2 + 1^2 + 2^2) = 5

3. (Warm-up) The function gg is increasing on [0,5][0, 5]. Is a left Riemann sum for gg on [0,5][0, 5] an overestimate or an underestimate of the area under gg?

Solution

An underestimate. On each subinterval, the left endpoint gives the smallest value of gg, so each rectangle fits under the curve.

4. (Core) Find the right Riemann sum for f(x)=x3f(x) = x^3 on [1,3][1, 3] with 44 equal subintervals. Is it an over- or underestimate?

Solution

Δx=0.5\Delta x = 0.5, and the right endpoints are 1.51.5, 22, 2.52.5, 33:

R4=0.5 (3.375+8+15.625+27)=0.5 (54)=27R_4 = 0.5\,(3.375 + 8 + 15.625 + 27) = 0.5\,(54) = 27

f(x)=x3f(x) = x^3 is increasing on [1,3][1, 3], so the right sum is an overestimate. (The exact area is 2020.)

5. (Core) Use a trapezoidal sum with the three subintervals in the table to approximate the area under ff from x=0x = 0 to x=4x = 4.

xx00113344
f(x)f(x)22554488
Solution

The widths are 11, 22, and 11:

1⋅2+52+2⋅5+42+1⋅4+82=3.5+9+6=18.51 \cdot \frac{2 + 5}{2} + 2 \cdot \frac{5 + 4}{2} + 1 \cdot \frac{4 + 8}{2} = 3.5 + 9 + 6 = 18.5

6. (Core) Approximate the area under y=sin⁡xy = \sin x from x=0x = 0 to x=πx = \pi (radians) using a midpoint sum with 22 equal subintervals. Give the exact value and a decimal to three places.

Solution

Δx=π2\Delta x = \dfrac{\pi}{2}, and the midpoints are π4\dfrac{\pi}{4} and 3π4\dfrac{3\pi}{4}:

M2=π2(sin⁡π4+sin⁡3π4)=π2(22+22)=π22≈2.221M_2 = \frac{\pi}{2}\left(\sin\frac{\pi}{4} + \sin\frac{3\pi}{4}\right) = \frac{\pi}{2}\left(\frac{\sqrt{2}}{2} + \frac{\sqrt{2}}{2}\right) = \frac{\pi\sqrt{2}}{2} \approx 2.221

(Remember: in calculus, trig functions use radians. The exact area is 22.)

7. (Core) During a rainstorm, rain falls at a rate R(t)R(t) millimetres per hour. RR is decreasing for 0≤t≤60 \le t \le 6.

tt (h)0011334466
R(t)R(t) (mm/h)8877554411
  • (a) Use a right Riemann sum with the four subintervals in the table to approximate the total rainfall from t=0t = 0 to t=6t = 6. Include units.
  • (b) Is your answer an overestimate or an underestimate? Explain.
Solution

(a) Widths 11, 22, 11, 22:

1(7)+2(5)+1(4)+2(1)=7+10+4+2=23 mm1(7) + 2(5) + 1(4) + 2(1) = 7 + 10 + 4 + 2 = 23 \text{ mm}

(b) An underestimate. RR is decreasing, so the right endpoint of each subinterval gives the smallest value of RR on that subinterval, and each rectangle is below the graph.

8. (Challenge) For f(x)=x2f(x) = x^2 on [0,2][0, 2] with nn equal subintervals, show that Rn−Ln=8nR_n - L_n = \dfrac{8}{n}. How many subintervals do you need so that the right and left sums differ by less than 0.10.1?

Solution

The right and left sums share all the middle heights. The right sum has f(2)f(2) that the left doesn’t, and the left has f(0)f(0) that the right doesn’t:

Rn−Ln=Δx (f(2)−f(0))=2n(4−0)=8nR_n - L_n = \Delta x\,\big(f(2) - f(0)\big) = \frac{2}{n}(4 - 0) = \frac{8}{n}

8n<0.1\dfrac{8}{n} \lt 0.1 means n>80n \gt 80, so you need at least n=81n = 81 subintervals.

9. (Challenge) A function ff is increasing and concave up on [a,b][a, b]. Put these in order from smallest to largest: the left sum LL, the right sum RR, the midpoint sum MM, the trapezoidal sum TT, and the exact area AA (all with the same nn).

Solution

Increasing means LL is too small and RR is too big. Concave up means TT is too big and MM is too small. Also, TT is the average of LL and RR, so it’s between them, and MM uses a height between the left and right heights, so M>LM \gt L.

L<M<A<T<RL \lt M \lt A \lt T \lt R

You can check this against Example 1: 7.5<9.25<9.333<9.5<11.57.5 \lt 9.25 \lt 9.333 \lt 9.5 \lt 11.5.