I am self-learning Real Analysis from the text Understanding Analysis by Stephen Abbott. Exercise 7.3.2 asks to show that Thomae's function is integrable. I would like a hint/clue for part (c) of this exercise problem, without giving away(revealing) the entire proof.
[Abbott 7.3.2] Recall that Thomae's function
\begin{equation*} t( x) =\begin{cases} 1 & \text{ if } x=0\\ 1/n & \ \text{if} \ x=m/n\in \mathbf{Q} \setminus \{0\} \ \text{is in its lowest terms with} \ n >0\\ 0 & \ \text{if } x\notin \mathbf{Q} \end{cases} \end{equation*}
has a countable set of discontinuities occurring at precisely every rational number. Follow these steps to prove that $\displaystyle t( x)$ is integrable on $\displaystyle [ 0,1]$ with $\displaystyle \int _{0}^{1} t=0$.
(a) First argue that $\displaystyle L( t,P) =0$ for any partition $\displaystyle P$ of $\displaystyle [ 0,1]$.
Proof.
Let $\displaystyle P$ be any arbitrary partition of $\displaystyle [ 0,1]$. Since the irrational numbers are dense in $\displaystyle \mathbf{R}$, every sub-interval of $\displaystyle P$ contains an irrational number. Thus:
\begin{equation*} L( t,P) =\sum _{k=1}^{n} m_{k} \Delta x_{k} =0\ \quad \{\because m_{k} =0,\forall k\} \end{equation*}
(b) Let $\displaystyle \epsilon >0$ and consider the set of points $\displaystyle D_{\epsilon /2} =\{x\in [ 0,1] :t( x) \geq \epsilon /2\}$. How big is $\displaystyle D_{\epsilon /2}$?
Proof.
Let $\displaystyle N\in \mathbf{N}$ be such that, for all $\displaystyle n\geq N$, we have:
\begin{equation*} \frac{1}{n} < \frac{\epsilon }{2} \end{equation*} Thus, the set $\displaystyle \{t( x) :t( x) \geq \epsilon /2\}$ consists of :
\begin{equation*} \left\{\frac{1}{N-1} ,\frac{1}{N-2} ,\dotsc ,1\right\} \end{equation*} Thus, the set $\displaystyle D_{\epsilon /2}$ consists of:
\begin{equation*} D_{\epsilon /2} =\left\{\frac{N-2}{N-1} ,\frac{N-3}{N-1} ,\dotsc ,\frac{1}{N-1} ,\frac{N-3}{N-2} ,\dotsc ,\frac{1}{N-2} ,\dotsc ,\frac{1}{2} ,1\right\} \end{equation*}
$\displaystyle D_{\epsilon /2}$ contains at most a finite number of points.
(c) Given $\epsilon > 0$, construct a partition $P_\epsilon$ for which $U(f,P_\epsilon) < \epsilon$.