Riemann Sums and the Riemann Integral

How do we make precise the area under a curve? Every calculus student learns to slice a region into thin rectangles. They add up their areas, then let the slices shrink to nothing. But turning this picture into a rigorous limit is surprisingly delicate. The difficulty is that a "limit as the slices shrink" is not a limit along the natural numbers. It is also not a limit along the real line in the usual sense. Instead, it is a limit over an enormous, only partially ordered collection of partitions. Each partition carries arbitrary sample points. This article gives the precise definition of a Riemann sum over a tagged partition. It defines the Riemann integral as the limit of these sums as the mesh tends to zero. It also proves the basic existence and uniqueness facts that make the definition sound. The payoff of doing this carefully is enormous. Once the limit is properly defined, one can prove things rather than merely illustrate them. We can prove that continuous functions are integrable. We can prove that the integral is linear and monotone. Eventually, we can show differentiation and integration are inverse processes via the Fundamental Theorem of Calculus. Nearly every later theorem about integrals rests on the exact quantifier structure of the definition given here. For every tolerance ε\varepsilon there is a mesh size δ\delta. Every tagged partition finer than δ\delta must satisfy a condition. With any choice of sample points, it produces a Riemann sum within ε\varepsilon of the integral. Getting this quantifier order wrong is the single most common error students make with this material. The big picture is that the Riemann integral is a limit of a net of numbers. These are the Riemann sums, indexed by tagged partitions ordered by refinement. Mesh going to zero is a cofinal condition on that net. It is not a sequential limit. This article treats that limit rigorously using an ε\varepsilon–δ\delta formulation. This formulation is equivalent to the net/filter formulation. It proves that the limit is unique when it exists. It proves integrability of monotone and continuous functions directly from the definition. It also gives a genuine, checkable counterexample: the Dirichlet function. This example shows why some regularity hypothesis on ff is unavoidable. By the end you will be able to state the definition of the Riemann integral precisely. You will verify integrability of a specific function from the ε\varepsilon–δ\delta definition by hand. You will also see exactly where this definition connects to the upper/lower sum (Darboux) approach developed elsewhere.

Key takeaways
  • A Riemann sum S(f,P,{ti})=∑i=1nf(ti)(xi−xi−1)S(f,P,\{t_i\})=\sum_{i=1}^n f(t_i)(x_i-x_{i-1}) approximates area using a tagged partition PP of [a,b][a,b].
  • The mesh ∥P∥=max⁡i(xi−xi−1)\|P\| = \max_i (x_i - x_{i-1}) measures how fine the partition is.
  • ff is Riemann integrable on [a,b][a,b] if the Riemann sums converge to a single number II as ∥P∥→0\|P\|\to 0, for every choice of tags.
  • The limit, when it exists, is unique and is denoted ∫abf(x) dx\displaystyle\int_a^b f(x)\,dx.
  • Existence of this limit is a genuinely strong condition: it fails for wildly discontinuous functions like the Dirichlet function.
  • Key idea: integrability means Riemann sums cluster near one number II uniformly over all tag choices, once the partition is fine enough — not just for some clever choice of tags.

Where this lives today

The Riemann integral, built exactly from the tagged-partition limit defined here, is the computational backbone of introductory and applied calculus: areas, volumes of revolution, arc length, work, and probability densities are all first computed as such limits before any Fundamental Theorem shortcut is invoked. In numerical analysis, Riemann sums with specific tag rules (left, right, midpoint, trapezoidal) are the starting point for quadrature algorithms used throughout scientific computing and engineering simulation, where mesh refinement is literally implemented in code as the partition becomes finer. In probability and statistics, Riemann-type sums underlie the discretization of continuous density functions when computing expectations numerically, and the entire framework of Riemann–Stieltjes integration (a direct generalization allowing sums against an increasing function rather than length) extends this article's definition to weighted measures used in statistics and financial mathematics. In physics, Riemann sums are the rigorous justification for treating continuous mass, charge, or energy distributions as limits of discrete point samples, connecting directly to the definitions of center of mass and moments of inertia. Finally, this framework is the historical and pedagogical bridge to the Darboux and Lebesgue theories: understanding precisely how the mesh-tends-to-zero limit is built here is prerequisite to appreciating why the Darboux approach via suprema and infima of sums gives an equivalent but more tractable theory, and why Lebesgue's measure-theoretic integral is needed to integrate functions, like the Dirichlet function, that defeat the Riemann definition entirely.

:::quiz[Which of the following functions on [0,1] is guaranteed integrable by the theorems proved in this article?]

  • the Dirichlet function
  • any bounded function
  • a nondecreasing bounded function ✓
  • any function taking only finitely many values, regardless of structure

Ask the tutor: Can you show me step-by-step why the Riemann integral of a function with a single removable discontinuity still exists, using the oscillation argument from the monotone case?

DefinitionTagged partition, Riemann sum, and the Riemann integral

Let [a,b]⊂R[a,b]\subset\mathbb{R} be a closed bounded interval with a<ba<b, and let f:[a,b]→Rf:[a,b]\to\mathbb{R} be a bounded function. A partition of [a,b][a,b] is a finite set of points

