Riemann Sums and Definite Integrals

Riemann sums approximate the area under a curve by summing the areas of many thin rectangles; the definite integral is the exact limit of this sum as the rectangles become infinitely thin. In words: equals the signed area between and the -axis on . Applies to continuous (and most piecewise-continuous) functions on a closed interval. Formalized by Bernhard Riemann (1854), building on Newton, Leibniz, and Cauchy.

A Riemann sum is a finite approximation of the area trapped between a function's graph and the horizontal axis, obtained by chopping the interval into pieces and stacking rectangles. The definite integral is what this sum converges to as the chopping becomes infinitely fine — a single number measuring signed accumulated area. This matters because integration unifies area, distance, work, probability, and countless accumulation problems into one operation, and the Fundamental Theorem of Calculus ties it to the derivative. The surprising fact: a process built from crude rectangles produces exact answers like or , and an integral can exist even for functions with infinitely many discontinuities.

The Core Insight

You cannot directly compute the area under a curved boundary, but you can compute the area of a rectangle. So replace the curve with a staircase of rectangles you understand, then crush the staircase down by using more and more, thinner and thinner rectangles. If the total rectangle-area settles toward one number no matter how you slice or where you sample, that number is the definite integral. Integration is controlled, exact approximation.

Formal Statement

Partition of an Interval

A partition of a closed interval is a finite set of points

1
⟳a partition simply lists the cut points; the subintervals are .

The -th subinterval is with width

2
⟳width = right endpoint minus left endpoint.

The norm (or mesh) of the partition is the width of the widest subinterval:

3
⟳the mesh measures the coarseness of the slicing; small forces every piece to be thin.

Riemann Sum

Given a function defined on , a partition , and a choice of sample point in each subinterval, the corresponding Riemann sum is

4
⟳each term is (height at the sample point) × (width) = area of one rectangle; sum them.

Symbols: is the rectangle's height (negative where ), its width, the number of rectangles. Special sample choices yield named sums:

  • Left sum : take .
  • Right sum : take .
  • Midpoint sum : take .
  • Upper sum / lower sum : take the supremum / infimum of on each subinterval.

For a regular (uniform) partition every subinterval has equal width:

5
⟳split of length into equal pieces; the -th cut sits widths past .

The right Riemann sum on a uniform partition then becomes the workhorse formula:

6
⟳substitute the uniform and right sample point into equation [4].

The Definite Integral

The function is Riemann integrable on if there is a number such that the Riemann sums approach as the mesh shrinks to zero — regardless of the partitions or sample points chosen. That number is the definite integral:

7
⟳the integral sign is an elongated "S" for Sum; is the limiting form of as the width becomes infinitesimal.

Here is the lower limit, the upper limit, the integrand, and marks the variable of integration. The variable is a dummy: .

Integrability of Continuous Functions

