Computing Riemann Sums
From Rectangles to Areas
How do you find the area of a region with curved boundaries? You can’t use a simple formula like length times width. The brilliant idea behind calculus is to approximate the curved region with rectangles, then make the approximation better and better.
A Riemann sum is exactly this: the total area of rectangles that approximate the region under a curve. By increasing the number of rectangles, the approximation improves. In the limit, as we use infinitely many infinitely thin rectangles, we get the exact area.
The key insight: A Riemann sum isn’t just a numerical approximation. It’s a fundamental way of thinking about accumulation. Every integral you’ll ever compute is, at its heart, a limit of Riemann sums.
Prerequisite Map
Quick Reference
| Property | Value |
|---|---|
| Concept | Integration |
| Course | MATH161 |
| Section | Stewart 4.2 |
| Difficulty | Intermediate |
| Time | ~20 minutes |
Key Concepts
Setting Up a Riemann Sum
To approximate $\int_a^b f(x)\,dx$ using $n$ rectangles:
Step 1: Divide the interval $[a,b]$ into $n$ equal subintervals.
The width of each subinterval is: $$\Delta x = \frac{b - a}{n}$$
The endpoints are: $$x_0 = a, \quad x_1 = a + \Delta x, \quad x_2 = a + 2\Delta x, \quad \ldots, \quad x_n = b$$
In general: $x_i = a + i \cdot \Delta x$
Step 2: Choose sample points in each subinterval $[x_{i-1}, x_i]$.
Step 3: Form the sum of rectangle areas: $$\sum_{i=1}^{n} f(x_i^*) \cdot \Delta x$$
where $x_i^*$ is the sample point in the $i$th subinterval.
Types of Riemann Sums
| Type | Sample Point | Formula for $x_i^*$ |
|---|---|---|
| Right Riemann Sum ($R_n$) | Right endpoint | $x_i^* = x_i = a + i\Delta x$ |
| Left Riemann Sum ($L_n$) | Left endpoint | $x_i^* = x_{i-1} = a + (i-1)\Delta x$ |
| Midpoint Sum ($M_n$) | Midpoint | $x_i^* = \bar{x}_i = \frac{x_{i-1} + x_i}{2}$ |
Visualizing Riemann Sums
For $f(x) = x^2$ on $[0, 2]$ with $n = 4$ (right endpoints):
y
|
4 + ■
| ■■■■■
3 + ■
| ■■■■■
2 + ■
| ■■■■■
1 + ■■■■■
|■■■■■
0 +----+----+----+----+→ x
0 0.5 1 1.5 2
Each rectangle has width $\Delta x = 0.5$ and height $f(x_i)$ where $x_i$ is the right endpoint.
The Riemann Sum Formula
$$R_n = \sum_{i=1}^{n} f(x_i) \Delta x = \sum_{i=1}^{n} f\left(a + i \cdot \frac{b-a}{n}\right) \cdot \frac{b-a}{n}$$
Important observation: For an increasing function:
- $L_n$ underestimates the area (rectangles fit inside)
- $R_n$ overestimates the area (rectangles extend beyond)
For a decreasing function, the opposite is true.
Physical Interpretation
Riemann sums model accumulated quantities:
- Distance from velocity: If $v(t)$ is velocity, then $\sum v(t_i^*) \Delta t$ approximates total distance
- Mass from density: If $\rho(x)$ is linear density, then $\sum \rho(x_i^*) \Delta x$ approximates total mass
- Work from force: If $F(x)$ is force, then $\sum F(x_i^*) \Delta x$ approximates total work
Practice Problems
For the Riemann sum used to approximate $\int_1^5 (2x+3)\,dx$ with $n = 8$ subintervals:
- What is $\Delta x$?
- What are the values $x_0, x_1, x_2$?
- If using right endpoints, what is $x_3^*$?
Compute the right Riemann sum $R_4$ for $f(x) = x^2 - 1$ on $[0, 2]$ using $n = 4$ subintervals.
For $f(x) = \sqrt{x}$ on $[1, 9]$ with $n = 4$:
- Compute the left Riemann sum $L_4$
- Compute the right Riemann sum $R_4$
- Which is an overestimate and which is an underestimate? Explain why.
The function $g(x) = x - 2$ changes sign on the interval $[0, 4]$.
- Compute $R_4$ (right Riemann sum with $n = 4$)
- Sketch the rectangles. Which have positive area? Negative area?
- Explain what your answer represents in terms of regions above and below the $x$-axis.
- Write the right Riemann sum for $\int_2^6 (x^3 + 1)\,dx$ using $n$ subintervals in sigma notation.
- Express this sum fully in terms of $n$ and $i$ (no $\Delta x$ or $x_i$).
- Use the summation formulas $\sum_{i=1}^n 1 = n$, $\sum_{i=1}^n i = \frac{n(n+1)}{2}$, $\sum_{i=1}^n i^2 = \frac{n(n+1)(2n+1)}{6}$, and $\sum_{i=1}^n i^3 = \left[\frac{n(n+1)}{2}\right]^2$ to write a closed-form expression for $R_n$.
Common Misconceptions
Riemann sums are merely an approximation method that becomes exact only with special functions.
This is the concept-image-conflicts-definition error. A Riemann sum with finitely many rectangles is always an approximation, but the exact definite integral is defined to be the limit of those sums, not a separate object that one occasionally approximates. For any continuous function, the limit exists and equals the same number regardless of which sample points are chosen. The finite sum is the draft; the limit is the definition.
Mastery Checklist
Mental Model
The Staircase Approximation: Imagine building a staircase that follows a curved hill. Each step (rectangle) has a fixed width but varies in height based on the hill at some point in that interval. A few wide steps give a rough approximation; many narrow steps follow the curve more closely. The Riemann sum is the total vertical material in your staircase. As steps get narrower and more numerous, your staircase becomes indistinguishable from the smooth hill.
Connections
Looking back:
- Sigma Notation provides the language for writing Riemann sums compactly
- Function Evaluation is needed to compute $f(x_i^*)$ at sample points
Looking ahead:
- The Definite Integral Definition is the limit of Riemann sums as $n \to \infty$
- The Fundamental Theorem of Calculus gives a faster way to evaluate integrals
- Numerical methods like the Trapezoidal Rule and Simpson’s Rule are refinements of Riemann sums
| Previous | Up | Next |
|---|---|---|
| Sigma Notation | Skills Index | Definite Integral Definition |
Last updated: 2026-01-22