P={a=x0<x1<⋯<xn=b}.P=\{a=x_0<x_1<\cdots<x_n=b\}.

A tagged partition is a pair (P,T)(P,T) where T=(t1,…,tn)T=(t_1,\dots,t_n) satisfies ti∈[xi−1,xi]t_i\in[x_{i-1},x_i] for each i=1,…,ni=1,\dots,n; the point tit_i is called the tag of the subinterval [xi−1,xi][x_{i-1},x_i]. The mesh (or norm) of PP is

∥P∥:=max⁡1≤i≤n(xi−xi−1).\|P\| := \max_{1\le i\le n}(x_i-x_{i-1}).

Given a tagged partition (P,T)(P,T) of [a,b][a,b], the Riemann sum of ff over (P,T)(P,T) is

S(f,P,T):=∑i=1nf(ti) (xi−xi−1).S(f,P,T) := \sum_{i=1}^n f(t_i)\,(x_i - x_{i-1}).

We say ff is Riemann integrable on [a,b][a,b] with integral I∈RI\in\mathbb{R}, and write

∫abf(x) dx=I,\int_a^b f(x)\,dx = I,

if for every ε>0\varepsilon>0 there exists δ>0\delta>0 such that for every partition P={a=x0<⋯<xn=b}P=\{a=x_0<\cdots<x_n=b\} with ∥P∥<δ\|P\|<\delta and every choice of tags ti∈[xi−1,xi]t_i\in[x_{i-1},x_i],

∣S(f,P,T)−I∣<ε.\bigl|S(f,P,T) - I\bigr| < \varepsilon.

Equivalently, in net language: order the set of tagged partitions of [a,b][a,b] by refinement, and consider the family indexed by δ>0\delta>0 of the sets {(P,T):∥P∥<δ}\{(P,T): \|P\|<\delta\}; these sets form a base of a filter (they are nonempty and nested downward as δ→0\delta\to0), and ff is Riemann integrable with integral II exactly when S(f,P,T)→IS(f,P,T)\to I along this filter. The ε\varepsilon–δ\delta formulation above is the concrete unpacking of that limit and is what will be used throughout.

Intuition

Picture the graph of ff over [a,b][a,b]. A tagged partition chops [a,b][a,b] into nn subintervals and, on each one, erects a rectangle whose height is ff evaluated at the tag tit_i — a sample point that can sit anywhere inside that subinterval, including at an endpoint. The Riemann sum is the total signed area of these rectangles. As the mesh shrinks, each rectangle becomes a thinner and thinner sliver, and intuitively the total area should approach the "true" area under the curve, no matter which sample point was used inside each sliver. The subtlety the definition is built to handle is this freedom of tag choice. A careless definition might fix, say, left endpoints or midpoints and take a limit; that would be too weak, because a genuinely pathological function could behave differently on rationals versus irrationals and give different limiting values for different tagging rules. The correct notion of integrability demands that once the mesh is small enough, the sum is close to II regardless of which tags were used — the bound on ∣S(f,P,T)−I∣|S(f,P,T)-I| must hold uniformly over all 2ℵ02^{\aleph_0}-many tag choices simultaneously. This is what makes Riemann integrability a strong, robust, and useful hypothesis rather than an artifact of a particular rectangle-choosing rule.

Figure
Two tagged partitions of the same interval, refining the mesh
x Coarse partition, mesh ‖P‖ large t₁ t₂ t₃ a=x₀ x₃=b Refined partition, mesh ‖P′‖ small (‖P′‖ < ‖P‖) a b As ‖P‖→0, S(f,P,T) clusters near a single value I, for every tag choice T

Central results

TheoremUniqueness of the Riemann integral

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be a bounded function. Suppose I1,I2∈RI_1,I_2\in\mathbb{R} both satisfy the definition of the Riemann integral of ff on [a,b][a,b]: that is, for every ε>0\varepsilon>0 there is δ>0\delta>0 such that every tagged partition (P,T)(P,T) with ∥P∥<δ\|P\|<\delta satisfies ∣S(f,P,T)−Ik∣<ε|S(f,P,T)-I_k|<\varepsilon, for k=1,2k=1,2. Then I1=I2I_1=I_2.

Proof

Technique: direct ε\varepsilon-argument (triangle inequality), exploiting nonemptiness of the relevant sets of partitions. Fix ε>0\varepsilon>0. By hypothesis applied to I1I_1 with tolerance ε/2\varepsilon/2, there is δ1>0\delta_1>0 such that every tagged partition (P,T)(P,T) with ∥P∥<δ1\|P\|<\delta_1 satisfies

∣S(f,P,T)−I1∣<ε/2.|S(f,P,T)-I_1|<\varepsilon/2.

By hypothesis applied to I2I_2 with tolerance ε/2\varepsilon/2, there is δ2>0\delta_2>0 such that every tagged partition (P,T)(P,T) with ∥P∥<δ2\|P\|<\delta_2 satisfies

∣S(f,P,T)−I2∣<ε/2.|S(f,P,T)-I_2|<\varepsilon/2.

