CALCULUS 2 • INTEGRATION FOUNDATIONS

Riemann Sum Approximations — Approximating Areas With Riemann Sums

Partitioning intervals and summing rectangular areas to approximate the definite integral of a function.

Historical Context & Motivation

The problem of computing areas enclosed by curves is one of the oldest in mathematics, predating modern calculus by millennia. Ancient mathematicians recognized that curved regions resist the straightforward length-times-width formula available for rectangles, and they devised increasingly clever strategies to approximate these elusive areas. The idea at the heart of every such strategy — exhaustion — is to fill the region with simpler shapes whose areas can be computed exactly, then refine those shapes until the approximation converges to the true value. This is precisely the intuition behind Riemann sums, the formal machinery that places integration on rigorous footing.

~250 BCE
Archimedes and the Method of Exhaustion
Archimedes approximated the area of a parabolic segment by inscribing and circumscribing sequences of triangles, effectively performing a geometric Riemann sum that converged to the exact area via what we now recognize as a limit argument.
1665–1676
Newton & Leibniz Develop Calculus
Both Newton and Leibniz independently formulated the Fundamental Theorem of Calculus, linking antiderivatives to areas. However, their definitions of integration relied on geometric intuition rather than formal analysis.
1823
Cauchy's Integral as a Limit of Sums
Augustin-Louis Cauchy defined the integral of a continuous function as the limit of sums of the form Σ f(xᵢ) Δxᵢ, anticipating the Riemann construction but restricting attention to continuous functions.
1854
Riemann's Habilitation Lecture
Bernhard Riemann generalized Cauchy's approach by allowing arbitrary sample points within each subinterval and considering functions with finitely many discontinuities. His definition of integrability — that the sums converge regardless of how sample points are chosen — became the standard for over a century.
1902
Lebesgue Integration Extends the Framework
Henri Lebesgue introduced measure-theoretic integration, extending integrability to a vastly larger class of functions. Nevertheless, the Riemann integral remains the pedagogical and computational starting point for understanding integration.

The central question that Riemann sums answer is deceptively simple: given a function f defined on a closed interval [a, b], how can we assign a precise numerical value to the signed area between the curve y = f(x) and the x-axis? Riemann's insight was to reduce this geometric question to an algebraic one — partition the interval into finitely many subintervals, erect a rectangle on each subinterval whose height is determined by sampling f, sum the areas, and then examine what happens as the partition becomes infinitely fine.

Core Principles & Definitions

Before diving into calculations, it is essential to understand the structural components of a Riemann sum. Every Riemann sum is built from three ingredients: a partition of the interval, a set of sample points, and the subinterval widths. Together, these elements determine the collection of rectangles whose areas sum to approximate the integral.

1

Partition of [a, b]

A partition P = {x₀, x₁, …, xₙ} divides the interval [a, b] into n subintervals [xᵢ₋₁, xᵢ], where a = x₀ < x₁ < … < xₙ = b. The subintervals need not be equal in width.
2

Subinterval Width Δxᵢ

Each subinterval has width Δxᵢ = xᵢ − xᵢ₋₁. For a regular (uniform) partition, Δx = (b − a)/n for every i. The mesh or norm ‖P‖ is the largest Δxᵢ.
3

Sample Points cᵢ

Within each subinterval [xᵢ₋₁, xᵢ], a sample point cᵢ is chosen. The choice of cᵢ gives rise to left sums (cᵢ = xᵢ₋₁), right sums (cᵢ = xᵢ), midpoint sums (cᵢ = (xᵢ₋₁ + xᵢ)/2), and more.
4

The Riemann Sum Sₙ

The Riemann sum is Sₙ = Σᵢ₌₁ⁿ f(cᵢ) Δxᵢ. Each term f(cᵢ) Δxᵢ represents the signed area of a rectangle with height f(cᵢ) and width Δxᵢ. Negative function values contribute negative area.
5

The Definite Integral as a Limit

If lim (‖P‖→0) Sₙ exists and is the same regardless of how sample points are chosen, the function is Riemann integrable on [a, b], and the limit equals ∫ₐᵇ f(x) dx.
KEY TAKEAWAY
Think of a Riemann sum as tiling a floor with rectangular mats of varying widths. Each mat's area equals its width times its height (the function value at the sample point). The more mats you use — and the narrower they become — the better the total mat area approximates the true floor area. The definite integral is what you get when the number of mats grows without bound and each mat becomes infinitesimally thin.

Visual Explanation — Left, Right, and Midpoint Sums

