A bounded function need not be continuous to have a Riemann integral. What matters is how much of the interval carries discontinuity. Lebesgue's criterion makes that statement exact: a bounded function on a compact interval is Riemann integrable precisely when its discontinuity set has Lebesgue measure zero. Dense discontinuities can therefore be harmless if they occupy no length.
Let with , and let be bounded, with . Continuity and neighborhoods are relative to , including at the endpoints. We use the Darboux criterion for Riemann integrability, compactness and the Lebesgue number lemma, completeness and outer regularity of Lebesgue measure, and dominated convergence.
Measuring local oscillation
Definition 1.10.1
(Oscillation of at a point)
For put , and for define
The function is continuous at exactly when : small oscillation controls differences from , and continuity makes all nearby values close to .
Proposition 1.10.2
(Oscillation sets are closed)
For every , the set
is closed in , and the discontinuity set
is a Borel set.
Proof
(The complement of an oscillation set is open)
If , a relative neighborhood of has oscillation less than . Every point of has a smaller neighborhood inside , and hence also has oscillation less than . So is relatively open. A point is a discontinuity exactly when for some , which gives (2); a countable union of closed sets is Borel.
The countable union is essential: it organizes all positive sizes of oscillation.
Theorem 1.10.3
(Lebesgue's criterion)
A bounded function is Riemann integrable if and only if its discontinuity set has Lebesgue measure zero.
Necessity: a Riemann integral forces a null set
Proof
(Bad intervals have small total length)
Let be a partition, and write and for its upper and lower Darboux sums. Fix . If lies in the interior of a partition interval, the oscillation on that interval is at least . Thus, apart from the finitely many partition points, is covered by those intervals whose oscillation is at least . Since each such interval contributes at least times its length to , their total length is at most
If is Riemann integrable, the Darboux criterion makes the numerator arbitrarily small. Finite sets have measure zero, so (3) gives . By (2), .
Sufficiency: a null discontinuity set controls the sums
Proof
(Cover the bad set by a small open set and use a Lebesgue number)
Conversely assume . Given , choose so that
The closed set is null. By outer regularity choose an open with . For every , , so there is a relative open neighborhood on which the oscillation of is less than . The family covers compact . Take a finite subcover and a positive Lebesgue number . Every partition with mesh less than has each closed subinterval contained either in or in one of the selected .
Intervals contained in overlap only at endpoints, so they have total length at most , and their oscillation is at most . Every other partition interval has oscillation less than . Therefore
The estimate holds for every partition with mesh below . The Darboux criterion proves that is Riemann integrable, and the same estimate controls all tagged sums at such mesh.
Proof X-ray
Where each hypothesis enters the sufficiency proof
The null hypothesis is used once, and only for the single closed set , not for all of : outer regularity turns it into an open set of measure below . Boundedness is used once as well, to price the intervals inside at oscillation ; without a finite these few short intervals could carry an unbounded contribution. The key move is compactness. A different neighborhood may be needed at each good point, and knowing that each has some neighborhood would not give one common mesh. The finite subcover and its Lebesgue number do: every partition interval shorter than fits inside or inside one , so each interval is either short in total or small in oscillation. The two error terms and were fixed before the partition was chosen, which is how the argument closes.
Together, necessity and sufficiency prove Lebesgue's criterion. Boundedness is part of the hypothesis and cannot be removed.
Counterexample mode
An unbounded function with one discontinuity
Claim: a function on whose discontinuity set is null is Riemann integrable. On let and for . It is continuous on , so is null. But is unbounded near : in every partition the first interval has , so every upper Darboux sum is infinite and is not Riemann integrable. Its Lebesgue integral is finite, , by monotone convergence. The criterion applies only to bounded functions; an improper Riemann integral is a separate limit.
Agreement of the two integrals
Theorem 1.10.4
(Riemann and Lebesgue integrals agree)
If is bounded and Riemann integrable on , then is Lebesgue measurable and equals its Riemann integral.
Proof
(Tagged step functions and dominated convergence)
Take partitions with mesh tending to zero and define tagged step functions to equal the corresponding tag value on each half-open interval , with . At every continuity point, the tag in the interval containing tends to , so . Each is Borel measurable; the convergence set and the limit extended by zero outside it are Borel measurable. This limit equals off the null Borel set , so completeness gives Lebesgue measurability of .
The functions are bounded by on the finite interval and converge to almost everywhere. Dominated convergence gives . Their integrals are the corresponding tagged Riemann sums , which tend to the Riemann integral as the mesh tends to zero. Hence the two integrals agree.
Completeness is used to pass from the Borel limit to itself. It guarantees that a modification of a measurable function on a null set remains measurable; it does not say that such a modification preserves continuity outside that set.
Dense discontinuities: two contrasting examples
Worked example 1.10.5
(The Dirichlet function)
The Dirichlet function is discontinuous everywhere because rationals and irrationals are both dense: every interval contains points with values and , so . It is Lebesgue measurable with integral zero, but its discontinuity set has measure one, so it is not Riemann integrable. Directly, every upper sum is and every lower sum is .
Worked example 1.10.6
(Thomae's function)
Define Thomae's function on by for irrational , and for rationals written in lowest terms with . At every rational it is discontinuous, since irrational points approach it with value zero. At an irrational , given , only finitely many rationals in have reduced denominator at most ; a small neighborhood avoids them, and all remaining function values are at most . Hence it is continuous at . Its discontinuities are the countable rationals, so it is Riemann integrable, and its integral is zero because almost everywhere. The discontinuity set is dense but null.
The criterion measures size, not cardinality, and the next example is the edge case.
Worked example 1.10.7
(An uncountable but null discontinuity set)
Let be the middle-thirds Cantor set: closed, uncountable, with empty interior, and of measure , since the removed open intervals have total length . For : at , the open complement contains a neighborhood of on which , so is continuous there. At , every neighborhood contains points outside , where , while , so is discontinuous. Thus is uncountable and null, is Riemann integrable, and both integrals equal .
Common mistake
(Almost everywhere equal to a continuous function is not enough)
The Dirichlet function equals the continuous function almost everywhere, yet it is not Riemann integrable. The criterion concerns the discontinuities of itself, and changing on a null set can create discontinuities everywhere. Lebesgue integrability, by contrast, is unaffected by such a change.
Practice
Quick check
(If is continuous on , what does the criterion say about its Riemann integrability?)
Solution · Answer
Its discontinuity set is empty, hence null, so it is Riemann integrable. A continuous function on a compact interval is bounded, so the criterion applies.
Quick check
(Why is the discontinuity set of a bounded function Borel?)
Solution · Answer
It is the countable union of the closed oscillation sets .
Quick check
(What are the Riemann and Lebesgue integrals of Thomae's function on ?)
Solution · Answer
Both are zero: it is zero off the countable rational set, and the two integrals agree.
Quick check
(Why does the Dirichlet function fail the Riemann criterion even though it is zero almost everywhere?)
Solution · Answer
It is discontinuous at every point because both rational and irrational points are dense; that set has measure one.