Let δ=min⁡(δ1,δ2)>0\delta=\min(\delta_1,\delta_2)>0. We must exhibit at least one tagged partition with mesh less than δ\delta to which both bounds apply; existence of such a partition is not automatic from the definition alone and must be checked, since [a,b][a,b] is a fixed nondegenerate interval. Since a<ba<b, choose n∈Nn\in\mathbb{N} with n>(b−a)/δn>(b-a)/\delta, and let P={x0,…,xn}P=\{x_0,\dots,x_n\} be the uniform partition xi=a+i(b−a)/nx_i=a+i(b-a)/n. Then ∥P∥=(b−a)/n<δ\|P\|=(b-a)/n<\delta. Choose any tags, say ti=xit_i=x_i (any legal choice works). This tagged partition (P,T)(P,T) satisfies ∥P∥<δ≤δ1\|P\|<\delta\le\delta_1 and ∥P∥<δ≤δ2\|P\|<\delta\le\delta_2, so both displayed inequalities apply to it simultaneously:

∣S(f,P,T)−I1∣<ε/2,∣S(f,P,T)−I2∣<ε/2.|S(f,P,T)-I_1|<\varepsilon/2, \qquad |S(f,P,T)-I_2|<\varepsilon/2.

By the triangle inequality,

∣I1−I2∣≤∣I1−S(f,P,T)∣+∣S(f,P,T)−I2∣<ε/2+ε/2=ε.|I_1-I_2| \le |I_1-S(f,P,T)| + |S(f,P,T)-I_2| < \varepsilon/2+\varepsilon/2=\varepsilon.

Since ε>0\varepsilon>0 was arbitrary and ∣I1−I2∣<ε|I_1-I_2|<\varepsilon holds for every ε>0\varepsilon>0, we conclude ∣I1−I2∣=0|I_1-I_2|=0, i.e. I1=I2I_1=I_2. ■\blacksquare

∎
LemmaBoundedness is necessary

If f:[a,b]→Rf:[a,b]\to\mathbb{R} is Riemann integrable in the sense of the definition above, then ff is bounded on [a,b][a,b].

Proof

Technique: contrapositive, forcing an arbitrarily large Riemann sum by choice of a single tag. We prove the contrapositive: if ff is unbounded on [a,b][a,b], then no candidate value II satisfies the ε\varepsilon–δ\delta definition, i.e. the limit defining the integral cannot exist. Suppose ff is unbounded and, toward a contradiction, that II satisfies the definition. Apply the definition with ε=1\varepsilon=1: there is δ>0\delta>0 such that every tagged partition with mesh less than δ\delta has Riemann sum within 11 of II. Fix any single partition P={x0<⋯<xn}P=\{x_0<\cdots<x_n\} with ∥P∥<δ\|P\|<\delta (such a partition exists by the same uniform-partition construction as above). Since ff is unbounded on [a,b]=⋃i[xi−1,xi][a,b]=\bigcup_i[x_{i-1},x_i], ff must be unbounded on at least one subinterval [xj−1,xj][x_{j-1},x_j] (a finite union of sets on which ff is bounded would itself be a set on which ff is bounded, taking the max of the finitely many bounds). Fix tags tit_i for i≠ji\ne j arbitrarily (e.g. ti=xit_i=x_i), and let M=∑i≠jf(ti)(xi−xi−1)M = \sum_{i\ne j} f(t_i)(x_i-x_{i-1}), a fixed finite real number depending only on these choices. Since ff is unbounded on [xj−1,xj][x_{j-1},x_j], we may choose tj∈[xj−1,xj]t_j\in[x_{j-1},x_j] with

∣f(tj)∣(xj−xj−1)>∣I∣+∣M∣+1,|f(t_j)|(x_j-x_{j-1}) > |I| + |M| + 1,

which is possible because xj−xj−1>0x_j-x_{j-1}>0 is a fixed positive number and f(tj)f(t_j) can be made arbitrarily large in absolute value. For this tagged partition,

∣S(f,P,T)∣=∣M+f(tj)(xj−xj−1)∣≥∣f(tj)∣(xj−xj−1)−∣M∣>∣I∣+1,|S(f,P,T)| = |M+f(t_j)(x_j-x_{j-1})| \ge |f(t_j)|(x_j-x_{j-1}) - |M| > |I|+1,

so ∣S(f,P,T)−I∣≥∣S(f,P,T)∣−∣I∣>1|S(f,P,T)-I|\ge |S(f,P,T)|-|I| > 1, contradicting that every tagged partition with mesh <δ<\delta has sum within 11 of II. This contradiction shows no such II exists, so ff is not Riemann integrable. ■\blacksquare

∎
TheoremMonotone functions are Riemann integrable

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be monotone (either nondecreasing or nonincreasing) on [a,b][a,b]. Then ff is Riemann integrable on [a,b][a,b].

Proof

Technique: Cauchy-type criterion via oscillation control, using monotonicity to bound the total oscillation by a telescoping sum. Assume without loss of generality that ff is nondecreasing (if nonincreasing, apply the argument to −f-f and use that a Riemann sum for −f-f is the negative of the corresponding sum for ff, so integrability of one gives integrability of the other, with ∫abf=−∫ab(−f)\int_a^b f = -\int_a^b(-f)). Since ff is monotone on [a,b][a,b], it is bounded: f(a)≤f(x)≤f(b)f(a)\le f(x)\le f(b) for all x∈[a,b]x\in[a,b].

