AP Calculus AB and BC

Riemann Sums: Left, Right, Midpoint, and Trapezoidal

A Riemann sum estimates a definite integral by adding rectangle or trapezoid areas; the left, right, midpoint, and trapezoidal rules differ only in where each strip takes its height. For an increasing function the left sum underestimates and the right overestimates; concavity decides midpoint and trapezoidal.

When a Riemann sum is the right tool

Reach for a Riemann sum whenever you need the area under a curve, or the total accumulated by a rate, but an exact antiderivative is out of reach: a table of measured data, a graph with no formula, or a function whose antiderivative you are not expected to find. This is Topics 6.2 and 6.3 in the CED, and it is where the definite integral is born. The plan never changes. Cut the interval [a,b][a,b] into thin subintervals, build a rectangle or trapezoid over each one, and add the pieces. Narrower strips give a closer estimate.

Every Riemann sum is a sum of products, and each product is one strip's height (a function value) times that strip's width. Once you see that structure you can build any of the four sums the exam asks for. The Riemann sum slider at /interactives/riemann-sum-slider lets you drag the number of subintervals up and watch the estimate tighten toward the true area, and the calculator at /calculators/riemann-sum-visualizer draws the strips for a function you type in, so you can check a hand computation against the picture.

Four rules, one difference: where the height comes from

Fix a partition of [a,b][a,b] into nn subintervals with a uniform width Δx=ban\Delta x = \frac{b-a}{n} and grid points x0,x1,,xnx_0, x_1, \dots, x_n. All four methods multiply widths by heights and add. They disagree only about which height each strip uses.

  • Left sum: the height is the function value at the left edge of each strip.
  • Right sum: the height is the value at the right edge.
  • Midpoint sum: the height is the value at the middle of each strip.
  • Trapezoidal sum: no single height. Each strip is a trapezoid whose two parallel sides are the left and right function values, so its area uses their average.
Ln=Δx[f(x0)+f(x1)++f(xn1)]L_n = \Delta x\cdot\left[f(x_0) + f(x_1) + \cdots + f(x_{n-1})\right]
Rn=Δx[f(x1)+f(x2)++f(xn)]R_n = \Delta x\cdot\left[f(x_1) + f(x_2) + \cdots + f(x_n)\right]
Mn=Δx[f ⁣(x0+x12)++f ⁣(xn1+xn2)]M_n = \Delta x\cdot\left[f\!\left(\tfrac{x_0+x_1}{2}\right) + \cdots + f\!\left(\tfrac{x_{n-1}+x_n}{2}\right)\right]
Tn=Δx2[f(x0)+2f(x1)+2f(x2)++2f(xn1)+f(xn)]T_n = \frac{\Delta x}{2}\cdot\left[f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n)\right]

The trapezoidal formula is not a new idea; it is the average of the left and right sums, Tn=Ln+Rn2T_n = \frac{L_n + R_n}{2}. That is why every interior grid point carries a coefficient of 2: each one is the right edge of one strip and the left edge of the next, so it gets counted twice. When a table hands you unequal widths, drop the single Δx\Delta x and multiply each height, or each averaged pair, by its own strip width.

Over or underestimate: the question the exam always asks

Topic 6.2 leans hard on one skill: deciding, without computing the true value, whether an approximation is too big or too small. Two features of the function settle it, and each governs a different pair of methods. Monotonicity, whether the function is increasing or decreasing, controls the left and right sums. Concavity, whether the graph bends up or down, controls the midpoint and trapezoidal sums.

For a rising function the left edge of every strip is its shortest side, so left rectangles sit under the curve and the left sum underestimates, while the right edges are tallest and the right sum overestimates. Flip both for a falling function. For concavity, picture the straight chord the trapezoid draws between two points on the curve: when the graph is concave up, that chord lies above the curve, so the trapezoidal sum overestimates. The midpoint rectangle behaves the opposite way: it has the same area as the trapezoid you would get from the tangent line at the midpoint, and for a concave-up curve that tangent line runs below the curve, so the midpoint sum underestimates.

MethodUnderestimate whenOverestimate when
Left sumff increasingff decreasing
Right sumff decreasingff increasing
Trapezoidalff concave downff concave up
Midpointff concave upff concave down

Exam shortcut

For a function with a single concavity across the whole interval, the midpoint and trapezoidal errors point in opposite directions, so the exact integral is trapped between MnM_n and TnT_n. That fact alone can answer a multiple-choice question without any arithmetic.

