Small Discontinuity Sets and Riemann Integrability
Riemann integrability is controlled not by how complicated a bounded function looks, but by the size of the set where it is discontinuous. A finite set of discontinuities is harmless, and so is a countable one. Even a dense discontinuity set can be harmless if it has Lebesgue measure zero: density describes where points occur, while measure describes the size of the set.
Let \(a<b\), and let \(f:[a,b]\to\mathbb{R}\) be bounded. Write \(D_f\) for the set of points where \(f\) is discontinuous, using one-sided continuity at the endpoints. Lebesgue’s criterion, established in the earlier material on Riemann integrability, states that \(f\) is Riemann integrable if and only if \(D_f\) has Lebesgue measure zero. When this criterion gives Riemann integrability, the Riemann integral agrees with the Lebesgue integral of \(f\) on \(([a,b],\mathcal{L},m)\).
Proof. A subset of a Lebesgue null set is Lebesgue measurable and null, since Lebesgue measure is complete. Thus, if \(D_f\) is contained in a null set, then \(m(D_f)=0\), and Lebesgue’s criterion gives Riemann integrability. For the countable case, list the points as \(x_1,x_2,\ldots\). Given \(\varepsilon>0\), cover \(x_n\) by an open interval of length \(\varepsilon 2^{-n}\). The union covers the countable set and has total length at most \(\sum_{n=1}^{\infty}\varepsilon 2^{-n}=\varepsilon\). Its outer measure is therefore at most every \(\varepsilon>0\), hence zero. A finite set is covered by the same argument, or by finitely many intervals of arbitrarily small total length. \(\square\)
The corollary uses boundedness as well as smallness of the discontinuity set. It does not assert that every bounded function is Riemann integrable, or that a function with an unbounded singularity on a null set is Riemann integrable in the proper Riemann sense. The compact interval and boundedness are part of the criterion being applied.
Finite and Countable Exceptional Sets
Worked Example: Changing a Function at One Point
On \([0,1]\), define \(f(x)=x\) for \(x\ne \tfrac12\), and set \(f(\tfrac12)=2\). Determine its discontinuities and integral.
At every \(x\ne\tfrac12\), a sufficiently small neighborhood avoids \(\tfrac12\), so \(f(y)=y\) throughout that neighborhood and \(f\) is continuous at \(x\). At \(x=\tfrac12\), values at nearby points \(y\ne\tfrac12\) tend to \(\tfrac12\), whereas \(f(\tfrac12)=2\); hence \(f\) is discontinuous there. Thus \(D_f=\{\tfrac12\}\), which is null, and \(f\) is bounded and Riemann integrable by the criterion.
On \(([0,1],\mathcal{L},m)\), \(f=x\) almost everywhere because the functions differ only on a singleton. Therefore their Lebesgue integrals agree, and the equality of the Riemann and Lebesgue integrals for bounded Riemann integrable functions gives
Check: replacing the value at one point does not change any Lebesgue integral, since \(m(\{\tfrac12\})=0\). The resulting value \(\tfrac12\) is also the integral of the unchanged function \(x\).
Worked Example: A Countable Set of Point Modifications
For \(x\in[0,1]\), let \(S=\{1/n:n\ge2\}\) and define \(f(x)=x+\chi_S(x)\). Find \(D_f\) and \(\int_0^1 f(x)\,dx\).
The function is bounded: \(0\le f(x)\le 1+\tfrac12=\tfrac32\), since every point of \(S\) is at most \(\tfrac12\). At a point \(1/n\in S\), the value is \(1+1/n\), while values at nearby points outside \(S\) approach \(1/n\). Each \(1/n\) is isolated within \(S\), so such nearby points exist, and \(f\) is discontinuous there. At \(0\), \(f(0)=0\), but \(f(1/n)=1+1/n\to1\), so \(f\) is discontinuous at \(0\).
If \(x>0\) and \(x\notin S\), the sequence \(1/n\) has no accumulation point at \(x\): its only accumulation point in \([0,1]\) is \(0\). There is therefore a neighborhood of \(x\) that avoids \(S\), and \(f(y)=y\) there. The endpoint \(1\) also has a relative neighborhood avoiding \(S\). Consequently \(D_f=S\cup\{0\}\), a countable null set, and the criterion applies.
Since \(f=x\) outside the countable set \(S\), \(f=x\) almost everywhere on \(([0,1],\mathcal{L},m)\). Hence
Check: the difference is \(f-x=\chi_S\), and \(m(S)=0\) by countability. Thus \(\int_0^1(f-x)\,dm=0\), independently confirming that the integral is \(\tfrac12\).
Dense Discontinuities Can Still Be Small
A set can be dense and null at the same time. For example, the rational numbers in \((0,1)\) are countable and dense, so the preceding covering argument gives them measure zero. The next construction shows directly how a bounded function can be discontinuous at every one of these rationals and continuous everywhere else. Its Riemann integrability follows from the criterion, not from an absence of oscillation points in every interval.
Worked Example: Dense Discontinuities of Measure Zero
Enumerate \(\mathbb{Q}\cap(0,1)\) without repetitions as \(q_1,q_2,\ldots\), with \(q_1=\tfrac12\) and \(q_2=\tfrac13\). Define, for \(x\in[0,1]\),
Each summand is measurable and nonnegative. For every \(x\), the sum is at most \(\sum_{n=1}^{\infty}2^{-n}=1\), so \(F\) is bounded. Its partial sums \(F_N\) satisfy the uniform tail estimate
To check continuity at an irrational \(x\), fix \(\varepsilon>0\) and choose \(N\) with \(2^{-N}<\varepsilon\). The first \(N\) thresholds \(q_1,\ldots,q_N\) are all different from \(x\), so there is a neighborhood of \(x\) in which each of the first \(N\) indicators is constant. For any \(y\) in that neighborhood, the first \(N\) terms of \(F(y)\) and \(F(x)\) agree, and each remaining tail lies between \(0\) and \(2^{-N}\). Thus \(|F(y)-F(x)|\le 2^{-N}<\varepsilon\). The same argument, using relative neighborhoods, applies at the endpoints \(0\) and \(1\), which are not among the thresholds. Therefore \(F\) is continuous at every irrational point of \([0,1]\), including the endpoints.
At \(q_k\), the one-sided limits are
To justify these limits, first keep only the first \(N\) terms. Since the finitely many thresholds among them are distinct, sufficiently near \(q_k\) on either side their indicators have the indicated limiting values. The discarded tail is bounded by \(2^{-N}\), uniformly in \(x\), and this bound tends to zero as \(N\to\infty\). The right-hand limit exceeds the left-hand limit by exactly \(2^{-k}>0\). Hence \(F\) is discontinuous at \(q_k\). We have proved \(D_F=\mathbb{Q}\cap(0,1)\), a dense null set.
By the corollary, \(F\) is Riemann integrable. Its integral can be computed using the Monotone Convergence Theorem on the finite complete measure space \(([0,1],\mathcal{L},m)\): the partial sums \(F_N\) are measurable, nonnegative, and increase pointwise to \(F\). Also, \(m([q_n,1])=1-q_n\). Therefore
For the first two terms, \(2^{-1}(1-q_1)=\tfrac12(1-\tfrac12)=\tfrac14\), and \(2^{-2}(1-q_2)=\tfrac14(1-\tfrac13)=\tfrac16\). Their sum is \(\tfrac14+\tfrac16=\tfrac5{12}\). The remaining terms are nonnegative and at most \(\sum_{n=3}^{\infty}2^{-n}=2^{-2}=\tfrac14\), so the full integral lies between \(\tfrac5{12}\) and \(\tfrac5{12}+\tfrac14=\tfrac23\). This also checks convergence of the displayed integral series. Independently, the uniform tail estimate gives \(\left|\int F\,dm-\int F_N\,dm\right|\le 2^{-N}\); the partial-sum integrals are exactly \(\sum_{n=1}^N2^{-n}(1-q_n)\), confirming the same series value.
What Density Does—and Does Not—Tell Us
A common mistake is to argue, “The discontinuities are dense, so the function cannot be Riemann integrable.” That conclusion confuses density with measure. For the function \(F\) above, the discontinuities meet every open subinterval of \([0,1]\), but their set is countable and therefore null. Lebesgue’s criterion says that this is enough for Riemann integrability. The criterion concerns the measure of the entire discontinuity set, not whether every interval contains a discontinuity.
The converse pitfall is to infer integrability merely because discontinuities occur at only a few points while ignoring boundedness or the interval being considered. The criterion used here is for bounded real-valued functions on a compact interval. For example, an unbounded function is not covered by this proper Riemann integrability criterion, even if its unbounded behavior is concentrated at one point. Improper integrals require separate hypotheses and a separate definition.
Finally, countability is sufficient for nullity, but it is not necessary. Lebesgue’s criterion applies whenever \(D_f\) is null, including when it is uncountable. Thus the useful test is always to identify or contain the full discontinuity set, verify that it is Lebesgue null, and check that the function is bounded on the compact interval.
Check Your Understanding
For each question, specify the interval, boundedness, and discontinuity-set information needed to apply the criterion.
- Suppose a bounded function on \([0,1]\) is discontinuous at exactly five points. What does Lebesgue’s criterion imply?
- Why does a countable dense subset of \([0,1]\) have measure zero even though it meets every open subinterval?
- For \(f(x)=x+\chi_{\{1/n:n\ge2\}}(x)\), explain separately why \(f\) is discontinuous at \(0\) and at each \(1/n\).
- In the dense-discontinuity example, why is the tail after the \(N\)-th term bounded by \(2^{-N}\) uniformly in \(x\)?
- Which hypothesis prevents the criterion in this tutorial from directly covering an unbounded function on \([0,1]\)?