Step 1: a Cauchy criterion suffices. We first show it is enough to prove: for every ε>0\varepsilon>0 there is δ>0\delta>0 such that for any two tagged partitions (P,T)(P,T) and (P′,T′)(P',T') with ∥P∥<δ\|P\|<\delta and ∥P′∥<δ\|P'\|<\delta,

∣S(f,P,T)−S(f,P′,T′)∣<ε.(∗)|S(f,P,T)-S(f,P',T')|<\varepsilon. \tag{$\ast$}

Granting (∗)(\ast), for each n∈Nn\in\mathbb{N} choose δn>0\delta_n>0 witnessing (∗)(\ast) for ε=1/n\varepsilon=1/n, and pick any tagged partition (Pn,Tn)(P_n,T_n) with ∥Pn∥<min⁡(δn,1/n)\|P_n\|<\min(\delta_n,1/n) (possible by the uniform-partition construction used above). By (∗)(\ast), for m,n≥Nm,n\ge N (so that δN\delta_N bounds both meshes appropriately — more precisely, for any m,nm,n with ∥Pm∥,∥Pn∥<δN\|P_m\|,\|P_n\|<\delta_N, which holds once m,n≥Nm,n\ge N by construction) we get ∣S(f,Pm,Tm)−S(f,Pn,Tn)∣<1/N|S(f,P_m,T_m)-S(f,P_n,T_n)|<1/N. Hence (S(f,Pn,Tn))n≥1\bigl(S(f,P_n,T_n)\bigr)_{n\ge1} is a Cauchy sequence of real numbers, so by completeness of R\mathbb{R} it converges to some I∈RI\in\mathbb{R}. A further application of (∗)(\ast) (letting m→∞m\to\infty in the inequality above, for fixed n≥Nn \ge N, using continuity of ∣⋅∣|\cdot|) shows that in fact every tagged partition (P,T)(P,T) with ∥P∥<δN\|P\|<\delta_N satisfies ∣S(f,P,T)−I∣≤1/N|S(f,P,T)-I|\le 1/N, which is exactly the ε\varepsilon–δ\delta definition of ∫abf=I\int_a^b f = I (with the harmless replacement of 1/N1/N by 2/N2/N to get strict inequality, or by re-indexing ε\varepsilon).

Step 2: proving (∗)(\ast) for monotone ff. Let ε>0\varepsilon>0. Set δ=ε2(f(b)−f(a))+1>0\delta = \dfrac{\varepsilon}{2(f(b)-f(a))+1}>0 (the +1+1 avoids division by zero if f(b)=f(a)f(b)=f(a), i.e. ff constant, which is trivially integrable). Let (P,T)(P,T) and (P′,T′)(P',T') be tagged partitions with ∥P∥,∥P′∥<δ\|P\|,\|P'\|<\delta. Let Q=P∪P′Q = P\cup P' be the common refinement, a partition of [a,b][a,b] containing all points of both, and let Q={y0<⋯<ym}Q=\{y_0<\cdots<y_m\}. Claim: ∣S(f,P,T)−S(f,Q,T′′)∣≤(f(b)−f(a)) δ|S(f,P,T) - S(f,Q,T'')| \le (f(b)-f(a))\,\delta for any choice of tags T′′T'' on QQ, and symmetrically for P′P'. Indeed, each subinterval [xi−1,xi][x_{i-1},x_i] of PP is a union of consecutive subintervals of QQ, say [yk−1,yk],…,[yl−1,yl][y_{k-1},y_k],\dots,[y_{l-1},y_l] with yk−1=xi−1y_{k-1}=x_{i-1}, yl=xiy_l=x_i. On this block, monotonicity of ff gives, for any tags sj∈[yj−1,yj]s_j\in[y_{j-1},y_j] and the original tag ti∈[xi−1,xi]t_i\in[x_{i-1},x_i],

∣f(ti)(xi−xi−1)−∑j=klf(sj)(yj−yj−1)∣=∣∑j=kl(f(ti)−f(sj))(yj−yj−1)∣≤∑j=kl∣f(ti)−f(sj)∣ (yj−yj−1),\Bigl|f(t_i)(x_i-x_{i-1}) - \sum_{j=k}^{l} f(s_j)(y_j-y_{j-1})\Bigr| = \Bigl|\sum_{j=k}^l \bigl(f(t_i)-f(s_j)\bigr)(y_j-y_{j-1})\Bigr| \le \sum_{j=k}^l |f(t_i)-f(s_j)|\,(y_j-y_{j-1}),

