Riemann Sums (Everything to Know for AP Calculus)

What You Need to Know

The big idea

A Riemann sum is a way to approximate the definite integral abf(x)dx\int_a^b f(x)\,dx by adding up areas of thin rectangles (or trapezoids) over a partition of [a,b][a,b]. On the AP Calc AB exam, Riemann sums show up in two main ways:

  • Approximating abf(x)dx\int_a^b f(x)\,dx from a graph, formula, or table.
  • Recognizing that a scary-looking sum is really an integral (and sometimes evaluating it quickly).
Core definition (the one to know cold)

Partition [a,b][a,b] into nn subintervals:

  • a=x0<x1<<xn=ba = x_0 < x_1 < \dots < x_n = b
  • widths Δxi=xixi1\Delta x_i = x_i - x_{i-1}
  • choose a sample point cic_i in each subinterval [xi1,xi][x_{i-1},x_i]

Then a Riemann sum is:

i=1nf(ci)Δxi\sum_{i=1}^n f(c_i)\,\Delta x_i

If you refine the partition so the subintervals get very small, the Riemann sums approach the definite integral:

abf(x)dx=limP0i=1nf(ci)Δxi\int_a^b f(x)\,dx = \lim_{\|P\|\to 0} \sum_{i=1}^n f(c_i)\,\Delta x_i

(For equal-width partitions, Δx=ban\Delta x = \frac{b-a}{n} and the limit is usually written as nn\to\infty.)

Rectangles vs “area”
  • abf(x)dx\int_a^b f(x)\,dx is signed area.
  • If f(x)<0f(x) < 0 on a region, that part contributes negative value.

Don’t automatically treat integrals as “area” unless the problem specifically asks for area between the curve and the x-axis, which would be abf(x)dx\int_a^b |f(x)|\,dx.


Step-by-Step Breakdown

A) Approximating an integral using a Riemann sum (LRAM/RRAM/MRAM)

Use this when you’re asked to approximate abf(x)dx\int_a^b f(x)\,dx with nn rectangles.

  1. Identify aa, bb, and nn.

  2. Compute the width (equal partitions):

    Δx=ban\Delta x = \frac{b-a}{n}

  3. Build partition points:

    xi=a+iΔxx_i = a + i\Delta x

  4. Choose your sample points based on the method:

    • LRAM (Left): ci=xi1c_i = x_{i-1}
    • RRAM (Right): ci=xic_i = x_i
    • MRAM (Midpoint): ci=xi1+xi2c_i = \frac{x_{i-1}+x_i}{2}
  5. Compute the sum:

    i=1nf(ci)Δx\sum_{i=1}^n f(c_i)\,\Delta x

Mini-worked setup (generic)

Approximate abf(x)dx\int_a^b f(x)\,dx with **RRAM** and n=4n=4:

  • Δx=ba4\Delta x = \frac{b-a}{4}
  • right endpoints: x1=a+Δx, x2=a+2Δx, x3=a+3Δx, x4=bx_1=a+\Delta x,\ x_2=a+2\Delta x,\ x_3=a+3\Delta x,\ x_4=b
  • RRAM:

R4=Δx[f(x1)+f(x2)+f(x3)+f(x4)]R_4 = \Delta x\,[f(x_1)+f(x_2)+f(x_3)+f(x_4)]

B) Approximating from a table (possibly unequal widths)

Use this when the problem gives you values like f(0),f(1.2),f(2.0),f(0), f(1.2), f(2.0),\dots where spacing might not be constant.

  1. List the subintervals [xi1,xi][x_{i-1},x_i].
  2. Compute each width Δxi=xixi1\Delta x_i = x_i - x_{i-1}.
  3. Pick the correct height (left/right/midpoint) as instructed.
  4. Add: f(chosen x)Δxi\sum f(\text{chosen } x)\,\Delta x_i.

If widths are not equal, you cannot factor out a single Δx\Delta x.

C) Turning a sum into an integral (pattern recognition)