The diagram below illustrates the three most common Riemann sum types — left endpoint, right endpoint, and midpoint — applied to the function f(x) = x² + 1 on the interval [0, 4] with n = 4 subintervals. Notice how the choice of sample point shifts each rectangle's height, producing different approximations of the area under the curve.

Two side-by-side plots of f(x) = x² + 1 on [0, 4] with n = 4. Left: rectangles sample at the left endpoint of each subinterval, consistently under-approximating an increasing function (L₄ = 18). Right: rectangles sample at the right endpoint, over-approximating (R₄ = 34). The exact integral is 76/3 ≈ 25.33, which lies between the two sums.

In the left-endpoint diagram, each rectangle's height is determined by the function value at the left edge of its subinterval, so the first rectangle has height f(0) = 1, the second has height f(1) = 2, and so on. Because f is increasing on [0, 4], every left-endpoint rectangle sits entirely below the curve, producing an underestimate. Conversely, right-endpoint rectangles extend above the curve, yielding an overestimate. The midpoint rule — where each rectangle's height is f evaluated at the center of the subinterval — often provides a more balanced approximation because the over- and under-estimation regions partially cancel.

⚠️ Sign Convention
When f(cᵢ) < 0, the corresponding rectangle contributes negative area to the Riemann sum. This is why Riemann sums compute signed area: regions below the x-axis subtract from the total. If you need the total geometric area, you must integrate |f(x)| instead.

Mathematical Framework

We now formalize the Riemann sum construction. Let f be a bounded function on the closed interval [a, b]. A partition P of [a, b] is a finite set of points a = x₀ < x₁ < x₂ < … < xₙ = b. For each i = 1, 2, …, n, the width of the i-th subinterval is Δxᵢ = xᵢ − xᵢ₋₁, and a sample point cᵢ ∈ [xᵢ₋₁, xᵢ] is selected.

GENERAL RIEMANN SUM
Sₙ = Σᵢ₌₁ⁿ f(cᵢ) · Δxᵢ
where f(cᵢ) is the function value at the sample point in the i-th subinterval, and Δxᵢ = xᵢ − xᵢ₋₁ is the width of that subinterval.

For most computational work in this course, we employ a regular partition, where every subinterval has the same width. This simplification allows us to factor Δx out of the summation.

UNIFORM SUBINTERVAL WIDTH
Δx = (b − a) / n
With a regular partition, xᵢ = a + i · Δx for i = 0, 1, …, n.
LEFT RIEMANN SUM
Lₙ = Σᵢ₌₁ⁿ f(xᵢ₋₁) · Δx = Δx · Σᵢ₌₀ⁿ⁻¹ f(a + i · Δx)
Each rectangle's height is the function value at the left endpoint of its subinterval.
RIGHT RIEMANN SUM
Rₙ = Σᵢ₌₁ⁿ f(xᵢ) · Δx = Δx · Σᵢ₌₁ⁿ f(a + i · Δx)
Each rectangle's height is the function value at the right endpoint of its subinterval.
MIDPOINT RIEMANN SUM
Mₙ = Σᵢ₌₁ⁿ f((xᵢ₋₁ + xᵢ)/2) · Δx
Each rectangle's height is the function value at the midpoint of its subinterval. This often yields a more accurate approximation than left or right sums with the same n.

The definite integral is defined as the common limit of all these sums (and indeed any valid choice of sample points) as n → ∞ (equivalently, as ‖P‖ → 0):

DEFINITE INTEGRAL AS A LIMIT
∫ₐᵇ f(x) dx = lim(n→∞) Σᵢ₌₁ⁿ f(cᵢ) · Δx
provided the limit exists and is independent of the choice of sample points. A bounded function on [a, b] with at most finitely many discontinuities is Riemann integrable.

Types of Riemann Sums & Error Analysis

Understanding when a Riemann sum over- or under-approximates the integral is critical for bounding errors without computing the exact integral. The behavior depends on both the monotonicity and concavity of the function. The table below summarizes the over/under behavior for the three standard sum types when f is positive.

Over/under behavior assumes f(x) > 0 on [a, b].
Sum Typef Increasingf Decreasing
Left Endpoint LₙUnderestimateOverestimate
Right Endpoint RₙOverestimateUnderestimate
Midpoint MₙDepends on concavityDepends on concavity
As the number of subintervals n increases from 2 to 4 to 8, the left Riemann sum L₍ₙ₎ for f(x) = x² + 1 on [0, 4] converges toward the exact value 76/3 ≈ 25.33. The white gaps between the rectangles and the curve — representing the approximation error — shrink with each refinement. In the limit as n → ∞, the rectangles fill the region exactly.