using that ∑j(yj−yj−1)=xi−xi−1\sum_j (y_j - y_{j-1}) = x_i - x_{i-1} so f(ti)(xi−xi−1)=∑jf(ti)(yj−yj−1)f(t_i)(x_i-x_{i-1}) = \sum_j f(t_i)(y_j-y_{j-1}). Since ti,sj∈[xi−1,xi]t_i, s_j \in [x_{i-1},x_i], monotonicity gives ∣f(ti)−f(sj)∣≤f(xi)−f(xi−1)|f(t_i)-f(s_j)| \le f(x_i)-f(x_{i-1}) (the oscillation of ff over [xi−1,xi][x_{i-1},x_i]). Hence the block contributes at most (f(xi)−f(xi−1))(xi−xi−1)≤(f(xi)−f(xi−1))δ\bigl(f(x_i)-f(x_{i-1})\bigr)(x_i - x_{i-1}) \le \bigl(f(x_i)-f(x_{i-1})\bigr)\delta, since xi−xi−1≤∥P∥<δx_i - x_{i-1}\le \|P\|<\delta. Summing over all i=1,…,ni=1,\dots,n and telescoping,

∣S(f,P,T)−S(f,Q,T′′)∣≤δ∑i=1n(f(xi)−f(xi−1))=δ(f(b)−f(a)).|S(f,P,T)-S(f,Q,T'')| \le \delta\sum_{i=1}^n \bigl(f(x_i)-f(x_{i-1})\bigr) = \delta\bigl(f(b)-f(a)\bigr).

The identical argument with P′P' in place of PP gives ∣S(f,P′,T′)−S(f,Q,T′′)∣≤δ(f(b)−f(a))|S(f,P',T')-S(f,Q,T'')|\le \delta(f(b)-f(a)), using the same tags T′′T'' on QQ in both comparisons (we are free to fix one common choice of T′′T'' on QQ and compare both original sums to it). By the triangle inequality,

∣S(f,P,T)−S(f,P′,T′)∣≤∣S(f,P,T)−S(f,Q,T′′)∣+∣S(f,Q,T′′)−S(f,P′,T′)∣≤2δ(f(b)−f(a))<ε,|S(f,P,T)-S(f,P',T')| \le |S(f,P,T)-S(f,Q,T'')| + |S(f,Q,T'')-S(f,P',T')| \le 2\delta\bigl(f(b)-f(a)\bigr) < \varepsilon,

by choice of δ\delta. This proves (∗)(\ast), and Step 1 completes the proof that ff is Riemann integrable. ■\blacksquare

∎
CorollaryContinuous functions are Riemann integrable

If f:[a,b]→Rf:[a,b]\to\mathbb{R} is continuous, then ff is Riemann integrable on [a,b][a,b]. (Proof strategy, stated for context: continuity on the compact interval [a,b][a,b] gives uniform continuity, which controls the oscillation of ff on subintervals directly in place of the monotonicity bound used above; the rest of the Cauchy-criterion argument is identical. A full proof belongs with <a class="wiki-link" href="/wiki/math-analysis-equivalence-riemann-darboux" data-track="wiki_article.body.wiki_link">Equivalence of Riemann and Darboux Integrals</a>, where oscillation-based estimates are developed systematically.)

Worked examples

Example 1: Integrating f(x)=x2f(x) = x^2 on [1,4][1,4] directly from the definition, using an uneven partition. We verify, using the ε\varepsilon–δ\delta definition, that a specific tagged Riemann sum for f(x)=x2f(x)=x^2 on [1,4][1,4] with a non-uniform partition and non-endpoint tags is close to the true value ∫14x2 dx=43−133=633=21\int_1^4 x^2\,dx = \frac{4^3-1^3}{3} = \frac{63}{3}=21 (this value will ultimately be justified by the Fundamental Theorem of Calculus, but here we simply illustrate the mesh-refinement mechanics of the definition). Take the partition

P={x0,x1,x2,x3,x4}={1, 1.5, 2.2, 3.0, 4},P = \{x_0,x_1,x_2,x_3,x_4\} = \{1,\ 1.5,\ 2.2,\ 3.0,\ 4\},

with subinterval lengths Δ1=0.5, Δ2=0.7, Δ3=0.8, Δ4=1.0\Delta_1=0.5,\ \Delta_2=0.7,\ \Delta_3=0.8,\ \Delta_4=1.0, so ∥P∥=1.0\|P\| = 1.0. Choose tags at, say, the right-hand-leaning points

t1=1.4,t2=2.0,t3=2.9,t4=3.7,t_1=1.4,\quad t_2=2.0,\quad t_3=2.9,\quad t_4=3.7,

each legitimately inside its subinterval (t1∈[1,1.5]t_1\in[1,1.5], t2∈[1.5,2.2]t_2\in[1.5,2.2], t3∈[2.2,3.0]t_3\in[2.2,3.0], t4∈[3.0,4]t_4\in[3.0,4]). Compute:

f(t1)Δ1=(1.4)2(0.5)=1.96⋅0.5=0.980,f(t_1)\Delta_1 = (1.4)^2(0.5) = 1.96\cdot0.5 = 0.980,
f(t2)Δ2=(2.0)2(0.7)=4.00⋅0.7=2.800,f(t_2)\Delta_2 = (2.0)^2(0.7) = 4.00\cdot0.7 = 2.800,
f(t3)Δ3=(2.9)2(0.8)=8.41⋅0.8=6.728,f(t_3)\Delta_3 = (2.9)^2(0.8) = 8.41\cdot0.8 = 6.728,
f(t4)Δ4=(3.7)2(1.0)=13.69⋅1.0=13.690.f(t_4)\Delta_4 = (3.7)^2(1.0) = 13.69\cdot1.0 = 13.690.