You’ll often see something like:

limni=1nf(a+iΔx)Δx\lim_{n\to\infty} \sum_{i=1}^n f\left(a + i\Delta x\right)\,\Delta x

Do this:

  1. Identify Δx\Delta x as something of the form:

    Δx=ban\Delta x = \frac{b-a}{n}

  2. Identify the sample point pattern inside f()f(\cdot) (left/right/midpoint form).

  3. Rewrite as:

    abf(x)dx\int_a^b f(x)\,dx

Quick pattern example

If

limni=1n1+(3in)23n\lim_{n\to\infty} \sum_{i=1}^n \sqrt{1+\left(\frac{3i}{n}\right)^2}\,\frac{3}{n}

then Δx=3n\Delta x = \frac{3}{n} so ba=3b-a=3. Also the input is 3in=iΔx\frac{3i}{n} = i\Delta x which matches right endpoints on [0,3][0,3]. So the integral is:

031+x2dx\int_0^3 \sqrt{1+x^2}\,dx


Key Formulas, Rules & Facts

Riemann sum types (equal widths)
MethodFormulaWhen to useNotes
Left Riemann (LRAM)Ln=i=1nf(xi1)ΔxL_n = \sum_{i=1}^n f(x_{i-1})\,\Delta x“left endpoints”xi1=a+(i1)Δxx_{i-1}=a+(i-1)\Delta x
Right Riemann (RRAM)Rn=i=1nf(xi)ΔxR_n = \sum_{i=1}^n f(x_i)\,\Delta x“right endpoints”xi=a+iΔxx_i=a+i\Delta x
Midpoint (MRAM)Mn=i=1nf(xi1+xi2)ΔxM_n = \sum_{i=1}^n f\left(\frac{x_{i-1}+x_i}{2}\right)\,\Delta x“midpoints”midpoints are halfway in each subinterval
General Riemann sumi=1nf(ci)Δxi\sum_{i=1}^n f(c_i)\,\Delta x_iunequal partitions, generic samplingci[xi1,xi]c_i\in[x_{i-1},x_i]
Trapezoidal Rule (AP loves this)
RuleFormulaWhen to useNotes
Trapezoidal (equal widths)Tn=Δx2[f(x0)+2i=1n1f(xi)+f(xn)]T_n = \frac{\Delta x}{2}\left[f(x_0)+2\sum_{i=1}^{n-1} f(x_i)+f(x_n)\right]“trapezoidal rule,” or estimate using trapezoidsendpoints counted once, interior twice
RelationshipTn=Ln+Rn2T_n = \frac{L_n+R_n}{2}quick computation/checktrue for equal-width partitions
Over/under-estimate rules (high-yield)

These are about approximation direction compared to the true integral.

If ff is increasing on [a,b][a,b]
  • LnL_n underestimates
  • RnR_n overestimates
If ff is decreasing on [a,b][a,b]
  • LnL_n overestimates
  • RnR_n underestimates
If ff is concave up on [a,b][a,b] (think “cup”)
  • TnT_n overestimates
  • MnM_n underestimates
If ff is concave down on [a,b][a,b]
  • TnT_n underestimates
  • MnM_n overestimates

These concavity rules are for trapezoids vs midpoints, not left vs right.

Sigma notation reminders you actually need
ExpressionMeaningCommon AP use
Δx=ban\Delta x = \frac{b-a}{n}width of each rectangleused inside limits as the factor outside/at the end
xi=a+iΔxx_i=a+i\Delta xright endpointshows up as f(a+iΔx)f\left(a+i\Delta x\right)
xi1=a+(i1)Δxx_{i-1}=a+(i-1)\Delta xleft endpointshows up as f(a+(i1)Δx)f\left(a+(i-1)\Delta x\right)
midpoint inputa+(i12)Δxa+\left(i-\frac12\right)\Delta xshows up as f(a+(i12)Δx)f\left(a+\left(i-\frac12\right)\Delta x\right)

Examples & Applications

