Integrals with Riemann Sums for MATH 141
Exam Relevance for MATH 141
Computing integrals via Riemann sums is conceptual in MATH 141. May appear as one midterm question.
This skill appears on:
Understanding Riemann Sums
Before we had the Fundamental Theorem of Calculus, mathematicians needed a way to actually define what an integral means. You can't just say "find the area under a curve" without explaining how to calculate it. Riemann sums give us that definition — they show that an integral is really just a limit of adding up rectangle areas.
Even though we now have easier methods (like antiderivatives), understanding Riemann sums is important because:
- They explain why integrals work
- Some limits can only be evaluated by recognizing them as Riemann sums
- Numerical integration (what computers do) is based on this idea
The Core Idea
To find the area under a curve from $x = a$ to $x = b$:
- Divide the interval $[a, b]$ into $n$ equal pieces
- Build rectangles on each piece (using the function value at some point in each piece)
- Add up all the rectangle areas
- Take the limit as $n \to \infty$ (more and more thinner rectangles)
Key Components
Width of Each Rectangle
If you divide $[a, b]$ into $n$ equal parts:
$$\Delta x = \frac{b - a}{n}$$
Sample Points
The $i$-th subinterval goes from $x_{i-1}$ to $x_i$, where:
$$x_i = a + i \cdot \Delta x$$
You can use different points in each subinterval:
| Type | Sample Point $x_i^*$ | Description |
|---|---|---|
| Right endpoint | $x_i = a + i \cdot \Delta x$ | Uses right edge of each rectangle |
| Left endpoint | $x_{i-1} = a + (i-1) \cdot \Delta x$ | Uses left edge of each rectangle |
| Midpoint | $\frac{x_{i-1} + x_i}{2}$ | Uses center of each rectangle |
The Riemann Sum
We write $x_i^*$ (read "x-i-star") to represent the sample point in the $i$-th subinterval. The star is a placeholder — it could be the left endpoint, right endpoint, or midpoint. Your problem will tell you which one to use. Until then, we use the star to keep the formula general.
$$R_n = \sum_{i=1}^{n} f(x_i^*) \cdot \Delta x$$
This is the sum of all rectangle areas: height × width for each rectangle.
Play with this interactive graph to see Riemann sums in action! Adjust:
- $a$ and $b$: the left and right endpoints of the interval
- $n$: the number of rectangles (try increasing it to see the approximation improve)
- $c$: the sample point type (0 = left endpoint, 0.5 = midpoint, 1 = right endpoint)
Notice how each rectangle's area (height × width) contributes to the total sum, and how the approximation gets better as $n$ increases.
The Definite Integral
$$\int_a^b f(x) \, dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*) \cdot \Delta x$$
The integral is the limit of Riemann sums as the number of rectangles approaches infinity.
Useful Summation Formulas
When computing Riemann sums, you'll need these:
$$\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}$$
$$\sum_{i=1}^{n} i^3 = \left[\frac{n(n+1)}{2}\right]^2$$
Write a right-endpoint Riemann sum for $\int_0^3 x^2 \, dx$ with $n$ rectangles.
Step 1: Find $\Delta x$
$$\Delta x = \frac{b - a}{n} = \frac{3 - 0}{n} = \frac{3}{n}$$
Step 2: Find the right endpoints
$$x_i = a + i \cdot \Delta x = 0 + i \cdot \frac{3}{n} = \frac{3i}{n}$$
Step 3: Write $f(x_i)$
$$f(x_i) = x_i^2 = \left(\frac{3i}{n}\right)^2 = \frac{9i^2}{n^2}$$
Step 4: Write the Riemann sum
$$R_n = \sum_{i=1}^{n} f(x_i) \cdot \Delta x = \sum_{i=1}^{n} \frac{9i^2}{n^2} \cdot \frac{3}{n} = \sum_{i=1}^{n} \frac{27i^2}{n^3}$$
$$\boxed{R_n = \frac{27}{n^3} \sum_{i=1}^{n} i^2}$$
Compute $\int_0^2 x^2 \, dx$ using the definition (right endpoints).
Step 1: Set up
$\Delta x = \frac{2}{n}$, and $x_i = \frac{2i}{n}$
Step 2: Write the Riemann sum
$$R_n = \sum_{i=1}^{n} \left(\frac{2i}{n}\right)^2 \cdot \frac{2}{n} = \sum_{i=1}^{n} \frac{4i^2}{n^2} \cdot \frac{2}{n} = \frac{8}{n^3} \sum_{i=1}^{n} i^2$$
Step 3: Apply the summation formula
$$R_n = \frac{8}{n^3} \cdot \frac{n(n+1)(2n+1)}{6} = \frac{8n(n+1)(2n+1)}{6n^3}$$
Step 4: Simplify
$$R_n = \frac{4(n+1)(2n+1)}{3n^2} = \frac{4(2n^2 + 3n + 1)}{3n^2} = \frac{8n^2 + 12n + 4}{3n^2}$$
$$= \frac{8}{3} + \frac{4}{n} + \frac{4}{3n^2}$$
Step 5: Take the limit
$$\int_0^2 x^2 \, dx = \lim_{n \to \infty} R_n = \lim_{n \to \infty} \left(\frac{8}{3} + \frac{4}{n} + \frac{4}{3n^2}\right) = \frac{8}{3}$$
$$\boxed{\frac{8}{3}}$$
Evaluate $\lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^{n} \left(\frac{i}{n}\right)^2$.
Step 1: Recognize this as a Riemann sum
Compare to $\lim_{n \to \infty} \sum_{i=1}^{n} f(x_i) \cdot \Delta x$
Here: $\Delta x = \frac{1}{n}$ and $x_i = \frac{i}{n}$
So $f(x_i) = \left(\frac{i}{n}\right)^2 = x_i^2$, meaning $f(x) = x^2$
Step 2: Identify the interval
With $x_i = \frac{i}{n}$ for $i = 1, 2, \ldots, n$:
- The values range from $\frac{1}{n} \to 0$ to $\frac{n}{n} = 1$
This is a right Riemann sum on $[0, 1]$.
Step 3: Write as an integral and evaluate
$$\lim_{n \to \infty} \frac{1}{n} \sum_{i=1}^{n} \left(\frac{i}{n}\right)^2 = \int_0^1 x^2 \, dx$$
$$= \left[\frac{x^3}{3}\right]_0^1 = \frac{1}{3} - 0 = \boxed{\frac{1}{3}}$$
For $f(x) = x$ on $[0, 4]$ with $n = 4$ rectangles, compute both left and right Riemann sums.
Step 1: Find $\Delta x$ and partition points
$\Delta x = \frac{4-0}{4} = 1$
The partition points are: $x_0 = 0, x_1 = 1, x_2 = 2, x_3 = 3, x_4 = 4$
Step 2: Compute the left Riemann sum
Use left endpoints: $x_0, x_1, x_2, x_3$
$$L_4 = f(0) \cdot 1 + f(1) \cdot 1 + f(2) \cdot 1 + f(3) \cdot 1$$ $$= 0 + 1 + 2 + 3 = 6$$
Step 3: Compute the right Riemann sum
Use right endpoints: $x_1, x_2, x_3, x_4$
$$R_4 = f(1) \cdot 1 + f(2) \cdot 1 + f(3) \cdot 1 + f(4) \cdot 1$$ $$= 1 + 2 + 3 + 4 = 10$$
Step 4: Compare to actual area
$$\int_0^4 x \, dx = \frac{x^2}{2}\Big|_0^4 = 8$$
The left sum underestimates ($6 < 8$) and right sum overestimates ($10 > 8$) because $f(x) = x$ is increasing.
$$\boxed{L_4 = 6, \quad R_4 = 10}$$
Estimate $\int_0^2 x^3 \, dx$ using a midpoint Riemann sum with $n = 4$.
Step 1: Find $\Delta x$ and subintervals
$\Delta x = \frac{2-0}{4} = 0.5$
Subintervals: $[0, 0.5], [0.5, 1], [1, 1.5], [1.5, 2]$
Step 2: Find midpoints
$x_1^* = 0.25, \quad x_2^* = 0.75, \quad x_3^* = 1.25, \quad x_4^* = 1.75$
Step 3: Evaluate and sum
$$M_4 = \Delta x \cdot [f(0.25) + f(0.75) + f(1.25) + f(1.75)]$$ $$= 0.5 \cdot [(0.25)^3 + (0.75)^3 + (1.25)^3 + (1.75)^3]$$ $$= 0.5 \cdot [0.015625 + 0.421875 + 1.953125 + 5.359375]$$ $$= 0.5 \cdot 7.75 = \boxed{3.875}$$
Actual value: $\int_0^2 x^3 \, dx = \frac{x^4}{4}\Big|_0^2 = 4$
The midpoint sum (3.875) is quite close to the actual value (4).
True or False: As $n \to \infty$, left and right Riemann sums always converge to the same value for a continuous function.
True. For any continuous function on a closed interval $[a, b]$, the definite integral exists and equals the limit of any Riemann sum (left, right, midpoint, or any other choice of sample points).
The difference between left and right sums shrinks as $n$ increases, and both converge to $\int_a^b f(x) \, dx$.
True or False: If $f(x)$ is increasing on $[a, b]$, then the left Riemann sum underestimates the integral.
True. For an increasing function, the left endpoint of each subinterval is the minimum value on that subinterval. So each rectangle's height is less than (or equal to) the actual function values, giving an underestimate.
Similarly, the right Riemann sum would overestimate because it uses the maximum value on each subinterval.
True or False: The expression $\lim_{n \to \infty} \sum_{i=1}^{n} f(a + i\Delta x) \cdot \Delta x$ where $\Delta x = \frac{b-a}{n}$ equals $\int_a^b f(x) \, dx$.
True. This is exactly the definition of the definite integral using right endpoints:
- $\Delta x = \frac{b-a}{n}$ is the width of each rectangle
- $x_i = a + i\Delta x$ gives the right endpoints
- $f(x_i) \cdot \Delta x$ is each rectangle's area
- The sum adds all rectangles
- The limit as $n \to \infty$ defines the integral
Common Mistakes and Misunderstandings
❌ Mistake: Confusing $x_i$ with $i$
Wrong: Using $f(i)$ instead of $f(x_i)$ in the Riemann sum.
Why it's wrong: The variable $i$ is just a counter (1, 2, 3, ...). The actual $x$-value is $x_i = a + i \cdot \Delta x$.
Correct: Always substitute $x_i = a + i \cdot \frac{b-a}{n}$ into the function.
❌ Mistake: Forgetting that $\Delta x$ depends on $n$
Wrong: Treating $\Delta x$ as a constant when taking the limit.
Why it's wrong: $\Delta x = \frac{b-a}{n}$ contains $n$, so it affects how terms simplify when you take $\lim_{n \to \infty}$.
Correct: Always write out $\Delta x = \frac{b-a}{n}$ and simplify the entire expression before taking the limit.
❌ Mistake: Wrong limits when converting a limit to an integral
Wrong: Assuming every Riemann sum limit has bounds $[0, 1]$.
Why it's wrong: The bounds depend on how $\Delta x$ and $x_i$ are defined. Look at the structure carefully.
Correct: Identify $\Delta x$ and $x_i$ from the given limit. The interval is $[a, b]$ where $a$ is the smallest $x_i$ value and $b = a + n \cdot \Delta x$.
Riemann Sum
The sum of rectangle areas approximating the area under a curve. Divide [a,b] into n equal pieces, build rectangles using function values at sample points, and add up the areas.
Variables:
- $n$:
- number of rectangles
- $f(x_i^*)$:
- height of the i-th rectangle (function value at sample point)
- $\Delta x$:
- width of each rectangle, equal to (b-a)/n
- $x_i^*$:
- sample point in the i-th subinterval (left, right, or midpoint)
Definite Integral as Limit of Riemann Sums
The definite integral is defined as the limit of Riemann sums as the number of rectangles approaches infinity. This is the formal definition of the integral.
Variables:
- $a, b$:
- bounds of integration
- $n \to \infty$:
- take infinitely many infinitely thin rectangles
Rectangle Width
The width of each rectangle when dividing the interval [a,b] into n equal parts.
Variables:
- $b - a$:
- total length of the interval
- $n$:
- number of subintervals (rectangles)
Right Endpoint Sample Points
The right endpoint of the i-th subinterval. Use these as sample points for right Riemann sums.
Variables:
- $i$:
- subinterval number (1, 2, 3, ..., n)
- $a$:
- left bound of the interval
This skill is taught in the following courses. Create an account to access practice exercises and full course materials.