01 / 21

Riemann Sum
Approximations

Learn how to approximate the area under a curve by partitioning intervals into rectangles: left, right, and midpoint sums.

AP Calculus

What Is a Riemann Sum?

A Riemann sum is a method for approximating the total area between a function \( f(x) \) and the \( x \)-axis over an interval \( [a, b] \). We divide the interval into \( n \) subintervals, build rectangles on each one, and add up their areas.

Why Riemann Sums Matter

Foundation of Integration
The definite integral is defined as the limit of Riemann sums: \( \int_a^b f(x)\,dx = \lim_{n \to \infty} S_n \).
Real Applications
Used in physics (work, displacement), engineering (numerical integration), and data science (discrete approximations).
Building Intuition
They give you a geometric feel for what integration actually computes: accumulated area under a curve.

Visualizing the Area Problem

Consider the area under \( f(x) = x^2 \) from \( x = 0 \) to \( x = 3 \). The curve is not a simple shape, so we approximate with rectangles.

x y 0 1 2 3 0 3 6 9
\( f(x) = x^2 \)
Area = ?

Three Types of Riemann Sums

Left Riemann Sum
Sample at the left endpoint of each subinterval: \( x_i^* = a + (i-1)\Delta x \)
Right Riemann Sum
Sample at the right endpoint of each subinterval: \( x_i^* = a + i\,\Delta x \)
Midpoint Sum
Sample at the midpoint: \( x_i^* = a + \left(i - \tfrac{1}{2}\right)\Delta x \)

Left vs Right Riemann Sums

Left Sum (n=4) 0 0.5 1 1.5 2 Right Sum (n=4) 0 0.5 1 1.5 2

The Formal Definition

Given a function \( f \) on \( [a, b] \), partition the interval into \( n \) equal subintervals of width \( \Delta x = \frac{b-a}{n} \). Then:

L
Left Sum: \( L_n = \sum_{i=1}^{n} f(a + (i-1)\,\Delta x) \cdot \Delta x \)
R
Right Sum: \( R_n = \sum_{i=1}^{n} f(a + i\,\Delta x) \cdot \Delta x \)
M
Midpoint Sum: \( M_n = \sum_{i=1}^{n} f\!\left(a + \left(i - \tfrac{1}{2}\right)\Delta x\right) \cdot \Delta x \)

Over vs Under Estimation

Scenario Left Sum Right Sum
\( f \) is increasing Underestimate Overestimate
\( f \) is decreasing Overestimate Underestimate
\( f \) is concave up Midpoint underestimates
\( f \) is concave down Midpoint overestimates

How to Compute a Riemann Sum

1
Identify the interval and \( n \). Find \( a \), \( b \), and the number of subintervals \( n \).
2
Compute \( \Delta x \). Calculate \( \Delta x = \frac{b - a}{n} \).
3
List the sample points. Determine \( x_i^* \) for each subinterval (left, right, or midpoint).
4
Evaluate \( f(x_i^*) \). Plug each sample point into the function.
5
Sum it up. Compute \( S_n = \Delta x \cdot \bigl[f(x_1^*) + f(x_2^*) + \cdots + f(x_n^*)\bigr] \).

Example 1: Left Sum of \( f(x) = x^2 \)

Approximate \( \int_0^2 x^2\,dx \) using a left Riemann sum with \( n = 4 \).

1
\( \Delta x = \frac{2 - 0}{4} = 0.5 \)
2
Left endpoints: \( x = 0, 0.5, 1, 1.5 \)
3
\( f(0) = 0, \; f(0.5) = 0.25, \; f(1) = 1, \; f(1.5) = 2.25 \)
4
\( L_4 = 0.5(0 + 0.25 + 1 + 2.25) = 0.5 \times 3.5 = \mathbf{1.75} \)

Example 2: Right Sum of \( f(x) = x^2 \)

Same setup: \( \int_0^2 x^2\,dx \), now with a right Riemann sum, \( n = 4 \).

1
Right endpoints: \( x = 0.5, 1, 1.5, 2 \)
2
\( f(0.5) = 0.25, \; f(1) = 1, \; f(1.5) = 2.25, \; f(2) = 4 \)
3
\( R_4 = 0.5(0.25 + 1 + 2.25 + 4) = 0.5 \times 7.5 = \mathbf{3.75} \)

Example 3: Midpoint Sum of \( f(x) = x^2 \)

Same integral, now with the midpoint Riemann sum, \( n = 4 \).

1
Midpoints: \( x = 0.25, 0.75, 1.25, 1.75 \)
2
\( f(0.25) = 0.0625, \; f(0.75) = 0.5625, \; f(1.25) = 1.5625, \; f(1.75) = 3.0625 \)
3
\( M_4 = 0.5(0.0625 + 0.5625 + 1.5625 + 3.0625) = 0.5 \times 5.25 = \mathbf{2.625} \)

Visualizing the Midpoint Sum

0 0.5 1 1.5 2 0.25 0.75 1.25 1.75

More Rectangles = Better Accuracy

As we increase \( n \), the width \( \Delta x \) shrinks and the rectangles fit the curve more tightly. Let's see the left sum for \( \int_0^2 x^2\,dx \):

\( n \) \( L_n \) \( R_n \) \( M_n \) Exact
4 1.750 3.750 2.625 2.667
10 2.280 3.080 2.660 2.667
100 2.627 2.707 2.667 2.667
1000 2.663 2.671 2.667 2.667

Common Mistakes

✕ Wrong Endpoints
Using right endpoints for a left sum (or vice versa). Always check which type is requested.
✕ Forgetting to Multiply by \( \Delta x \)
Summing the function values without multiplying by the width of each subinterval.
✕ Over/Under Confusion
Assuming left always underestimates. It depends on whether the function is increasing or decreasing.

Summary Comparison

Property Left Right Midpoint
Sample Point Left endpoint Right endpoint Center of interval
Index Range \( i = 1 \) to \( n \) \( i = 1 \) to \( n \) \( i = 1 \) to \( n \)
Accuracy Least Least Best (for same \( n \))
Relationship \( L_n + R_n = 2 \cdot T_n \) (Trapezoidal) Often closer to exact

Question 1 of 5

What is the left Riemann sum for \( f(x) = 3x \) on \( [0, 4] \) with \( n = 4 \)?

Question 2 of 5

For a decreasing function on \( [a, b] \), the left Riemann sum will always be:

Question 3 of 5

Compute the right Riemann sum for \( f(x) = x^2 + 1 \) on \( [0, 2] \) with \( n = 4 \).

Question 4 of 5

If \( L_n = 5.2 \) and \( R_n = 6.8 \) for some function on an interval, what is the Trapezoidal approximation \( T_n \)?

Question 5 of 5

Which Riemann sum type generally gives the most accurate approximation for a given \( n \)?