Lebesgue's Criterion for Riemann Integrability

Which bounded functions on a closed interval are Riemann integrable? A student may have met the Equivalence of Riemann and Darboux Integrals. They may also know the theorem on Integrability of Monotone Functions. By now they have seen a patchwork of sufficient conditions. Continuity suffices, monotonicity suffices, finitely many jump discontinuities suffice. These feel like separate tricks rather than instances of one phenomenon. The natural question is different. Is there a single structural property of a function's discontinuity set? Such a property would exactly characterize Riemann integrability. It would unify every example and counterexample encountered so far. The answer, due to Henri Lebesgue, is a striking dichotomy. A bounded function on [a,b][a,b] is Riemann integrable if and only if one condition holds. The set of points where it is discontinuous must have Lebesgue measure zero. This single criterion instantly explains several things. It shows why continuous functions are integrable (empty discontinuity set). It shows why monotone functions are integrable (discontinuity set is at most countable). It shows why the Dirichlet function fails to be integrable (discontinuous everywhere, and [0,1][0,1] does not have measure zero). It also shows why modifying a function on a "thin" set does not destroy integrability. The result matters because it reframes Riemann integration. Rather than an ad hoc collection of special cases, it is governed by measure theory. This holds true at a moment before measure theory has been fully developed. It is historically important for a specific reason. It is one of the first places where the notion of a "small" set becomes indispensable. Such a set is negligible in a precise, quantitative sense. This notion is needed for stating a clean theorem in classical analysis. It also exposes the genuine limitation of the Riemann integral. Some functions have bad behavior spread over a set of positive measure. However bounded, these simply cannot be integrated in this theory. This motivates the eventual passage to the Lebesgue integral. This article states the criterion with full precision. It discusses the structure of the proof. The proof is a technical argument bridging two languages. It connects the discrete language of partitions and the continuous language of measure. The article also works through the criterion on nontrivial examples. These include a bounded function discontinuous on a Cantor-type set of positive measure. This example shows the boundary of the theorem is sharp.

Key takeaways
  • A bounded f:[a,b]→Rf:[a,b]\to\mathbb{R} is Riemann integrable iff its discontinuity set DfD_f has Lebesgue measure zero.
  • This single theorem subsumes: continuous functions, monotone functions, and functions with countably many discontinuities are all integrable.
  • The proof needs a quantitative version of continuity/discontinuity called oscillation, and expresses DfD_f as a countable union of closed "bad" sets.
  • Measure zero means: for every ε>0\varepsilon>0, the set can be covered by countably many intervals of total length <ε<\varepsilon.
  • Sharpness: there exist bounded, integrable functions discontinuous on infinite (even uncountable) sets, as long as that set has measure zero, and non-integrable functions discontinuous only on a measure-zero-sized-looking but actually positive-measure Cantor set.
  • Key idea: Riemann integrability is not about how many discontinuities a function has, but about how much length they collectively occupy.

Where this lives today