For a function with a continuous first derivative on [a, b], the error of the left (or right) Riemann sum with n subintervals is bounded by |Eₙ| ≤ M₁(b − a)²/(2n), where M₁ = max|f′(x)| on [a, b]. This shows that the error decreases like O(1/n) — doubling the number of rectangles roughly halves the error. For the midpoint sum applied to a function with a continuous second derivative, the error bound improves to |Eₙ| ≤ M₂(b − a)³/(24n²), where M₂ = max|f″(x)|, yielding O(1/n²) convergence. This quadratic improvement is one reason the midpoint rule is often preferred in numerical applications.

📐 Upper and Lower Sums
Riemann also defined upper sums U(P) = Σ Mᵢ Δxᵢ and lower sums L(P) = Σ mᵢ Δxᵢ, where Mᵢ and mᵢ are the supremum and infimum of f on the i-th subinterval. A bounded function is Riemann integrable if and only if inf U(P) = sup L(P) over all partitions P. For continuous functions on closed intervals, this condition is always satisfied.

Worked Example

Let us compute the left, right, and midpoint Riemann sums for f(x) = x³ on the interval [1, 3] using n = 4 subintervals, then compare each approximation with the exact integral.

Riemann Sums for f(x) = x³ on [1, 3] with n = 4
1
Step 1 — Compute Δx and Partition PointsWith a = 1, b = 3, and n = 4, the uniform subinterval width is Δx = (3 − 1)/4 = 0.5. The partition points are x₀ = 1, x₁ = 1.5, x₂ = 2, x₃ = 2.5, x₄ = 3.
Δx = 0.5; partition: {1, 1.5, 2, 2.5, 3}
2
Step 2 — Left Riemann Sum (L₄)Sample at left endpoints: c₁ = 1, c₂ = 1.5, c₃ = 2, c₄ = 2.5. Evaluate f at each: f(1) = 1, f(1.5) = 3.375, f(2) = 8, f(2.5) = 15.625. Then L₄ = 0.5 × (1 + 3.375 + 8 + 15.625) = 0.5 × 28 = 14.
L₄ = 14.000
3
Step 3 — Right Riemann Sum (R₄)Sample at right endpoints: c₁ = 1.5, c₂ = 2, c₃ = 2.5, c₄ = 3. Evaluate f: f(1.5) = 3.375, f(2) = 8, f(2.5) = 15.625, f(3) = 27. Then R₄ = 0.5 × (3.375 + 8 + 15.625 + 27) = 0.5 × 54 = 27.
R₄ = 27.000
4
Step 4 — Midpoint Riemann Sum (M₄)Sample at midpoints: c₁ = 1.25, c₂ = 1.75, c₃ = 2.25, c₄ = 2.75. Evaluate f: f(1.25) = 1.953125, f(1.75) = 5.359375, f(2.25) = 11.390625, f(2.75) = 20.796875. Then M₄ = 0.5 × (1.953125 + 5.359375 + 11.390625 + 20.796875) = 0.5 × 39.5 = 19.75.
M₄ = 19.750
5
Step 5 — Compare with the Exact IntegralThe exact value is ∫₁³ x³ dx = [x⁴/4]₁³ = 81/4 − 1/4 = 80/4 = 20. Our three approximations are L₄ = 14 (30% under), R₄ = 27 (35% over), and M₄ = 19.75 (1.25% under). Notice that (L₄ + R₄)/2 = 20.5, which is the trapezoidal sum — and the midpoint sum is closer to the exact answer than the trapezoidal sum, consistent with its superior error bound for smooth functions.
Exact integral = 20. Midpoint sum (M₄ = 19.75) is the most accurate.

Strengths, Limitations, & Comparisons

Riemann sums are foundational but not the only approach to numerical integration. In practice, the choice between Riemann sum variants and more sophisticated rules depends on the desired accuracy, the smoothness of the integrand, and computational cost. The following table provides a concise comparison.

