Riemann Sum
Riemann Sum
An approximation of the definite integral
.
This is accomplished in a three-step procedure.
![Three-step Riemann Sum process: partition [a,b], draw rectangles with height f(c_k), sum areas: integral f(x)dx = lim(norm→0)...](r_assets/r94.gif)

See also
Partition, norm of a partition, indefinite integral, sigma notation
Key Formula
Sn=i=1∑nf(xi∗)Δxi
Where:
- Sn = The Riemann sum, which approximates the definite integral
- n = The number of subintervals in the partition of [a, b]
- f(xi∗) = The value of the function at the chosen sample point in the i-th subinterval
- Δxi = The width of the i-th subinterval; for equal-width partitions, Δx = (b − a)/n
- xi∗ = The sample point chosen in the i-th subinterval (left endpoint, right endpoint, midpoint, or any point)
Worked Example
Problem: Use a right Riemann sum with 4 subintervals to approximate the integral of f(x) = x² on [0, 4].
Step 1: Partition the interval [0, 4] into 4 equal subintervals and find Δx.
Δx=44−0=1
Step 2: Identify the subintervals and right endpoints. The subintervals are [0,1], [1,2], [2,3], [3,4], so the right endpoints are x₁* = 1, x₂* = 2, x₃* = 3, x₄* = 4.
Step 3: Evaluate f(x) = x² at each right endpoint.
f(1)=1,f(2)=4,f(3)=9,f(4)=16
Step 4: Multiply each function value by Δx and sum to form the Riemann sum.
S4=1(1)+4(1)+9(1)+16(1)=30
Step 5: Compare to the exact integral. The exact value is 64/3 ≈ 21.33, so the right Riemann sum of 30 is an overestimate because f(x) = x² is increasing on [0, 4].
∫04x2dx=364≈21.33
Answer: The right Riemann sum with 4 subintervals gives an approximation of 30.
Another Example
This example uses midpoints instead of right endpoints for the sample points, demonstrating how the choice of sample point significantly affects accuracy. Midpoint sums tend to be more accurate than left or right sums for the same number of subintervals.
Problem: Use a midpoint Riemann sum with 4 subintervals to approximate the integral of f(x) = x² on [0, 4].
Step 1: The partition and Δx are the same as before.
Δx=44−0=1
Step 2: Find the midpoint of each subinterval: [0,1], [1,2], [2,3], [3,4].
x1∗=0.5,x2∗=1.5,x3∗=2.5,x4∗=3.5
Step 3: Evaluate f(x) = x² at each midpoint.
f(0.5)=0.25,f(1.5)=2.25,f(2.5)=6.25,f(3.5)=12.25
Step 4: Form the Riemann sum.
S4=0.25(1)+2.25(1)+6.25(1)+12.25(1)=21
Answer: The midpoint Riemann sum with 4 subintervals gives 21, which is much closer to the exact value of 64/3 ≈ 21.33 than the right Riemann sum of 30.
Frequently Asked Questions
What is the difference between left, right, and midpoint Riemann sums?
They differ only in where the sample point is chosen within each subinterval. A left Riemann sum uses the left endpoint of each subinterval, a right sum uses the right endpoint, and a midpoint sum uses the point halfway between the two endpoints. For an increasing function, the left sum underestimates and the right sum overestimates the integral; the reverse is true for a decreasing function. The midpoint sum generally gives a better approximation than either.
How does increasing the number of subintervals affect a Riemann sum?
Increasing the number of subintervals n makes each rectangle thinner, allowing the rectangles to fit the curve more closely. As n approaches infinity, the Riemann sum converges to the exact value of the definite integral, provided the function is integrable (which all continuous functions are). This limit is, in fact, the formal definition of the definite integral.
When do you use a Riemann sum instead of the Fundamental Theorem of Calculus?
You use a Riemann sum when you cannot find an antiderivative in closed form, when you only have discrete data points rather than a formula, or when a problem specifically asks for an approximation. In practice, numerical methods like the trapezoidal rule and Simpson's rule—which are refinements of Riemann sum ideas—are widely used in science and engineering.
Riemann Sum vs. Definite Integral
| Riemann Sum | Definite Integral | |
|---|---|---|
| Definition | A finite sum of rectangular areas that approximates the area under a curve | The exact net area under a curve over an interval [a, b] |
| Formula | Σ f(xᵢ*)Δxᵢ for i = 1 to n | ∫ₐᵇ f(x) dx = limₙ→∞ Σ f(xᵢ*)Δx |
| Exactness | An approximation (finite number of rectangles) | Exact value (infinite limit of Riemann sums) |
| When to use | Numerical estimation, discrete data, or building conceptual understanding | When an antiderivative is available or the exact value is needed |
Why It Matters
Riemann sums are the conceptual foundation of the definite integral—every integral you compute in calculus is formally defined as a limit of Riemann sums. Understanding them gives you geometric intuition for why integration measures accumulated area (or accumulated change). They also appear directly in AP Calculus exam questions, where you may be given a table of values and asked to approximate an integral using left, right, or midpoint sums.
Common Mistakes
Mistake: Confusing which endpoint to use: using the right endpoint when the problem asks for a left Riemann sum, or vice versa.
Correction: For a left sum on subinterval [xᵢ₋₁, xᵢ], evaluate f at xᵢ₋₁. For a right sum, evaluate f at xᵢ. Carefully list your subintervals and sample points before computing.
Mistake: Forgetting to multiply each function value by the subinterval width Δx.
Correction: Each term in the sum is an area: height × width = f(xᵢ*) × Δx. If you omit Δx, you are summing function values rather than areas, and your answer will have the wrong magnitude.
Related Terms
- Definite Integral — The exact value a Riemann sum approximates
- Partition of an Interval — Divides [a, b] into subintervals for the sum
- Mesh — The width of the largest subinterval in a partition
- Indefinite Integral — Antiderivative used to evaluate definite integrals exactly
- Sigma Notation — Compact notation used to write Riemann sums
- Trapezoidal Rule — A more accurate numerical method based on trapezoids
- Fundamental Theorem of Calculus — Links definite integrals to antiderivatives
