I have seen the proof that the Dirichlet function is not Riemann integrable by showing that the upper and lower sums always take two different constant values (1 and 0 respectively). One can also conclude that this function is not Riemann integrable by showing it is discontinuous everywhere.
For the Thomae's function however, the set of discontinuities is the set of rationals which is a set of measure zero. Thus the Thomae's function is Riemann integrable.
I am finding it hard to wrap my head around the geometry of this however. We are essentially saying that one can compute the area under the Thomae's "curve" but not under the Dirichlet's "curve". Can someone explain the geometric intuition that makes one function integrable but not the other?
Thank you.
My mental image for Riemann integability is like this:
Of course, this intuitive picture is just a layman-term translation of the following characterization of upper and lower Darboux integrals:
\begin{align*} \overline{\int_{a}^{b}} f(x) \, \mathrm{d}x &= \inf \biggl\{ \int_{a}^{b} \varphi(x) \, \mathrm{d}x : \varphi \text{ is continuous and } \varphi \geq f \biggr\} \\ \underline{\int_{a}^{b}} f(x) \, \mathrm{d}x &= \sup \biggl\{ \int_{a}^{b} \varphi(x) \, \mathrm{d}x : \varphi \text{ is continuous and } \varphi \leq f \biggr\} \end{align*}
Now let's come back to the Thomae's function:
As you see, most "peaks" of the graph of the Thomae's function are "small". So, when we squeeze the graph from below and above, the effect of those isolated, "large" peaks can be easily handled. Since the same will be true as the squeezing goes further and further, it is not hard to convince ourselves that this function is indeed Riemann integrable.