Example 1: LRAM vs RRAM setup (function given)

Approximate 02x2dx\int_0^2 x^2\,dx with n=4n=4 using LRAM.

  • Δx=204=12\Delta x = \frac{2-0}{4} = \frac12
  • left endpoints: x0=0, x1=12, x2=1, x3=32x_0=0,\ x_1=\frac12,\ x_2=1,\ x_3=\frac32
  • LRAM:

L4=12[f(0)+f(12)+f(1)+f(32)]L_4 = \frac12\left[f(0)+f\left(\frac12\right)+f(1)+f\left(\frac32\right)\right]

Since f(x)=x2f(x)=x^2,

L4=12[02+(12)2+12+(32)2]L_4 = \frac12\left[0^2+\left(\frac12\right)^2+1^2+\left(\frac32\right)^2\right]

Key insight: because x2x^2 is increasing on [0,2][0,2], L4L_4 is an underestimate.

Example 2: Midpoint rule with a “midpoint-looking” expression

Approximate 26ln(x)dx\int_2^6 \ln(x)\,dx with n=4n=4 using MRAM.

  • Δx=624=1\Delta x = \frac{6-2}{4}=1
  • subintervals: [2,3],[3,4],[4,5],[5,6][2,3],[3,4],[4,5],[5,6]
  • midpoints: 2.5,3.5,4.5,5.52.5, 3.5, 4.5, 5.5

M4=1[ln(2.5)+ln(3.5)+ln(4.5)+ln(5.5)]M_4 = 1\,[\ln(2.5)+\ln(3.5)+\ln(4.5)+\ln(5.5)]

Key insight: midpoint uses the “half-step” idea: 2+(i12)12+\left(i-\frac12\right)\cdot 1.

Example 3: Convert a limit of a sum to an integral

Convert and evaluate:

limni=1n(1+2in)32n\lim_{n\to\infty} \sum_{i=1}^n \left(1+\frac{2i}{n}\right)^3 \cdot \frac{2}{n}

  • Recognize Δx=2n\Delta x = \frac{2}{n} so ba=2b-a=2.
  • The inside is 1+2in=1+iΔx1+\frac{2i}{n} = 1 + i\Delta x, which matches right endpoints on [1,3][1,3].

So this is:

13x3dx\int_1^3 x^3\,dx

Evaluate:

13x3dx=[x44]13=8114=20\int_1^3 x^3\,dx = \left[\frac{x^4}{4}\right]_1^3 = \frac{81-1}{4} = 20

Example 4: Table-based trapezoidal estimate (unequal widths)

Given:

xx0134
f(x)f(x)2513

Approximate 04f(x)dx\int_0^4 f(x)\,dx using trapezoids.

Compute by intervals:

  • On [0,1][0,1]: width 11, trapezoid area 12(2+5)1\frac{1}{2}(2+5)\cdot 1
  • On [1,3][1,3]: width 22, trapezoid area 12(5+1)2\frac{1}{2}(5+1)\cdot 2
  • On [3,4][3,4]: width 11, trapezoid area 12(1+3)1\frac{1}{2}(1+3)\cdot 1

Total:

12(7)+12(6)2+12(4)=3.5+6+2=11.5\frac{1}{2}(7) + \frac{1}{2}(6)\cdot 2 + \frac{1}{2}(4) = 3.5 + 6 + 2 = 11.5

Key insight: with unequal widths, treat each subinterval separately.


