A Function That Oscillates in Every Interval
A bounded function can fail to be Riemann integrable even though its values never become large. The key issue is not the size of its values, but whether they vary within every subinterval, no matter how small that subinterval is.
Consider the function that takes the value \(1\) at every rational number and the value \(0\) at every irrational number. Rational and irrational numbers both occur inside every interval of positive length. Consequently, every part of a partition contains both function values. We will see that this forces an unchanged positive gap between the upper and lower Darboux sums.
Why Both Values Occur in Every Interval
The argument depends on two density facts. A set is dense in \(\mathbb{R}\) if every nonempty open interval contains at least one element of that set. Both \(\mathbb{Q}\) and the irrational numbers are dense in \(\mathbb{R}\).
Here is a justification of both claims. For the rational case, choose a positive integer \(n\) large enough that \(n(v-u)>1\). Let \(m=\lfloor nu\rfloor+1\), where \(\lfloor nu\rfloor\) is the greatest integer not exceeding \(nu\). Then \(m>nu\), while \(m\leq nu+1<nv\). Thus \(nu<m<nv\), and division by \(n\) gives \(u<m/n<v\). The number \(m/n\) is rational.
For the irrational case, first note that \(\sqrt{2}\) is irrational: if \(\sqrt{2}=p/q\) in lowest terms, then \(p^2=2q^2\), so \(p\) is even; substituting \(p=2k\) shows \(q^2=2k^2\), so \(q\) is even too, contradicting that \(p/q\) is in lowest terms. By the rational case, there is a rational number \(r\) in \((u-\sqrt{2},v-\sqrt{2})\). Then \(r+\sqrt{2}\) lies in \((u,v)\) and is irrational: if it were rational, subtracting the rational \(r\) would make \(\sqrt{2}\) rational.
Upper and Lower Values on a Partition
Let \([a,b]\) be an interval with \(a<b\). A partition \(P\) of \([a,b]\) is a finite sequence \(a=x_0<x_1<\cdots<x_n=b\). Its subintervals are \([x_{i-1},x_i]\), and the width of the \(i\)-th subinterval is \(\Delta x_i=x_i-x_{i-1}\).
For a bounded function \(f\), let \(M_i\) be its supremum on the \(i\)-th subinterval and \(m_i\) its infimum there. The upper Darboux sum \(U(f,P)\) uses the supremum on each subinterval; the lower Darboux sum \(L(f,P)\) uses the infimum:
Every subinterval of positive width contains an open interval, and that open interval contains both a rational number and an irrational number. On the rational input, \(f\) equals \(1\); on the irrational input, it equals \(0\). Since \(f\) only takes the values \(0\) and \(1\), its supremum on each subinterval is \(1\) and its infimum is \(0\).
Worked Example: Upper and Lower Sums on \([0,1]\)
Take the partition \(P=\{0,\frac14,\frac12,\frac34,1\}\). It has four subintervals, each of width \(\frac14\). In each subinterval, the supremum of \(f\) is \(1\) and the infimum is \(0\). Therefore,
The gap is \(U(f,P)-L(f,P)=1-0=1\), equal to the interval length. As a check on the arithmetic, the four widths sum to \(\frac14+\frac14+\frac14+\frac14=1\); multiplying their sum by the common supremum \(1\) gives the upper sum, and multiplying by the common infimum \(0\) gives the lower sum.
Worked Example: An Arbitrary Partition of \([-1,2]\)
Let \(P=\{-1,0,\frac12,2\}\). Its three widths are
Each subinterval has supremum \(1\) and infimum \(0\). Hence
The gap is \(3\). Checking against the interval length, the widths sum to \(1+\frac12+\frac32=3=2-(-1)\), as expected. The upper sum is this total width, and the lower sum is zero.
The Gap Never Shrinks
For any partition of \([a,b]\), the upper and lower values on every subinterval are \(M_i=1\) and \(m_i=0\). Substituting these values into the definitions gives
The equality \(\sum_{i=1}^{n}(x_i-x_{i-1})=b-a\) follows by cancellation: each interior partition point appears once with a positive sign and once with a negative sign, leaving \(x_n-x_0=b-a\). Thus \(U(f,P)-L(f,P)=b-a\) for every partition, including partitions with very small mesh.
For the function under consideration, if \(a<b\), the gap is always \(b-a>0\). Choose \(\varepsilon=(b-a)/2\). No partition can have gap less than \(\varepsilon\), because every partition has gap \(b-a\). The criterion therefore fails, proving that \(f\) is not Riemann integrable on any interval of positive length.
Proof Through Tagged Riemann Sums
The same obstruction can be seen using tagged Riemann sums. For a partition \(P\), choose one tag \(t_i\in[x_{i-1},x_i]\) for each subinterval. The tagged sum is \(\sum_{i=1}^{n}f(t_i)\Delta x_i\). Since rational and irrational numbers are both dense, each tag can be chosen to be rational, or each can be chosen to be irrational.
Worked Example: Two Tagged Sums with the Same Partition
Divide \([0,2]\) into \(n\) equal subintervals. Each width is \(\Delta x_i=2/n\), so the mesh, the largest subinterval width, is \(2/n\). First choose a rational tag in every subinterval. Each function value is \(1\), and the tagged sum is
Now keep the same partition and choose an irrational tag in every subinterval. Each function value is \(0\), so the tagged sum is
These calculations hold for every positive integer \(n\). As \(n\) increases, the mesh \(2/n\) tends to zero, but the two allowed tagged sums remain \(2\) and \(0\). Their difference is \(2\), the length of the interval. This verifies directly that refining the partition cannot make all tagged sums approach a common value.
A Common Mistake: Trusting One Choice of Tags
A rational tag can be selected in every subinterval, so it is tempting to compute the tagged sums \(2\) above and conclude that the integral is \(2\). That conclusion uses only one kind of tag. Riemann integrability requires the tagged sums to approach a common limit as the mesh tends to zero, not merely that one selection of tags has a limit.
The correction is to consider another permitted selection for exactly the same partitions: choose irrational tags. Those sums are all \(0\), rather than \(2\). Since both selections are valid for arbitrarily small mesh and remain separated by \(2\), there is no common tagged-sum limit. Likewise, the upper-lower criterion cannot be satisfied because its gap remains fixed at \(2\) on \([0,2]\).
Discontinuity and the Role of the Example
This function is discontinuous at every point of \([a,b]\). At a rational point, the function value is \(1\), but irrational points with function value \(0\) occur arbitrarily close. At an irrational point, the function value is \(0\), but rational points with function value \(1\) occur arbitrarily close. Density ensures such points exist in every interval around the point; at an endpoint, the same reasoning uses intervals on the side inside \([a,b]\).
The example shows that boundedness alone does not guarantee Riemann integrability, and that dense oscillation can obstruct it throughout an interval. It does not say that every bounded function with a dense set of discontinuities must fail to be integrable: integrability depends on the sizes and distribution of oscillations, not simply on whether discontinuities occur densely. Here the decisive fact is stronger: every subinterval has the full range of values \(0\) and \(1\), so no partition can reduce the upper-lower gap.
Check Your Understanding
Use the density of the rational and irrational numbers and the definitions of the upper and lower sums to answer these questions.
- What are the supremum and infimum of \(f\) on any interval of positive width?
- For a partition \(P\) of \([a,b]\), why does \(U(f,P)=b-a\)?
- Why is the lower sum \(L(f,P)=0\) for every such partition?
- Which condition in the upper-lower sum criterion fails when \(a<b\)?
- Why do rational tags alone not establish a tagged-sum limit?