Summation notation and the jump to the definite integral

Topic 6.3 packs the whole construction into one symbol. A general Riemann sum is written as a sum of products over the subintervals of a partition.

i=1nf(xi)Δxi\sum_{i=1}^{n} f(x_i^{*})\cdot\Delta x_i

Here Δxi\Delta x_i is the width of the iith subinterval and xix_i^{*} is any sample point inside it: its left end gives a left sum, its right end a right sum, its middle a midpoint sum. With a uniform width Δx=ban\Delta x = \frac{b-a}{n}, the definite integral is defined as the limit of these sums as the strips shrink to nothing.

abf(x)dx=limni=1nf(xi)Δx\int_a^b f(x)\,dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^{*})\cdot\Delta x

For a continuous function the choice of sample point stops mattering in the limit, which is why left, right, and midpoint sums all converge to the same number (Topic 6.3). Worked Example 3 runs this limit by hand so you can watch the definite integral emerge from pure algebra, no antiderivative required.

Mistakes that cost points

  • Miscounting grid points. nn subintervals need n+1n+1 grid points. The left sum uses the first nn of them and drops the last; the right sum drops the first and keeps the last.
  • Forcing one width onto a table. Data with unequal spacing has no single Δx\Delta x. Multiply each strip by its own width, or the arithmetic quietly smears.
  • Forgetting the 2's in the trapezoidal formula. Every interior grid point is shared by two trapezoids, so it appears twice; only the two outer endpoints carry a coefficient of 1.
  • Swapping the over/under rules. Increasing versus decreasing decides left and right sums. Concavity decides midpoint and trapezoidal. Judging a left sum by concavity is a classic trap.
  • Calling a fine partition exact. More strips shrink the error but never erase it. Only the limit as nn \to \infty gives the exact integral.

Worked examples

Worked example

Left and right sums for a power function

Estimate 15x2dx\int_1^5 x^2\,dx using left and right Riemann sums with four subintervals of equal width, then decide whether each is an over- or underestimate.

  1. The interval is [1,5][1,5] with n=4n = 4, so Δx=514=1\Delta x = \frac{5-1}{4} = 1. The grid points are x0=1x_0 = 1, x1=2x_1 = 2, x2=3x_2 = 3, x3=4x_3 = 4, x4=5x_4 = 5, and f(x)=x2f(x) = x^2.
  2. Evaluate ff at every grid point: f(1)=1f(1) = 1, f(2)=4f(2) = 4, f(3)=9f(3) = 9, f(4)=16f(4) = 16, f(5)=25f(5) = 25.
  3. The left sum uses the left endpoints x0x_0 through x3x_3: L4=1(1+4+9+16)=30L_4 = 1\cdot(1 + 4 + 9 + 16) = 30.
  4. The right sum uses the right endpoints x1x_1 through x4x_4: R4=1(4+9+16+25)=54R_4 = 1\cdot(4 + 9 + 16 + 25) = 54.
  5. Classify with monotonicity. Since f(x)=2x>0f'(x) = 2x > 0 on [1,5][1,5], the function is increasing, so the left sum underestimates and the right sum overestimates. As a check, the antiderivative gives 15x2dx=[x33]15\int_1^5 x^2\,dx = \left[\frac{x^3}{3}\right]_1^5. This evaluates to 12513=1243\frac{125 - 1}{3} = \frac{124}{3}, or about 41.3341.33, which sits between 3030 and 5454.

L4=30L_4 = 30 (underestimate) and R4=54R_4 = 54 (overestimate); the exact value 124341.33\frac{124}{3} \approx 41.33 lies between them.

Worked example

Trapezoidal sum from a table with unequal widths

Water flows into a tank at a rate R(t)R(t) liters per minute, measured at these times: R(0)=20R(0) = 20, R(3)=26R(3) = 26, R(5)=29R(5) = 29, R(8)=30R(8) = 30, and R(12)=35R(12) = 35. Use a trapezoidal sum with the four subintervals given by the table to approximate 012R(t)dt\int_0^{12} R(t)\,dt, and state what the result represents.

  1. The partition is 0,3,5,8,120, 3, 5, 8, 12, giving four subintervals of widths 33, 22, 33, and 44 minutes. Because the widths differ, handle each trapezoid separately instead of factoring out one Δx\Delta x.
  2. Each trapezoid area is the width times the average of its two heights: ΔtR(left)+R(right)2\Delta t \cdot \frac{R(\text{left}) + R(\text{right})}{2}.
  3. Compute each piece. On [0,3][0,3]: 320+262=693 \cdot \frac{20 + 26}{2} = 69. On [3,5][3,5]: 226+292=552 \cdot \frac{26 + 29}{2} = 55. On [5,8][5,8]: 329+302=88.53 \cdot \frac{29 + 30}{2} = 88.5. On [8,12][8,12]: 430+352=1304 \cdot \frac{30 + 35}{2} = 130.
  4. Add the four trapezoids: 69+55+88.5+130=342.569 + 55 + 88.5 + 130 = 342.5.

