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 \int_a^b f(x)\,dx by adding up areas of thin rectangles (or trapezoids) over a partition of [a,b]. On the AP Calc AB exam, Riemann sums show up in two main ways:

  • Approximating \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] into n subintervals:

  • a = x_0 < x_1 < \dots < x_n = b
  • widths \Delta x_i = x_i - x_{i-1}
  • choose a sample point c_i in each subinterval [x_{i-1},x_i]

Then a Riemann sum is:

\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:

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

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

Rectangles vs “area”

  • \int_a^b f(x)\,dx is signed area.
  • If f(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 \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 \int_a^b f(x)\,dx with n rectangles.

  1. Identify a, b, and n.

  2. Compute the width (equal partitions):

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

  3. Build partition points:

    x_i = a + i\Delta x

  4. Choose your sample points based on the method:

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

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

Mini-worked setup (generic)

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

  • \Delta x = \frac{b-a}{4}
  • right endpoints: x_1=a+\Delta x,\ x_2=a+2\Delta x,\ x_3=a+3\Delta x,\ x_4=b
  • RRAM:

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),\dots where spacing might not be constant.

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

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

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

You’ll often see something like:

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

Do this:

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

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

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

  3. Rewrite as:

    \int_a^b f(x)\,dx

Quick pattern example

If

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

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

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


Key Formulas, Rules & Facts

Riemann sum types (equal widths)

MethodFormulaWhen to useNotes
Left Riemann (LRAM)L_n = \sum_{i=1}^n f(x_{i-1})\,\Delta x“left endpoints”x_{i-1}=a+(i-1)\Delta x
Right Riemann (RRAM)R_n = \sum_{i=1}^n f(x_i)\,\Delta x“right endpoints”x_i=a+i\Delta x
Midpoint (MRAM)M_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 sum\sum_{i=1}^n f(c_i)\,\Delta x_iunequal partitions, generic samplingc_i\in[x_{i-1},x_i]

Trapezoidal Rule (AP loves this)

RuleFormulaWhen to useNotes
Trapezoidal (equal widths)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
RelationshipT_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 f is increasing on [a,b]
  • L_n underestimates
  • R_n overestimates
If f is decreasing on [a,b]
  • L_n overestimates
  • R_n underestimates
If f is concave up on [a,b] (think “cup”)
  • T_n overestimates
  • M_n underestimates
If f is concave down on [a,b]
  • T_n underestimates
  • M_n overestimates

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

Sigma notation reminders you actually need

ExpressionMeaningCommon AP use
\Delta x = \frac{b-a}{n}width of each rectangleused inside limits as the factor outside/at the end
x_i=a+i\Delta xright endpointshows up as f\left(a+i\Delta x\right)
x_{i-1}=a+(i-1)\Delta xleft endpointshows up as f\left(a+(i-1)\Delta x\right)
midpoint inputa+\left(i-\frac12\right)\Delta xshows up as f\left(a+\left(i-\frac12\right)\Delta x\right)

Examples & Applications

Example 1: LRAM vs RRAM setup (function given)

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

  • \Delta x = \frac{2-0}{4} = \frac12
  • left endpoints: x_0=0,\ x_1=\frac12,\ x_2=1,\ x_3=\frac32
  • LRAM:

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

Since f(x)=x^2,

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

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

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

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

  • \Delta x = \frac{6-2}{4}=1
  • subintervals: [2,3],[3,4],[4,5],[5,6]
  • midpoints: 2.5, 3.5, 4.5, 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+\left(i-\frac12\right)\cdot 1.

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

Convert and evaluate:

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

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

So this is:

\int_1^3 x^3\,dx

Evaluate:

\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:

x0134
f(x)2513

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

Compute by intervals:

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

Total:

\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 \Delta x

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

    • What goes wrong: for LRAM you accidentally include x_n, or for RRAM you include x_0.
    • Why it’s wrong: LRAM uses x_0 through x_{n-1}; RRAM uses x_1 through x_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\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 f.
  4. Factoring out \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 \Delta x_i.
    • Fix: sum f(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: \int_a^b f(x)\,dx counts below the x-axis as negative.
    • Fix: keep signs of 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 a and b when converting a sum to an integral

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

    • What goes wrong: you multiply every term by 2, or forget the halving.
    • Why it’s wrong: endpoints appear once, interior points twice.
    • Fix: memorize the pattern 1,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 f increasing, L_n under, R_n overquick error direction
“Decreasing: Left High, Right Low”If f decreasing, L_n over, R_n underquick error direction
“Cup up: Traps Top, Mids Miss low”Concave up: T_n over, M_n undertrapezoid vs midpoint direction
Weights pattern 1,2,2,\dots,2,1Trapezoidal rule coefficientscomputing T_n fast
Midpoint input form a+\left(i-\frac12\right)\Delta xRecognize midpoint Riemann sums in sigma formsum-to-integral problems
T_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 \sum_{i=1}^n f(c_i)\Delta x_i and explain what c_i and \Delta x_i mean.
  • For equal partitions, you instantly compute \Delta x = \frac{b-a}{n}.
  • You know exactly which x-values LRAM uses (x_0 to x_{n-1}) and RRAM uses (x_1 to x_n).
  • You can find midpoint x-values and set up M_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 \lim_{n\to\infty} \sum \cdots \Delta x into \int_a^b \cdots dx by matching \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.