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.
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
A partition of a closed interval is a finite set of points
Derivation hint: a partition simply lists the cut points; the subintervals are . The -th subinterval is with width
Derivation hint: width = right endpoint minus left endpoint. The norm (or mesh) of the partition is the width of the widest subinterval:
Derivation hint: the mesh measures the coarseness of the slicing; small forces every piece to be thin.
Given a function defined on , a partition , and a choice of sample point in each subinterval, the corresponding Riemann sum is
Derivation hint: 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:
Derivation hint: 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:
Derivation hint: substitute the uniform and right sample point into equation [4].
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:
Derivation hint: 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: .
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.
If is continuous on and is any antiderivative of (so ), then
Derivation hint: 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
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 :
Derivation hint: 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 :
Derivation hint: substitute the closed form and cancel one factor of .
Step 4 — Expand and take the limit. Multiply out the numerator: , so
Derivation hint: divide each term by .
Step 5 — Conclude. As the last two terms vanish:
Derivation hint: 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 ```
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.
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
Given: , interval , subintervals.
Step 1 — Width. .
Step 2 — Subintervals and midpoints. give midpoints .
Step 3 — Heights. .
Step 4 — Midpoint sum.
Derivation hint: 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 .
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 ):
Derivation hint: each term is "velocity at the interval's start × time interval" = a lower-end distance estimate. m.
Step 3 — Right Riemann sum (uses ):
Derivation hint: 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.
Let the Dirichlet function be
Derivation hint: 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
Historical Development
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