Common Mistakes & Traps

  1. Wrong Δx\Delta x

    • What goes wrong: you use Δx=ban1\Delta x = \frac{b-a}{n-1} or forget to divide by nn.
    • Why it’s wrong: nn is the number of rectangles/subintervals.
    • Fix: always write Δx=ban\Delta x = \frac{b-a}{n} first.
  2. Using the wrong endpoints (off-by-one error)

    • What goes wrong: for LRAM you accidentally include xnx_n, or for RRAM you include x0x_0.
    • Why it’s wrong: LRAM uses x0x_0 through xn1x_{n-1}; RRAM uses x1x_1 through xnx_n.
    • Fix: quickly list the first and last sample points before summing.
  3. Midpoint confusion (using endpoints instead of midpoints)

    • What goes wrong: you average the function values instead of using f(xi1+xi2)f\left(\frac{x_{i-1}+x_i}{2}\right).
    • Why it’s wrong: midpoint rule samples the function at the midpoint x-value.
    • Fix: compute midpoint x-values first, then plug into ff.
  4. Factoring out Δx\Delta x when widths are unequal

    • What goes wrong: you treat a table with irregular x-spacing like equal partitions.
    • Why it’s wrong: each rectangle has its own width Δxi\Delta x_i.
    • Fix: sum f(ci)Δxif(c_i)\Delta x_i interval-by-interval.
  5. Forgetting integrals are signed area

    • What goes wrong: you add magnitudes when the graph/table implies negative values.
    • Why it’s wrong: abf(x)dx\int_a^b f(x)\,dx counts below the x-axis as negative.
    • Fix: keep signs of f(x)f(x); only use absolute value if asked for total area.
  6. Over/under-estimate rules applied backward

    • What goes wrong: you say left sum overestimates for increasing functions.
    • Why it’s wrong: for increasing functions, left endpoints are smaller heights.
    • Fix: visualize: increasing graph → rectangles from the left sit below the curve.
  7. Misidentifying aa and bb when converting a sum to an integral

    • What goes wrong: you see Δx=2n\Delta x = \frac{2}{n} and assume [0,2][0,2] automatically.
    • Why it’s wrong: the interval depends on the “starting shift” inside f()f(\cdot).
    • Fix: match the input to a+iΔxa+i\Delta x or a+(i12)Δxa+\left(i-\frac12\right)\Delta x.
  8. Trapezoidal rule endpoint weights wrong

    • What goes wrong: you multiply every term by 22, or forget the halving.
    • Why it’s wrong: endpoints appear once, interior points twice.
    • Fix: memorize the pattern 1,2,2,,2,11,2,2,\dots,2,1 in brackets.

Memory Aids & Quick Tricks

Trick / mnemonicWhat it helps you rememberWhen to use it
“Increasing: Left Low, Right High”If ff increasing, LnL_n under, RnR_n overquick error direction
“Decreasing: Left High, Right Low”If ff decreasing, LnL_n over, RnR_n underquick error direction
“Cup up: Traps Top, Mids Miss low”Concave up: TnT_n over, MnM_n undertrapezoid vs midpoint direction
Weights pattern 1,2,2,,2,11,2,2,\dots,2,1Trapezoidal rule coefficientscomputing TnT_n fast
Midpoint input form a+(i12)Δxa+\left(i-\frac12\right)\Delta xRecognize midpoint Riemann sums in sigma formsum-to-integral problems
Tn=Ln+Rn2T_n = \frac{L_n+R_n}{2}Trapezoids are the average of left and right sumsquick check / speed

Quick Review Checklist

  • You can write the general form i=1nf(ci)Δxi\sum_{i=1}^n f(c_i)\Delta x_i and explain what cic_i and Δxi\Delta x_i mean.
  • For equal partitions, you instantly compute Δx=ban\Delta x = \frac{b-a}{n}.
  • You know exactly which x-values LRAM uses (x0x_0 to xn1x_{n-1}) and RRAM uses (x1x_1 to xnx_n).
  • You can find midpoint x-values and set up MnM_n correctly.
  • You remember trapezoidal rule and the endpoint weighting pattern.
  • You can determine under/over-estimates using increasing/decreasing and concavity rules.
  • You can convert limnΔx\lim_{n\to\infty} \sum \cdots \Delta x into abdx\int_a^b \cdots dx by matching Δx\Delta x and the inside sample-point pattern.
  • You don’t forget: definite integrals are signed unless the question asks for total area.

You’ve got this—Riemann sums are all about clean setup and pattern recognition.