About 342.5342.5 liters flow into the tank during the first 1212 minutes, since integrating a rate in liters per minute over minutes accumulates a total amount in liters.

Worked example

From a right Riemann sum to the definite integral

Write the right Riemann sum for 02x2dx\int_0^2 x^2\,dx with nn equal subintervals, then take the limit as nn \to \infty to evaluate the integral straight from the definition.

  1. With nn equal strips on [0,2][0,2], the width is Δx=2n\Delta x = \frac{2}{n} and the right endpoints are xi=0+iΔx=2inx_i = 0 + i\cdot\Delta x = \frac{2i}{n} for i=1,2,,ni = 1, 2, \dots, n.
  2. Build the sum: Rn=i=1nf(xi)Δx=i=1n(2in)22nR_n = \sum_{i=1}^{n} f(x_i)\cdot\Delta x = \sum_{i=1}^{n} \left(\frac{2i}{n}\right)^2 \cdot \frac{2}{n}.
  3. Simplify the general term: (2in)22n=4i2n22n=8i2n3\left(\frac{2i}{n}\right)^2 \cdot \frac{2}{n} = \frac{4i^2}{n^2}\cdot\frac{2}{n} = \frac{8i^2}{n^3}, so Rn=8n3i=1ni2R_n = \frac{8}{n^3}\sum_{i=1}^{n} i^2.
  4. Apply the sum-of-squares formula i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}. Substituting gives Rn=8n3n(n+1)(2n+1)6R_n = \frac{8}{n^3}\cdot\frac{n(n+1)(2n+1)}{6}, which simplifies to 4(n+1)(2n+1)3n2\frac{4(n+1)(2n+1)}{3n^2}.
  5. Expand the numerator to get Rn=4(2n2+3n+1)3n2R_n = \frac{4(2n^2 + 3n + 1)}{3n^2}. Dividing each term by n2n^2 gives 43(2+3n+1n2)\frac{4}{3}\left(2 + \frac{3}{n} + \frac{1}{n^2}\right).
  6. Let nn \to \infty. The terms 3n\frac{3}{n} and 1n2\frac{1}{n^2} vanish, so limnRn=432\lim_{n \to \infty} R_n = \frac{4}{3}\cdot 2, which is 83\frac{8}{3}.

02x2dx=83\int_0^2 x^2\,dx = \frac{8}{3}, matching the antiderivative check [x33]02=83\left[\frac{x^3}{3}\right]_0^2 = \frac{8}{3}.

Frequently asked questions

Does the left or right Riemann sum overestimate?

It depends on whether the function is increasing or decreasing, not on which sum you pick. For an increasing function the right sum overestimates and the left sum underestimates; for a decreasing function it is the reverse. If the function turns around inside the interval, split it at the turning point and judge each piece separately.

Is a midpoint Riemann sum an over- or underestimate?

Concavity decides it. Where the graph is concave up, the midpoint sum underestimates; where it is concave down, the midpoint sum overestimates. This is the opposite of the trapezoidal rule, which overestimates when concave up and underestimates when concave down.

What is the difference between a Riemann sum and a definite integral?

A Riemann sum is a finite estimate: a fixed number of strips whose areas you add. The definite integral abf(x)dx\int_a^b f(x)\,dx is the exact value those sums approach as the strips get infinitely thin, limnf(xi)Δx\lim_{n \to \infty} \sum f(x_i^{*})\cdot\Delta x. Every Riemann sum stays an approximation until you take the limit.

Why is the trapezoidal rule usually more accurate than left or right sums?

A trapezoid follows the straight line between two points on the curve, while a rectangle uses only one endpoint's height, so the trapezoid tracks a sloped function much more closely. For the same number of subintervals it is the average of the left and right sums, Tn=Ln+Rn2T_n = \frac{L_n + R_n}{2}, which cancels much of the error the one-sided sums carry in opposite directions.