If is continuous on , then is Riemann integrable on . More generally, a bounded function on is Riemann integrable if and only if its set of discontinuities has measure zero (Lebesgue's criterion). Monotonic functions are always integrable, even with jumps.

The Fundamental Theorem of Calculus, Part 2

If is continuous on and is any antiderivative of (so ), then

8
⟳define ; FTC Part 1 gives , so and differ by a constant, which cancels in .

This is the master shortcut: it lets you skip the limit of sums entirely once you can find an antiderivative.

Why It Holds / Derivation

Computing $\int_0^1 x^2\,dx$ from the definition

We evaluate the definite integral directly as a limit of right Riemann sums, with no antiderivative shortcut, to show the machinery works.

Step 1 — Set up the uniform partition. With , , and right endpoints . Step 2 — Write the Riemann sum. Using [6] with :
9
⟳pull the constant out of the sum since it does not depend on .
Step 3 — Apply the sum-of-squares formula. Use the closed form :
10
⟳substitute the closed form and cancel one factor of .
Step 4 — Expand and take the limit. Multiply out the numerator: , so
11
⟳divide each term by .
Step 5 — Conclude. As the last two terms vanish:
12
⟳ and , leaving only .

The same answer follows instantly from [8] since gives — confirming the limit is exact, not approximate.

:::svg[Right Riemann sum approximating the area under on with rectangles. Each rectangle's height is set by the curve at its right edge.]

<svg viewBox="0 0 460 320" xmlns="http://www.w3.org/2000/svg">
<rect width="460" height="320" fill="#0a0e17"/>
<!-- axes -->
<line x1="60" y1="270" x2="430" y2="270" stroke="#94a3b8" stroke-width="1.5"/>
<line x1="60" y1="270" x2="60" y2="40" stroke="#94a3b8" stroke-width="1.5"/>
<text x="435" y="274" fill="#e2e8f0" font-size="13">x</text>
<text x="48" y="46" fill="#e2e8f0" font-size="13">y</text>
<!-- rectangles: x from 0..1 mapped to 60..360 (300 px), y=x^2 mapped height *200 -->
<!-- i=1: x=0.2 h=0.04 ; i=2: x=0.4 h=0.16 ; i=3 x=0.6 h=0.36 ; i=4 x=0.8 h=0.64 ; i=5 x=1.0 h=1.0 -->
<rect x="60"  y="262" width="60" height="8"   fill="#d4a853" fill-opacity="0.25" stroke="#d4a853"/>
<rect x="120" y="238" width="60" height="32"  fill="#d4a853" fill-opacity="0.25" stroke="#d4a853"/>
<rect x="180" y="198" width="60" height="72"  fill="#d4a853" fill-opacity="0.25" stroke="#d4a853"/>
<rect x="240" y="142" width="60" height="128" fill="#d4a853" fill-opacity="0.25" stroke="#d4a853"/>
<rect x="300" y="70"  width="60" height="200" fill="#d4a853" fill-opacity="0.25" stroke="#d4a853"/>
<!-- curve y=x^2 -->
<path d="M60,270 Q210,270 360,70" fill="none" stroke="#d4a853" stroke-width="2.5"/>
<!-- precise sampled curve via polyline -->
<polyline points="60,270 90,267 120,265 150,261 180,254 210,246 240,236 270,224 300,210 330,194 360,70"
 fill="none" stroke="#d4a853" stroke-width="0"/>
<!-- ticks/labels -->
<line x1="360" y1="270" x2="360" y2="276" stroke="#94a3b8"/>
<text x="356" y="290" fill="#e2e8f0" font-size="12">1</text>
<text x="54" y="290" fill="#e2e8f0" font-size="12">0</text>
<line x1="60" y1="70" x2="56" y2="70" stroke="#94a3b8"/>
<text x="44" y="74" fill="#e2e8f0" font-size="12">1</text>
<text x="300" y="60" fill="#d4a853" font-size="13">f(x)=x²</text>
<text x="120" y="310" fill="#94a3b8" font-size="11">each width Δx = 1/5</text>
</svg>

Building Intuition

Picture filling a curved swimming pool with stacked bricks of equal width. The bricks can't perfectly hug the curved boundary, so a right sum on an increasing function overshoots (bricks poke above the curve) and a left sum undershoots. The genuine area is sandwiched between them. As you switch to thinner bricks, the overshoot and undershoot shrink toward each other, squeezing onto a single number — the integral.

The signed area idea is the second key. Where dips below the axis, its rectangles have negative height, so they subtract. Thus : the positive hump from to exactly cancels the negative trough from to . An integral is not "how much paint," it's "area above minus area below."

The third intuition is accumulation. If is your speed at time , each rectangle is approximately "speed × little time = little distance." Summing gives total distance, and the limit gives it exactly. The integral accumulates a rate into a total — which is exactly why it inverts the derivative.

Bernhard Riemann | 1826–1866

Georg Friedrich Bernhard Riemann, a student of Gauss at Göttingen, gave the first rigorous, general definition of the integral in his 1854 Habilitationsschrift on trigonometric series. Earlier, Cauchy had defined integrals only for continuous functions using left endpoints; Riemann's leap was to allow arbitrary sample points and arbitrary partitions and to demand the limit exist independent of those choices. This made it possible to ask precisely which functions are integrable — including badly discontinuous ones arising in Fourier analysis. Riemann is even more famous for Riemannian geometry (the mathematical bedrock of general relativity) and the still-unsolved Riemann Hypothesis. He died of tuberculosis at 39.

Worked Examples

Estimating $\int_1^3 \frac{1}{x}\,dx$ with a midpoint sum, $n=4$

Given: , interval , subintervals. Step 1 — Width. . Step 2 — Subintervals and midpoints. give midpoints . Step 3 — Heights. . Step 4 — Midpoint sum.
13
⟳factor the common width out of all four rectangle areas.
. Step 5 — Compare to the exact value .

The midpoint rule already lands within 1% using just 4 rectangles — far better than a left or right sum of the same .

Distance from velocity via a Riemann sum

Given: a cart's velocity (m/s) sampled every 2 s:

| (s) | 0 | 2 | 4 | 6 | 8 | |---|---|---|---|---|---| | (m/s) | 0 | 5 | 8 | 9 | 9 |

We want total distance over .

Step 1 — Width. Each gap is s. Step 2 — Left Riemann sum (uses left endpoints ):
14
⟳each term is "velocity at the interval's start × time interval" = a lower-end distance estimate.
m. Step 3 — Right Riemann sum (uses ):
15
⟳shift the sample to each interval's right end; for increasing this over-estimates.
Step 4 — Best simple estimate (trapezoid = average).

The true area lies between the left and right sums because is increasing.

Common Misconceptions

The integral is not the area unless . is signed area. To get the geometric (total) area between the curve and the axis you must integrate , splitting at the zeros: . For on , the integral is but the total area is . More misconceptions:
  • is not "times " — it is a tag marking the integration variable and the limiting width; it is essential, not optional.
  • A larger does not always mean a more accurate left or right sum if you also enlarge the interval — accuracy depends on the mesh , not alone.
  • Riemann integrability requires to be bounded on a finite, closed interval. Unbounded integrands or infinite limits need improper integrals, defined as separate limits.
  • and — reversing the limits flips the sign.

A bounded function that is NOT Riemann integrable

Let the Dirichlet function be

16
⟳every subinterval, no matter how small, contains both rationals and irrationals.

On any subinterval has supremum and infimum . Hence for every partition the upper sum is while the lower sum is . They never close the gap, so the limit in [7] does not exist — is not Riemann integrable on , even though it is bounded. (It is Lebesgue integrable, with integral , because the rationals have measure zero — a hint at why a more powerful integral was eventually built.)

Connections

Riemann sums sit at the crossroads of nearly all of calculus.

  • The Fundamental Theorem of Calculus converts the limit-of-sums into antiderivative evaluation, fusing definite integrals with the Derivative.
  • Indefinite Integrals and Antiderivatives supply the function needed by equation [8]; the definite integral attaches numbers to that family.
  • Numerical Integration (the Trapezoidal Rule and Simpson's Rule) are refined Riemann-type sums that converge faster by using trapezoids or parabolas instead of flat-topped rectangles.
  • Sequences and Series supply the closed-form summation identities (like ) and the limit reasoning that make direct evaluation possible.
  • The Lebesgue Integral generalizes the Riemann integral, repairing its failure on functions like the Dirichlet function and behaving better under limits.
  • In reverse, recognizing a hard sum as a Riemann sum lets you replace it with an integral — a standard trick for evaluating limits of sums.

Real-World Applications

  1. Kinematics: integrating velocity over time gives displacement; integrating acceleration gives velocity — the cart example generalizes to every motion problem and to GPS dead-reckoning.
  2. Engineering — work and energy: work done by a varying force is ; pumping water out of a tank or stretching a spring are computed as integrals of force over distance.
  3. Medicine — drug dosing (AUC): the area under the concentration–time curve measures total drug exposure and is computed from blood samples using trapezoidal Riemann sums.
  4. Economics: consumer and producer surplus are areas between demand/supply curves and price, evaluated as definite integrals; total cost is the integral of marginal cost.
  5. Probability and statistics: for a continuous random variable, of the probability density; expected value is .
  6. Hydrology and civil engineering: river discharge (m³/s) is the integral of velocity across the channel's cross-section, estimated from a finite set of current-meter readings — a literal Riemann sum.
  7. Computer graphics and rendering: the rendering equation integrates incoming light over all directions; Monte Carlo integration is a randomized Riemann sum that samples directions to estimate pixel brightness.

Historical Development

  • c. 250 BCE — Archimedes computes the area of a parabolic segment by the method of exhaustion, summing inscribed triangles — a conceptual ancestor of Riemann sums.
  • c. 1000 CE — Ibn al-Haytham (Alhazen) sums fourth powers to find the volume of a paraboloid, effectively evaluating geometrically.
  • 1630s — Cavalieri and Fermat develop "indivisibles" and compute areas under , anticipating the power rule for integrals.
  • 1660s–1680s — Newton and Leibniz independently discover the Fundamental Theorem, linking area to antiderivatives; Leibniz introduces the symbol (1675).
  • 1823 — Augustin-Louis Cauchy gives the first rigorous integral definition, restricted to continuous functions using left-endpoint sums.
  • 1854 — Bernhard Riemann generalizes to arbitrary partitions and sample points in his Habilitation, and characterizes integrability via upper and lower sums.
  • 1875 — Gaston Darboux reformulates the theory using upper/lower (Darboux) sums, giving the clean modern integrability criterion.
  • 1902 — Henri Lebesgue introduces measure-based integration, integrating the Dirichlet function and resolving the Riemann integral's limit defects.
  • 1957–1963 — Kurzweil and Henstock define the gauge integral, an elegant extension that recovers the FTC in full generality and even contains the Lebesgue integral.

Subtleties & Limits

The Riemann integral is powerful but has frayed edges that motivate deeper theory.

  • Failure under limits. If pointwise, need not converge to , and may fail to be Riemann integrable even when all are. This "limit-exchange" weakness is the main reason the Lebesgue integral was invented; understanding exactly when holds (dominated/monotone convergence) is essential in analysis.
  • The integrability boundary. Lebesgue's criterion (integrable discontinuities have measure zero) is clean but pushes you to define "measure zero" rigorously — leading into measure theory.
  • Improper and oscillatory integrals. Integrals like converge conditionally but not absolutely; whether such an integral exists depends subtly on cancellation, and Riemann's framework must be extended by limits.
  • High dimensions and curse of slicing. A grid Riemann sum in dimensions needs boxes; for large this is infeasible, which is why Monte Carlo (randomized) integration dominates modern high-dimensional computation. Bounding its error is itself an active research area.

See Also

Fundamental Theorem of Calculus · Indefinite Integrals and Antiderivatives · Numerical Integration · Trapezoidal Rule · Simpson's Rule · Lebesgue Integral · Improper Integrals · Summation Notation and Series · Average Value of a Function

Before this

  • Limits and Continuity — the integral is *defined* as a limit, and continuity guarantees integrability.
  • Summation Notation and Series — Riemann sums are sigma-sums; closed forms like $\sum i^2$ are needed for direct evaluation.
  • Functions and Graphs — you must read heights, signs, and intervals off a graph to set up rectangles.
  • The Derivative — needed to find antiderivatives and to appreciate the Fundamental Theorem.
  • Area of Basic Shapes — rectangle and trapezoid areas are the building blocks of every Riemann sum.

Where this leads