Comparison of numerical integration methods for smooth integrands.
MethodError OrderStrengthsLimitations
Left / Right SumO(1/n)Simplest to implement; guaranteed over/under bounds for monotone functionsSlowest convergence; biased (consistently over- or under-estimates for monotone f)
Midpoint SumO(1/n²)More accurate than left/right; partial error cancellation due to symmetric samplingRequires evaluating f at non-partition points; still piecewise-constant approximation
Trapezoidal RuleO(1/n²)Average of left and right; uses linear interpolation within subintervalsSame order as midpoint; slightly less accurate for concave-up/down functions
Simpson's RuleO(1/n⁴)Uses parabolic interpolation; extremely accurate for smooth functionsRequires n to be even; more complex formula; overkill for rough functions
KEY TAKEAWAY
Riemann sums are to integration what pixel grids are to digital images. A low-resolution image (small n) is blocky and inaccurate, but increasing the pixel count (larger n) produces a sharper picture that converges to the continuous original. More advanced methods like Simpson's rule are akin to using vector graphics — they capture curvature information directly, achieving high fidelity with fewer data points. Nonetheless, the pixelated Riemann sum remains the conceptual foundation upon which all these improvements are built.

Connection to the Definite Integral & Beyond

The Riemann sum is not merely a computational tool — it is the very definition of the definite integral for Riemann-integrable functions. Understanding how the finite sum transitions to the integral is essential for grasping subsequent topics in Calculus 2, including improper integrals, numerical integration techniques, and applications such as arc length, surface area, and work. The table below highlights the progression from Riemann sums to more advanced integration concepts.

From finite sums to the broader integration landscape.
Riemann Sum ConceptAdvanced ExtensionKey Difference
Finite partition of [a, b]Definite integral ∫ₐᵇ f(x) dxLimit as n → ∞ replaces finite sum with exact value
Uniform Δx = (b−a)/nAdaptive quadrature methodsSubinterval widths adapt to function behavior, concentrating effort where f varies rapidly
Sum Σ f(cᵢ) Δxᵢ for bounded fLebesgue integrationPartitions the range of f rather than the domain; handles far more general functions
Rectangles approximate areaApplications (volume, arc length, work)Same Riemann sum philosophy applied to different geometric or physical quantities

The Fundamental Theorem of Calculus (FTC) provides the crucial bridge: if F is an antiderivative of f on [a, b], then ∫ₐᵇ f(x) dx = F(b) − F(a). The FTC means we rarely need to compute a Riemann sum limit directly in practice — but the Riemann sum formulation remains indispensable for setting up integrals in applied contexts. Whenever you slice a solid into cross-sections, decompose a force over a displacement, or partition a probability distribution, you are implicitly constructing a Riemann sum whose limit yields the integral you need.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the left Riemann sum underestimates the integral of a strictly increasing, positive function on [a, b], while the right Riemann sum overestimates it. What happens if the function is strictly decreasing instead?
PROBLEM 2BASIC CALCULATION
Compute the right Riemann sum R₅ for f(x) = 2x + 3 on [0, 5] using n = 5 equal subintervals. Then compute the exact integral and find the absolute error.
PROBLEM 3INTERMEDIATE
For f(x) = sin(x) on [0, π], compute the midpoint Riemann sum M₄ using n = 4 equal subintervals. Give your answer to four decimal places.
PROBLEM 4APPLIED
A car's velocity v(t) (in m/s) is recorded at 2-second intervals over 10 seconds: v(0) = 0, v(2) = 5, v(4) = 12, v(6) = 18, v(8) = 22, v(10) = 25. Use a left Riemann sum and a right Riemann sum to estimate the total distance traveled. Then average the two to obtain a trapezoidal estimate.
PROBLEM 5CRITICAL THINKING
Prove that for a general Riemann-integrable function f on [a, b] with a regular partition, the relationship Rₙ − Lₙ = Δx · [f(b) − f(a)] holds. Use this to argue that if f(a) = f(b), then Lₙ = Rₙ for all n.

Summary

A Riemann sum approximates the area under a curve by partitioning the interval [a, b] into n subintervals, erecting a rectangle on each subinterval with height determined by a sample point, and summing the resulting areas: Sₙ = Σ f(cᵢ) Δxᵢ. The three standard choices — left endpoint, right endpoint, and midpoint — yield different approximations whose accuracy depends on the function's monotonicity, concavity, and the number of subintervals n.

As n → ∞ (or equivalently, as the mesh ‖P‖ → 0), the Riemann sum converges to the definite integral ∫ₐᵇ f(x) dx, provided f is Riemann integrable. Left and right sums exhibit O(1/n) error, while the midpoint sum achieves O(1/n²) error. Mastering Riemann sums provides the conceptual scaffolding for the Fundamental Theorem of Calculus, numerical integration techniques like Simpson's rule, and the myriad applications of integration throughout science and engineering.

Varsity Tutors • Calculus 2 • Riemann Sum Approximations — Approximating Areas With Riemann Sums