Lebesgue's criterion is the standard bridge topic between elementary real analysis and measure theory in every rigorous analysis course, and it is the theorem that makes precise why the Riemann integral is inadequate for many purposes in modern mathematics. In functional analysis and Fourier analysis, it explains which functions arising as limits of continuous functions (e.g. pointwise limits, which can have wild discontinuity sets) remain Riemann integrable, informing when term-by-term integration of series is legitimate before invoking the more powerful Dominated Convergence Theorem from Lebesgue theory. In probability and statistics, indicator functions of measure-zero versus positive-measure sets govern which "boundary" or "singular" events can be safely ignored when computing expectations via Riemann-style integrals, and the language of "almost everywhere" properties traces directly to this dichotomy. In numerical analysis, quadrature rules (e.g. Simpson's rule, Newton–Cotes methods) implicitly rely on integrand regularity; the criterion tells the practitioner exactly how much discontinuity a function can tolerate before Riemann-based quadrature schemes lose their theoretical justification. In computer science and information theory, functions defined via case splits on Diophantine or number-theoretic conditions (analogues of Thomae's function) are analyzed via exactly this kind of discontinuity-set argument to establish integrability of complexity-theoretic or combinatorial generating functions. Finally, in mathematical logic and descriptive set theory, the criterion is a first, concrete example of how the "size" of a set (measure) rather than its cardinality governs analytic properties, a theme that recurs throughout the theory of Borel and analytic sets.

:::quiz[Which of the following bounded functions on [0,1][0,1] is Riemann integrable by Lebesgue's criterion?]

  • The indicator function of Q∩[0,1]\mathbb{Q}\cap[0,1]
  • The indicator function of a fat Cantor set of measure 2/32/3
  • Thomae's function (discontinuous exactly on the rationals) ✓
  • The function equal to 1/x1/x near 00 and 00 elsewhere (unbounded)

:::quiz[A bounded function on [0,1][0,1] is discontinuous at every point of a nowhere-dense closed set of Lebesgue measure 0.40.4. Is it Riemann integrable?]

  • Yes, since nowhere-dense sets are always measure zero
  • No, since the discontinuity set has positive measure (0.4≠00.4 \ne 0) ✓
  • Yes, since the set is closed
  • Cannot be determined without knowing the function's specific values

Ask the tutor: Can you show me in full detail why the oscillation function ωf\omega_f is well-defined and why DηD_\eta being closed doesn't require ff to be continuous anywhere at all?

DefinitionOscillation, discontinuity set, and measure zero

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be bounded.

Oscillation on a set. For S⊆[a,b]S\subseteq [a,b] nonempty, define

Ωf(S)=sup⁡x,y∈S∣f(x)−f(y)∣=sup⁡Sf−inf⁡Sf.\Omega_f(S) = \sup_{x,y\in S} |f(x)-f(y)| = \sup_{S} f - \inf_S f.

Oscillation at a point. For x∈[a,b]x\in[a,b] and δ>0\delta>0, let Bδ(x)=(x−δ,x+δ)∩[a,b]B_\delta(x) = (x-\delta,x+\delta)\cap[a,b], and define the oscillation of ff at xx by

ωf(x)=lim⁡δ→0+Ωf(Bδ(x)).\omega_f(x) = \lim_{\delta \to 0^+} \Omega_f\big(B_\delta(x)\big).

This limit exists (in [0,∞)[0,\infty)) because Ωf(Bδ(x))\Omega_f(B_\delta(x)) is nonnegative, non-decreasing as δ\delta decreases... more precisely nondecreasing as δ\delta increases, and bounded above (as ff is bounded), so the limit as δ→0+\delta \to 0^+ is the infimum over δ>0\delta > 0:

ωf(x)=inf⁡δ>0Ωf(Bδ(x)).\omega_f(x) = \inf_{\delta>0} \Omega_f(B_\delta(x)).

Key fact used throughout: ff is continuous at xx if and only if ωf(x)=0\omega_f(x) = 0.

Discontinuity set. Df={x∈[a,b]:ωf(x)>0}={x∈[a,b]:f is discontinuous at x}D_f = \{x \in [a,b] : \omega_f(x) > 0\} = \{x\in[a,b] : f \text{ is discontinuous at } x\}.

Measure zero. A set E⊆RE\subseteq \mathbb{R} has (Lebesgue) measure zero if for every ε>0\varepsilon > 0 there exists a countable collection of open intervals {In}n=1∞\{I_n\}_{n=1}^\infty with

E⊆⋃n=1∞Inand∑n=1∞∣In∣<ε,E \subseteq \bigcup_{n=1}^\infty I_n \qquad \text{and} \qquad \sum_{n=1}^\infty |I_n| < \varepsilon,

where ∣In∣|I_n| denotes the length of InI_n. (Equivalently one may require finitely many intervals when EE is compact, by compactness — this equivalence is used in the proof below.)

Intuition

The classical theorems already known — continuity implies integrability, monotonicity implies integrability, finitely many jumps do not obstruct integrability — all share a hidden feature: in each case the "bad set" (where ff fails to be continuous) is either empty, finite, or at worst countable. Riemann's integral is built from upper and lower Darboux sums, and what actually damages a Darsboux sum is not the number of discontinuities but the total width of intervals over which ff's values swing by a fixed nontrivial amount. A single jump discontinuity contributes an error to U(f,P)−L(f,P)U(f,P) - L(f,P) proportional to the width of the one subinterval containing it — negligible in the limit. Infinitely many jumps can still be negligible if they can be corralled into subintervals of arbitrarily small total length. That corralling condition is exactly measure zero. The right way to organize the discontinuity set is by how badly ff oscillates, not simply whether it is continuous. Define for each η>0\eta>0 the set

Dη={x∈[a,b]:ωf(x)≥η}.D_\eta = \{x\in[a,b] : \omega_f(x) \ge \eta\}.

Each DηD_\eta turns out to be closed (a compactness-friendly set), and

Df=⋃n=1∞D1/n,D_f = \bigcup_{n=1}^\infty D_{1/n},

since a point has ωf(x)>0\omega_f(x)>0 iff ωf(x)≥1/n\omega_f(x) \ge 1/n for some nn. This decomposition is the technical heart of the theorem: it converts a statement about an arbitrary discontinuity set into a countable union of compact oscillation-level sets, each of which can be attacked with a finite subcover argument reminiscent of the Heine–Borel theorem. The picture below shows a bounded function with a large jump at one point, a countable sequence of shrinking jumps accumulating at another point, and continuity elsewhere — illustrating a discontinuity set that is countably infinite yet still measure zero, hence integrable by Lebesgue's criterion.

Figure
A bounded function with jump discontinuities at x=0.3x=0.3 and at points xn=0.7+1/(n+2)x_n = 0.7 + 1/(n+2) accumulating at 0.70.7; all such points form a countable (hence measure-zero) set.
x y 0.3 0.7 x₁ x₂ jump at 0.3 jumps → 0.7
TheoremLebesgue's Criterion for Riemann Integrability

Let f:[a,b]→Rf:[a,b]\to\mathbb{R} be a bounded function, and let

Df={x∈[a,b]:f is discontinuous at x}.D_f = \{x\in[a,b] : f \text{ is discontinuous at } x\}.

Then ff is Riemann integrable on [a,b][a,b] if and only if DfD_f has Lebesgue measure zero.

Proof

We use the Equivalence of Riemann and Darboux Integrals, so it suffices to prove:

f is Darboux integrable  ⟺  Df has measure zero.f \text{ is Darboux integrable} \iff D_f \text{ has measure zero.}

Fix M>0M>0 with ∣f(x)∣≤M|f(x)| \le M for all x∈[a,b]x\in[a,b], so all oscillations below lie in [0,2M][0,2M].

Step 1: The level-set decomposition. For η>0\eta > 0 define

Dη={x∈[a,b]:ωf(x)≥η}.D_\eta = \{x \in [a,b] : \omega_f(x) \ge \eta\}.

Claim: DηD_\eta is closed (hence compact, being a closed subset of [a,b][a,b]). We show [a,b]∖Dη[a,b]\setminus D_\eta is open in [a,b][a,b]. Let x∉Dηx \notin D_\eta, so ωf(x)<η\omega_f(x) < \eta. By definition of ωf(x)\omega_f(x) as an infimum, there is δ>0\delta>0 with Ωf(Bδ(x))<η\Omega_f(B_\delta(x)) < \eta. For any y∈Bδ/2(x)y \in B_{\delta/2}(x), we have Bδ/2(y)⊆Bδ(x)B_{\delta/2}(y) \subseteq B_\delta(x) (triangle inequality on the real line), so

Ωf(Bδ/2(y))≤Ωf(Bδ(x))<η,\Omega_f(B_{\delta/2}(y)) \le \Omega_f(B_\delta(x)) < \eta,

hence ωf(y)≤Ωf(Bδ/2(y))<η\omega_f(y) \le \Omega_f(B_{\delta/2}(y)) < \eta, i.e. y∉Dηy \notin D_\eta. Thus Bδ/2(x)∩[a,b]B_{\delta/2}(x) \cap [a,b] is an open neighborhood of xx (relative to [a,b][a,b]) missing DηD_\eta, proving DηD_\eta closed. ■\blacksquare (claim) Since ωf(x)>0  ⟺  ωf(x)≥1/n\omega_f(x) > 0 \iff \omega_f(x) \ge 1/n for some n∈Nn\in\mathbb{N}, we get

Df=⋃n=1∞D1/n.(∗)D_f = \bigcup_{n=1}^{\infty} D_{1/n}. \tag{$\ast$}

Step 2 (⇐\Leftarrow): measure zero implies integrable. Suppose DfD_f has measure zero. Fix ε>0\varepsilon>0. We must produce a partition PP with U(f,P)−L(f,P)<εU(f,P)-L(f,P)<\varepsilon. Set η=ε2(b−a)\eta = \dfrac{\varepsilon}{2(b-a)}. Since Dη⊆DfD_\eta \subseteq D_f and subsets of measure-zero sets have measure zero (any cover of DfD_f by intervals of total length <δ<\delta also covers DηD_\eta), DηD_\eta has measure zero. As DηD_\eta is compact, we may extract a finite subcover: there is a finite collection of open intervals J1,…,JkJ_1,\dots,J_k with

Dη⊆⋃i=1kJi,∑i=1k∣Ji∣<ε4M.D_\eta \subseteq \bigcup_{i=1}^k J_i, \qquad \sum_{i=1}^k |J_i| < \frac{\varepsilon}{4M}.

(Start from a countable cover of total length <ε/(4M)< \varepsilon/(4M), which exists by measure zero, and extract a finite subcover of the compact set DηD_\eta by Heine–Borel; the finite subcollection has total length no larger than the original countable sum.) Let K=[a,b]∖⋃i=1kJiK = [a,b] \setminus \bigcup_{i=1}^k J_i. Then KK is compact (closed and bounded, complement of a finite union of open sets intersected with [a,b][a,b]), and every point of KK has oscillation <η<\eta (since K∩Dη=∅K \cap D_\eta = \emptyset). For each x∈Kx \in K, since ωf(x)<η\omega_f(x)<\eta, there is an open interval Ix∋xI_x \ni x with Ωf(Ix∩[a,b])<η\Omega_f(I_x \cap [a,b]) < \eta. The collection {Ix}x∈K\{I_x\}_{x\in K} covers KK; by compactness extract a finite subcover Ix1,…,IxmI_{x_1},\dots,I_{x_m}. Now form a partition P={a=t0<t1<⋯<tN=b}P = \{a = t_0 < t_1 < \cdots < t_N = b\} of [a,b][a,b] fine enough that:

  • the endpoints of J1,…,JkJ_1,\dots,J_k and of Ix1,…,IxmI_{x_1},\dots,I_{x_m} (intersected with [a,b][a,b]) are all among the tjt_j (refine the finite covers into a common partition), and
  • every subinterval [tj−1,tj][t_{j-1},t_j] is entirely contained in some JiJ_i or entirely contained in some IxℓI_{x_\ell}.

(Such a partition exists: take all the endpoints of all the Ji∩[a,b]J_i \cap [a,b] and Ixℓ∩[a,b]I_{x_\ell}\cap[a,b], together with a,ba,b, sort them; because {Ji}∪{Ixℓ}\{J_i\} \cup \{I_{x_\ell}\} covers [a,b][a,b], every resulting subinterval lies inside at least one of these open sets, since an open cover of a closed bounded interval by finitely many open intervals, when all endpoints are marked, yields subintervals each contained in a single covering interval.) Split the index set {1,…,N}\{1,\dots,N\} into:

A={j:[tj−1,tj]⊆Ji for some i},B={1,…,N}∖A.A = \{ j : [t_{j-1},t_j] \subseteq J_i \text{ for some } i\}, \qquad B = \{1,\dots,N\}\setminus A.

For j∈Bj \in B, [tj−1,tj]⊆Ixℓ[t_{j-1},t_j] \subseteq I_{x_\ell} for some ℓ\ell, so Ωf([tj−1,tj])≤Ωf(Ixℓ∩[a,b])<η\Omega_f([t_{j-1},t_j]) \le \Omega_f(I_{x_\ell}\cap[a,b]) < \eta. Then

U(f,P)−L(f,P)=∑j=1NΩf([tj−1,tj]) (tj−tj−1)U(f,P) - L(f,P) = \sum_{j=1}^N \Omega_f([t_{j-1},t_j])\,(t_j - t_{j-1})
=∑j∈AΩf([tj−1,tj])(tj−tj−1)+∑j∈BΩf([tj−1,tj])(tj−tj−1).= \sum_{j\in A} \Omega_f([t_{j-1},t_j])(t_j-t_{j-1}) + \sum_{j\in B} \Omega_f([t_{j-1},t_j])(t_j-t_{j-1}).

For the first sum, use Ωf≤2M\Omega_f \le 2M always, and the subintervals indexed by AA have total length at most ∑i∣Ji∣<ε/(4M)\sum_i |J_i| < \varepsilon/(4M) (each such subinterval sits inside some JiJ_i, and subintervals inside a common JiJ_i from a partition are disjoint, so their lengths sum to at most ∣Ji∣|J_i|):

∑j∈AΩf([tj−1,tj])(tj−tj−1)≤2M⋅ε4M=ε2.\sum_{j\in A} \Omega_f([t_{j-1},t_j])(t_j - t_{j-1}) \le 2M \cdot \frac{\varepsilon}{4M} = \frac{\varepsilon}{2}.

For the second sum, use Ωf([tj−1,tj])<η\Omega_f([t_{j-1},t_j]) < \eta and the total length of all subintervals is at most (b−a)(b-a):

∑j∈BΩf([tj−1,tj])(tj−tj−1)<η⋅(b−a)=ε2.\sum_{j\in B} \Omega_f([t_{j-1},t_j])(t_j-t_{j-1}) < \eta \cdot (b-a) = \frac{\varepsilon}{2}.

Adding, U(f,P)−L(f,P)<ε/2+ε/2=εU(f,P) - L(f,P) < \varepsilon/2 + \varepsilon/2 = \varepsilon. Since ε>0\varepsilon>0 was arbitrary, ff satisfies the Riemann/Darboux Cauchy criterion for integrability, so ff is integrable.

Step 3 (⇒\Rightarrow): integrable implies measure zero. Suppose ff is integrable. By (∗)(\ast) it suffices to show each D1/nD_{1/n} has measure zero, since a countable union of measure-zero sets has measure zero (a standard fact about measure zero: cover the nn-th set by intervals of total length <ε/2n<\varepsilon/2^n, and take the union of all covers, total length <ε<\varepsilon). Fix nn and let η=1/n\eta = 1/n; we show DηD_\eta has measure zero. Fix ε>0\varepsilon > 0. Since ff is integrable, by the Cauchy criterion there is a partition P={a=t0<⋯<tN=b}P = \{a=t_0<\cdots<t_N=b\} with

U(f,P)−L(f,P)<ηε2.U(f,P) - L(f,P) < \frac{\eta \varepsilon}{2}.

Let A={j:(tj−1,tj)∩Dη≠∅}A = \{ j : (t_{j-1},t_j) \cap D_\eta \ne \emptyset \}. If x∈Dηx \in D_\eta lies in the open subinterval (tj−1,tj)(t_{j-1},t_j) for some j∈Aj\in A, then since this subinterval is an open neighborhood of xx, Ωf([tj−1,tj])≥ωf(x)≥η\Omega_f([t_{j-1},t_j]) \ge \omega_f(x) \ge \eta (because Ωf\Omega_f over any set containing a neighborhood of xx is at least the oscillation at xx, using that ωf(x)\omega_f(x) is an infimum over shrinking neighborhoods, hence a lower bound is inherited by any larger enclosing set... precisely: [tj−1,tj]⊇Bδ(x)[t_{j-1},t_j] \supseteq B_\delta(x) for small δ\delta, so Ωf([tj−1,tj])≥Ωf(Bδ(x))≥ωf(x)≥η\Omega_f([t_{j-1},t_j]) \ge \Omega_f(B_\delta(x)) \ge \omega_f(x) \ge \eta). Then

ηε2>U(f,P)−L(f,P)=∑j=1NΩf([tj−1,tj])(tj−tj−1)≥∑j∈Aη (tj−tj−1)=η∑j∈A(tj−tj−1).\frac{\eta\varepsilon}{2} > U(f,P)-L(f,P) = \sum_{j=1}^N \Omega_f([t_{j-1},t_j])(t_j-t_{j-1}) \ge \sum_{j \in A} \eta\,(t_j - t_{j-1}) = \eta \sum_{j\in A}(t_j-t_{j-1}).

Dividing by η\eta: ∑j∈A(tj−tj−1)<ε/2\sum_{j\in A}(t_j - t_{j-1}) < \varepsilon/2. Now, Dη⊆⋃j∈A(tj−1,tj)∪FD_\eta \subseteq \bigcup_{j\in A}(t_{j-1},t_j) \cup F, where FF is the finite set of partition points {t0,…,tN}\{t_0,\dots,t_N\} together with any points of DηD_\eta that are partition points themselves and not covered — in any case FF is finite. (Every point of DηD_\eta either lies in some open subinterval (tj−1,tj)(t_{j-1},t_j), in which case that j∈Aj \in A by definition of AA, or is itself one of the finitely many partition points tjt_j.) Cover FF (finite, say ∣F∣=r|F| = r points) by open intervals of total length <ε/2< \varepsilon/2 (e.g. each point by an interval of length ε/(2r)\varepsilon/(2r)). Combining with the intervals (tj−1,tj)(t_{j-1},t_j), j∈Aj\in A, of total length <ε/2< \varepsilon/2, we obtain a countable (here finite) cover of DηD_\eta by open intervals of total length <ε< \varepsilon. Since ε>0\varepsilon>0 was arbitrary, Dη=D1/nD_\eta = D_{1/n} has measure zero. As this holds for every nn, and Df=⋃nD1/nD_f = \bigcup_n D_{1/n} is a countable union of measure-zero sets, DfD_f has measure zero. ■\blacksquare

∎

Worked examples

Example 1: A function with a countable, non-eventually-isolated discontinuity set. Let f:[0,1]→Rf:[0,1]\to\mathbb{R} be defined by

f(x)={1qif x=pq in lowest terms, q≥1, p≥0,0if x is irrational.f(x) = \begin{cases} \dfrac{1}{q} & \text{if } x = \dfrac{p}{q} \text{ in lowest terms}, \ q\ge 1, \ p\ge 0,\\[4pt] 0 & \text{if } x \text{ is irrational.} \end{cases}

This is Thomae's function. Its discontinuity set is Df=Q∩[0,1]D_f = \mathbb{Q}\cap [0,1]: one can show directly ff is continuous at every irrational and discontinuous at every rational (a standard fact, provable via the ε\varepsilon–δ\delta definition using that only finitely many rationals in [0,1][0,1] have denominator below any bound NN). Since Q∩[0,1]\mathbb{Q}\cap[0,1] is countable, and every countable set has measure zero — enumerate it as {q1,q2,… }\{q_1,q_2,\dots\}, cover qnq_n by an interval of length ε/2n+1\varepsilon/2^{n+1}, total length <ε<\varepsilon — Lebesgue's criterion gives immediately that ff is Riemann integrable, without any need to estimate Darboux sums directly. (One further computes ∫01f=0\int_0^1 f = 0, but the criterion alone settles integrability.)

Example 2: A bounded function discontinuous on a "fat" set — non-integrable, showing sharpness. We build a fat Cantor set C⊆[0,1]C \subseteq [0,1]: a Cantor-like set with positive Lebesgue measure, and a bounded function whose discontinuity set is exactly CC, hence not integrable. Construction of CC. Start with [0,1][0,1]. At stage 11, remove the open middle interval of length 1/41/4 (not 1/31/3) from [0,1][0,1], leaving two closed intervals of total length 1−1/41 - 1/4. At stage kk, from each of the 2k−12^{k-1} remaining closed intervals, remove an open middle interval of length 1/4 k+11/4^{\,k+1} times... concretely, remove middle open intervals of total length 1/4k1/4^{k} at stage kk across all remaining pieces combined (there are standard variants; we specify total removed length at stage kk is 2k−1⋅ℓk2^{k-1}\cdot \ell_k where ℓk=14k⋅2k−1\ell_k = \dfrac{1}{4^k \cdot 2^{k-1}}, chosen so total removed length across all stages is

∑k=1∞2k−1ℓk=∑k=1∞14k=13.\sum_{k=1}^\infty 2^{k-1}\ell_k = \sum_{k=1}^\infty \frac{1}{4^k} = \frac{1}{3}.

Let C=[0,1]∖⋃k(removed intervals)C = [0,1] \setminus \bigcup_{k} (\text{removed intervals}). Then CC is closed (complement of a union of open intervals), nowhere dense (contains no interval, since at every stage every remaining piece is subdivided further), uncountable (it is a Cantor set, homeomorphic to the standard middle-thirds Cantor set via the tree of choices at each stage), and has measure

m(C)=1−13=23>0.m(C) = 1 - \frac{1}{3} = \frac{2}{3} > 0.

The function. Define

f(x)={1x∈C0x∉C.f(x) = \begin{cases} 1 & x \in C\\ 0 & x \notin C.\end{cases}

This is bounded (0≤f≤10 \le f \le 1). Its discontinuity set is exactly CC: at any x∈Cx \in C, since CC is nowhere dense, every neighborhood of xx contains points not in CC (where f=0f=0) and (since x∈Cx\in C itself, or by density of CC in itself at non-isolated points — one checks CC has no isolated points by construction) also points of CC arbitrarily close, so Ωf(Bδ(x))=1\Omega_f(B_\delta(x)) = 1 for all δ\delta, giving ωf(x)=1>0\omega_f(x) = 1 > 0; at x∉Cx \notin C, since [0,1]∖C[0,1]\setminus C is open, a whole neighborhood of xx avoids CC, so f≡0f \equiv 0 near xx and ff is continuous there. Since Df=CD_f = C has measure 2/3≠02/3 \ne 0, Lebesgue's criterion says ff is not Riemann integrable — and indeed one can check directly that for every partition PP, every subinterval of positive length meets both CC and its complement (since CC is nowhere dense but has positive measure, no subinterval can avoid it or be swallowed by it), so U(f,P)=1U(f,P) = 1 and L(f,P)=0L(f,P) = 0 for every partition, giving U(f,P)−L(f,P)=1U(f,P) - L(f,P) = 1 always — confirming non-integrability directly, exactly as the criterion predicts.

CounterexampleDropping boundedness

The hypothesis that ff is bounded cannot be dropped. Consider

f(x)={1x0<x≤10x=0.f(x) = \begin{cases} \dfrac{1}{x} & 0 < x \le 1\\ 0 & x = 0.\end{cases}

Here ff is continuous at every point of (0,1](0,1] and also, trivially, "continuous" only in the sense of being defined at x=0x=0; in fact ff is discontinuous only at x=0x=0 (a single point, since on (0,1](0,1] it agrees with the continuous function 1/x1/x, and at 00 it fails to have a limit at all — actually it fails even to be bounded near 00). So Df={0}D_f = \{0\}, a single point, which trivially has measure zero. Yet ff is not Riemann integrable on [0,1][0,1], because Riemann integrability of unbounded functions is not even defined within the Darboux framework: upper and lower sums U(f,P)U(f,P) and L(f,P)L(f,P) require sup⁡\sup and inf⁡\inf of ff on each subinterval to be finite, and any subinterval touching 00 has sup⁡f=+∞\sup f = +\infty there. So U(f,P)=+∞U(f,P) = +\infty for every partition PP, and the Darboux integral is not defined. This shows boundedness is not a technical nicety but a load-bearing hypothesis: without it, "DfD_f has measure zero" says nothing about integrability because the very notion of Riemann/Darboux integrability presupposes bounded ff, and the proof of Lebesgue's criterion uses boundedness essentially (the constant MM bounding all oscillations, used to control the sum over AA in Step 2).

Scope, edge cases & common traps

SituationWhat the criterion says
ff continuous on [a,b][a,b]Df=∅D_f = \emptyset, measure zero, integrable — recovers the basic continuity theorem
ff monotone on [a,b][a,b]DfD_f is at most countable (jump discontinuities of a monotone function are countable), hence measure zero, integrable — recovers Integrability of Monotone Functions
ff has finitely many discontinuitiesFinite sets have measure zero; integrable regardless of the size of the jumps (as long as ff bounded)
ff = indicator of a countable dense set (e.g. Dirichlet-type on rationals)Discontinuous everywhere on [a,b][a,b]; Df=[a,b]D_f = [a,b], measure b−a≠0b-a \ne 0; not integrable
ff = indicator of a fat Cantor set (positive measure, nowhere dense)DfD_f has positive measure even though it's nowhere dense and "looks Cantor-thin"; not integrable — see counterexample-style Example 2 above
ff unboundedCriterion inapplicable; Darboux sums undefined

The mathematician behind it

Origins · 1 minHenri Léon Lebesgue and how this was discovered
HL
Henri Léon Lebesgue
1875–1941 · Analysis, Paris, early 20th century

Henri Lebesgue transformed integration theory by constructing a new integral based on measuring the size of sets on which a function takes given ranges of values, rather than partitioning the domain into intervals as Riemann had done. His 1902 doctoral thesis "Intégrale, longueur, aire" introduced the Lebesgue measure and Lebesgue integral, and as a corollary produced the precise characterization of Riemann integrability treated in this article: a bounded function is Riemann integrable exactly when its discontinuities form a measure-zero set. This theorem sits at the hinge between the classical Riemann integral and the modern Lebesgue integral, both explaining the successes of the former and motivating the necessity of the latter for functions whose bad behavior is spread over sets of positive measure.

History
- 1854: Bernhard Riemann introduces his integral via Riemann sums, in work on trigonometric series, decades before publication.
- 1881: Vito Volterra constructs pathological examples probing the boundary of Riemann integrability, foreshadowing the need for a measure-theoretic criterion.
- 1898–1901: Émile Borel develops the foundations of what becomes measure theory, introducing measure-zero (Borel) sets.
- 1902: Henri Lebesgue's thesis constructs Lebesgue measure and the Lebesgue integral, and states the criterion characterizing Riemann integrable functions via measure-zero discontinuity sets.
- 1904: Lebesgue's Leçons sur l'intégration et la recherche des fonctions primitives gives the systematic exposition of these ideas, cementing the criterion's place in analysis.
Does Lebesgue's criterion tell you the value of the integral?

No. The criterion is purely an existence statement: it tells you whether ∫abf dx\int_a^b f\,dx exists as a Riemann integral, based solely on the size (in the measure-zero sense) of the discontinuity set. It gives no information about the numerical value of the integral. To actually compute ∫abf dx\int_a^b f\,dx once integrability is established, you still need the usual tools: the Fundamental Theorem of Calculus when an antiderivative is available, direct computation of Darboux sums, or other integration techniques. For example, knowing Thomae's function is integrable by the criterion tells you nothing directly about the fact that its integral equals 00; that requires a separate argument bounding upper and lower sums.

Is "measure zero" the same as "countable"?

No, and this is the most important subtlety of the theorem. Every countable set has measure zero (cover the nn-th point with an interval of length ε/2n+1\varepsilon/2^{n+1}), but there exist uncountable sets of measure zero — the standard middle-thirds Cantor set is the classic example, having measure zero despite having the cardinality of the continuum. Conversely, there exist uncountable, even nowhere-dense, sets of positive measure (the "fat Cantor sets" constructed by removing smaller relative amounts at each stage). So measure zero is a strictly different, and strictly weaker in one direction stronger in another, notion than countability — neither notion implies the other in general, though countable always implies measure zero.

Why does the proof need both a countable union decomposition and a compactness argument?

The discontinuity set DfD_f itself need not be closed or compact — for instance for Thomae's function Df=Q∩[0,1]D_f = \mathbb{Q}\cap[0,1] is dense, not closed. Directly analyzing DfD_f with compactness tools (like finite subcovers) is not possible. The trick is to decompose Df=⋃nD1/nD_f = \bigcup_n D_{1/n} into oscillation level sets DηD_\eta, each of which is closed (proven via a direct ε\varepsilon–δ\delta argument on oscillation), hence compact by Heine–Borel. Compactness of each DηD_\eta is what allows extracting finite subcovers from measure-zero covers, which is essential to constructing a single finite partition controlling the Darboux sum difference.

Does this theorem generalize to higher dimensions, e.g. Riemann integration on Rn\mathbb{R}^n?

Yes. The multivariable Riemann integral over a rectangle (or more general Jordan-measurable region) in Rn\mathbb{R}^n satisfies the exact analogue: a bounded function is Riemann integrable if and only if its set of discontinuities has nn-dimensional Lebesgue measure zero. The proof strategy is essentially identical, with oscillation defined via balls or cubes in Rn\mathbb{R}^n and the compactness/finite-subcover argument carried out with nn-dimensional boxes instead of intervals. This is the standard route to justifying Fubini-type iterated integration for Riemann integrals of several variables.

How does this theorem foreshadow the Lebesgue integral?

It exposes exactly the failure mode of Riemann integration: whenever a bounded function's bad behavior is spread over a set of positive measure (how ever "thin" that set looks topologically, e.g. nowhere dense), Riemann integration simply cannot assign it a value. Lebesgue's own integral, built by partitioning the range of ff and measuring preimages, integrates such functions (e.g. the indicator of a fat Cantor set is trivially Lebesgue integrable with integral equal to the measure of the set) with no restriction on the discontinuity set at all. In this sense, Lebesgue's criterion for the Riemann integral is historically and logically the doorway through which the more general Lebesgue integral enters analysis.

Is the converse direction (integrable ⇒\Rightarrow measure zero) really necessary to check, or is it "obvious"?

It is not obvious, and both directions require genuine work; this is a common misconception. The forward direction (measure zero ⇒\Rightarrow integrable) matches intuition — few "big" discontinuities should still be tolerable if their total width is small. But the converse, that integrability forces the discontinuity set to have measure zero, is a nontrivial constraint: it says you can never "hide" oscillation of size ≥η\ge \eta over a set of positive measure and still have small Darboux sum differences. The proof of the converse (Step 3 above) directly uses the Cauchy criterion for integrability to bound the total length of subintervals where oscillation is large, which is the crux of why the theorem is an if and only if, not merely a sufficient condition.

What role does the choice of η=ε/(2(b−a))\eta = \varepsilon / (2(b-a)) play in the proof, and is it arbitrary?

It is a deliberate quantitative choice ensuring the "good" part of the Darboux sum (subintervals of small oscillation) contributes at most ε/2\varepsilon/2 to U(f,P)−L(f,P)U(f,P)-L(f,P), since each such subinterval has oscillation <η<\eta and the subintervals have total length at most b−ab-a. Simultaneously the "bad" part (subintervals overlapping the finite cover of DηD_\eta) is engineered via the measure-zero hypothesis to have total length small enough that, even with the crude bound Ωf≤2M\Omega_f \le 2M, its contribution is also at most ε/2\varepsilon/2. The specific constants (2(b−a)2(b-a), 4M4M) are not sacred; they are simply calibrated so the two error terms each land at ε/2\varepsilon/2, summing to ε\varepsilon. Any similarly calibrated split works.

Before this