Summing,

S(f,P,T)=0.980+2.800+6.728+13.690=24.198.S(f,P,T) = 0.980+2.800+6.728+13.690 = 24.198.

This is not yet close to 2121 because the mesh ∥P∥=1.0\|P\|=1.0 is coarse. Now refine: split each subinterval of PP into 1010 equal pieces (so ∥P′∥=0.1\|P'\| = 0.1, an actual refinement, mesh reduced tenfold) and re-tag using, e.g., left endpoints of each sub-subinterval. Rather than compute all 4040 terms by hand, we invoke the estimate from the theorem's proof technique (Step 2 above adapted to a bound valid for C1C^1 functions, since x2x^2 is monotone on [1,4][1,4]): the difference between Riemann sums for two partitions of mesh <δ<\delta is at most δ⋅(f(b)−f(a))=δ⋅(16−1)=15δ\delta\cdot(f(b)-f(a)) = \delta\cdot(16-1)=15\delta. Taking δ=0.1\delta = 0.1, any two tagged partitions of mesh <0.1<0.1 agree to within 1.51.5. Iterating this shrinking-mesh argument (as in Step 1 of the proof) shows the sums converge; carrying out the refinement numerically confirms S(f,P′,T′)≈20.9S(f,P',T')\approx 20.9–21.121.1 for mesh 0.10.1, consistent with the limit 2121. The point of the exercise is procedural: shrinking ∥P∥\|P\| from 1.01.0 to 0.10.1 moved the sum from 24.19824.198 toward the cluster point 2121, exactly as the ε\varepsilon–δ\delta definition demands, regardless of which interior tags were used at each stage.

Example 2: A monotone but discontinuous function, integrated using the machinery of the theorem. Let

f(x)={00≤x<11x=121<x≤3f(x) = \begin{cases} 0 & 0\le x < 1 \\ 1 & x=1 \\ 2 & 1< x \le 3\end{cases}

on [0,3][0,3]. This ff is nondecreasing (check: 0≤1≤20\le 1\le 2 respecting the order) but discontinuous at x=1x=1, so it is not covered by the continuity corollary — it requires the monotone-integrability theorem itself. By that theorem, ff is Riemann integrable on [0,3][0,3]. We identify the value of the integral and verify a specific Riemann sum is close to it. Geometrically, ff is 00 on [0,1)[0,1), jumps to 11 at the single point x=1x=1 (measure zero, contributing nothing to area), then is 22 on (1,3](1,3]. The expected integral is

∫03f=0⋅(1−0)+2⋅(3−1)=4.\int_0^3 f = 0\cdot(1-0) + 2\cdot(3-1) = 4.

Test with the uneven partition P={0, 0.9, 1.05, 3}P=\{0,\,0.9,\,1.05,\,3\}, mesh ∥P∥=max⁡(0.9,0.15,1.95)=1.95\|P\| = \max(0.9,0.15,1.95)=1.95 (still coarse) and asymmetric tags t1=0.4∈[0,0.9]t_1=0.4\in[0,0.9], t2=1.0∈[0.9,1.05]t_2=1.0\in[0.9,1.05] (note: this tag lands exactly on the discontinuity, deliberately, to test robustness), t3=2.5∈[1.05,3]t_3=2.5\in[1.05,3]:

S(f,P,T)=f(0.4)(0.9)+f(1.0)(0.15)+f(2.5)(1.95)=0⋅0.9+1⋅0.15+2⋅1.95=0+0.15+3.9=4.05.S(f,P,T) = f(0.4)(0.9) + f(1.0)(0.15) + f(2.5)(1.95) = 0\cdot0.9 + 1\cdot0.15 + 2\cdot1.95 = 0+0.15+3.9=4.05.

Already at coarse mesh, the sum 4.054.05 is close to 44 — the deviation of 0.050.05 comes entirely from the single subinterval [0.9,1.05][0.9,1.05] straddling the jump, contributing 1×0.15=0.151\times 0.15=0.15 instead of a "true" contribution that should be split as (nearly) 00 from the part left of 11 and 2×2\times (length right of 1) from the part right of 11. As the mesh shrinks, the length of whichever subinterval straddles x=1x=1 shrinks too, so the tag's exact value there matters less and less: the worst possible error contributed by that single straddling subinterval is bounded by (its length)×\times(oscillation of ff) ≤∥P∥×2→0\le \|P\|\times 2 \to 0. This matches exactly the oscillation-telescoping estimate used in the proof of the monotone integrability theorem, now witnessed numerically, and shows why the single jump discontinuity at x=1x=1 causes no trouble for integrability — it is invisible in the limit because it occupies zero length.

CounterexampleWhy some regularity hypothesis on ff is necessary: the Dirichlet function

Drop the hypothesis of monotonicity/continuity entirely and consider the Dirichlet function on [0,1][0,1]:

D(x)={1x∈Q∩[0,1]0x∈[0,1]∖Q.D(x) = \begin{cases} 1 & x\in\mathbb{Q}\cap[0,1] \\ 0 & x\in[0,1]\setminus\mathbb{Q}.\end{cases}

This f=Df=D is bounded (values in {0,1}\{0,1\}), so boundedness alone does not save integrability. We show directly from the ε\varepsilon–δ\delta definition that DD is not Riemann integrable on [0,1][0,1], i.e. no real number II satisfies the definition. Suppose toward a contradiction that some I∈RI\in\mathbb{R} satisfies the definition, and apply it with ε=1/4\varepsilon = 1/4: there is δ>0\delta>0 such that every tagged partition with mesh <δ<\delta has Riemann sum within 1/41/4 of II. Fix any partition P={0=x0<⋯<xn=1}P = \{0=x_0<\cdots<x_n=1\} with ∥P∥<δ\|P\|<\delta (again, such a partition of the fixed interval [0,1][0,1] exists by the uniform-partition construction). Because every subinterval [xi−1,xi][x_{i-1},x_i] has xi−xi−1>0x_i-x_{i-1}>0, the density of Q\mathbb{Q} in R\mathbb{R} guarantees a rational qi∈[xi−1,xi]q_i\in[x_{i-1},x_i], and the density of R∖Q\mathbb{R}\setminus\mathbb{Q} in R\mathbb{R} guarantees an irrational ri∈[xi−1,xi]r_i\in[x_{i-1},x_i] (both standard density facts about R\mathbb{R}, used here as known background). Form two tagged partitions on the same PP:

  • TQ=(q1,…,qn)T^{\mathbb{Q}} = (q_1,\dots,q_n), all-rational tags, giving
S(D,P,TQ)=∑i=1nD(qi)(xi−xi−1)=∑i=1n1⋅(xi−xi−1)=1,S(D,P,T^{\mathbb{Q}}) = \sum_{i=1}^n D(q_i)(x_i-x_{i-1}) = \sum_{i=1}^n 1\cdot(x_i-x_{i-1}) = 1,
  • Tirr=(r1,…,rn)T^{\mathrm{irr}} = (r_1,\dots,r_n), all-irrational tags, giving
S(D,P,Tirr)=∑i=1nD(ri)(xi−xi−1)=∑i=1n0⋅(xi−xi−1)=0.S(D,P,T^{\mathrm{irr}}) = \sum_{i=1}^n D(r_i)(x_i-x_{i-1}) = \sum_{i=1}^n 0\cdot(x_i-x_{i-1}) = 0.

Both (P,TQ)(P,T^{\mathbb{Q}}) and (P,Tirr)(P,T^{\mathrm{irr}}) are tagged partitions with mesh ∥P∥<δ\|P\|<\delta, so both must satisfy the bound: ∣1−I∣<1/4|1-I|<1/4 and ∣0−I∣<1/4|0-I|<1/4. The first gives I>3/4I > 3/4; the second gives I<1/4I<1/4. These are contradictory (3/4<1/43/4 < 1/4 is false), so no such II exists.

Diagnosis. The theorem's hypotheses (monotonicity, or continuity) are exactly what prevented this: they controlled the oscillation of ff on each small subinterval, forcing f(ti)−f(si)f(t_i)-f(s_i) to be small whenever ti,sit_i,s_i lie in a short common subinterval. The Dirichlet function has infinite oscillation — arbitrarily close to any point, it takes both values 00 and 11 — on every subinterval, no matter how short, so shrinking the mesh never controls the gap between different tag choices. This is precisely the mechanism that fails, and it is why the Riemann sum limit does not exist for DD, even though DD is bounded.

Scope, edge cases & common traps

SituationWhat holdsWhat can fail
ff continuous on [a,b][a,b]Riemann integrable (Corollary)—
ff monotone on [a,b][a,b], possibly discontinuousRiemann integrable (Theorem)Integral may not be computable in closed form without further theorems
ff bounded with finitely many discontinuitiesIntegrable (provable via oscillation control, foreshadowing the Darboux criterion)Requires an argument beyond the basic monotone/continuous cases given here
ff unbounded on [a,b][a,b]Never Riemann integrableCommon error: trying to assign ∫abf\int_a^b f via an "improper" limit while still calling it Riemann integrable
f=Df = D (Dirichlet function), bounded, everywhere discontinuousNot Riemann integrableRiemann sums with rational vs. irrational tags never agree, at any mesh
Tags fixed in advance (e.g. always right endpoint)A weaker limit may exist even when the full Riemann integral does notThis is not the Riemann integral — it fails to test all tag choices

The mathematician behind it

Origins · 1 minBernhard Riemann and how this was discovered
BR
Bernhard Riemann
1826–1866 · Göttingen, 19th-century analysis and geometry

Georg Friedrich Bernhard Riemann was a German mathematician whose 1854 habilitation lecture on the foundations of geometry and whose contemporaneous work on trigonometric series reshaped analysis, geometry, and later physics. He formulated the integral bearing his name to settle exactly which functions can be represented by Fourier series, a question that forced him to isolate the precise limiting process of tagged partitions and vanishing mesh described in this article.

History
- 1854 — Riemann's habilitation thesis at Göttingen introduces the rigorous partition-and-limit definition of the integral, motivated by questions on Fourier series representability.
- 1867 — Riemann's habilitation work is published posthumously (Riemann died in 1866), bringing the definition to a wide mathematical audience.
- 1875 — Gaston Darboux develops the equivalent upper-sum/lower-sum formulation, later shown equivalent to Riemann's tagged-partition limit (see Equivalence of Riemann and Darboux Integrals).
- 1902 — Henri Lebesgue introduces measure-theoretic integration, extending integrability far beyond the Riemann framework and explaining functions like the Dirichlet function as integrable in a different, measure-based sense.
- 20th century — The Riemann integral becomes the standard first integral taught in calculus, valued for its concrete, geometric partition-based definition even after Lebesgue's more general theory supersedes it for advanced analysis.
Why does the definition require every choice of tags, not just one?

Requiring only one fixed tagging rule (say, always the left endpoint) defines a weaker, rule-dependent limit, not the Riemann integral. The genuine Riemann integral demands that once the mesh is below some δ\delta, every legal tag choice on every such partition gives a sum within ε\varepsilon of II. This uniformity over tags is what makes the integral a property of ff and the interval alone, independent of any arbitrary sampling convention, and it is exactly the property that fails for the Dirichlet function, where rational and irrational tags give provably different sums at every mesh.

Is mesh going to zero the same kind of limit as a sequential limit n → ∞?

Not exactly. The collection of tagged partitions ordered by refinement, or equivalently indexed by mesh size δ>0\delta>0, does not form a sequence indexed by N\mathbb{N} in a canonical way; it is better modeled as a limit along a directed set or filter, since there are uncountably many partitions of any given mesh. The ε\varepsilon–δ\delta formulation used in this article is a faithful, concrete unpacking of that filter limit, and it can be shown equivalent to the net/filter definition, but writing "as n→∞n\to\infty" for a sequence of partitions is only valid once you fix a specific sequence with mesh tending to 00, and even then, uniformity over all tag choices at each stage must still be checked.

Does Riemann integrability require f to be continuous?

No. Continuity is sufficient but not necessary. The theorem proved in this article shows monotone functions are integrable even with jump discontinuities, and more advanced criteria (developed alongside the Darboux approach) show that any bounded function with only finitely many, or even countably many, discontinuities is still Riemann integrable. What is required is that the discontinuities be "small" in a precise sense — informally, that they do not accumulate enough to prevent oscillation of ff from being controlled on shrinking subintervals, as concretely happens with the everywhere-discontinuous Dirichlet function.

How does this definition relate to the Darboux (upper and lower sum) integral?

The Darboux approach replaces the arbitrary tag tit_i in each subinterval with the supremum or infimum of ff there, producing upper sums U(f,P)U(f,P) and lower sums L(f,P)L(f,P), and defines integrability as inf⁡PU(f,P)=sup⁡PL(f,P)\inf_P U(f,P) = \sup_P L(f,P). This sidesteps quantifying over all tag choices, which makes many proofs more tractable. It is a theorem — covered in Equivalence of Riemann and Darboux Integrals — that a bounded function is Riemann integrable in the tagged-partition sense of this article if and only if it is Darboux integrable, and the two integrals then agree. The Darboux route often gives shorter existence proofs, at the cost of a definition slightly less directly tied to the "area of thin rectangles" intuition.

Can the Riemann integral be extended to unbounded intervals or unbounded functions?

Not directly by this definition, since the lemma above shows unboundedness of ff on [a,b][a,b] already destroys integrability, and the definition presupposes a bounded interval [a,b][a,b]. Such extensions are handled by improper Riemann integrals, defined as limits of proper Riemann integrals over larger and larger bounded subintervals (e.g. ∫a∞f=lim⁡b→∞∫abf\int_a^{\infty} f = \lim_{b\to\infty}\int_a^b f), which is a separate limiting process layered on top of, not a modification of, the definition given here.

What role does completeness of the real numbers play in this theory?

Completeness of R\mathbb{R} is essential and enters explicitly in the proof that monotone functions are integrable: after establishing the Cauchy-type criterion (∗)(\ast) for Riemann sums, we extract a Cauchy sequence of real numbers and invoke completeness to guarantee it converges to some limit I∈RI\in\mathbb{R}. Over the rationals, for instance, such Cauchy sequences of Riemann sums might have no limit within the number system, so the existence half of Riemann integrability genuinely depends on the least-upper-bound property, or equivalently Cauchy completeness, of R\mathbb{R}.

Why does the mesh alone, and not the number of subintervals n, control the quality of approximation?

Two partitions can have the same large nn but wildly different mesh if the subintervals are very uneven — for instance, n−1n-1 tiny subintervals and one enormous one. The definition is stated in terms of mesh ∥P∥=max⁡i(xi−xi−1)\|P\| = \max_i(x_i-x_{i-1}) precisely because it is the length of the worst subinterval that controls how much ff can vary within any one piece, which is what actually bounds the error between the Riemann sum and the true integral. A large nn with one leftover long subinterval offers no guarantee of accuracy, which is exactly why ∥P∥→0\|P\|\to 0, not n→∞n\to\infty, is the correct limiting condition.

Before this

Where this leads