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]$.


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}$?


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$.

  • 1
    $\begingroup$ small quibble: you need to define $N$ to be the smallest natural number such that for $n \ge N, \frac 1n < \frac \epsilon 2$, not just any $N$ for which the statement is true. Only the smallest $N$ will make your next conclusion true. $\endgroup$ Mar 20 at 16:50
  • 1
    $\begingroup$ To handle (c), surround each point of $D_{\epsilon/2}$ with intervals whose total length is $< \epsilon/2$. The regions between those intervals form the rest of the partition. $\endgroup$ Mar 20 at 16:53
  • $\begingroup$ @PaulSinclair, I was able to use the clue you provided. Since $D_{\epsilon/2}$ is a finite non-empty set, we can denote it by an ordered set $\{q_1< \ldots <q_M\}$. Surround each $q_k$ by subintervals of length $\epsilon/2M$. Their total contribution to $U(f,P)$ is $\sum_{k=1}^{M}M_k \cdot \Delta x_k \leq \sum_{k=1}^{M}1\cdot \frac{\epsilon}{2M} = \epsilon/2$. The region between those intervals forms the rest of the partition. For this entire region, $t(x) < \epsilon/2$. And $\sum \Delta x_k < 1$. It's total contribution to $U(f,P)$ is smaller than $\epsilon/2$. $\endgroup$
    – Quasar
    Mar 22 at 21:36
  • 1
    $\begingroup$ $0 \in D_{\epsilon/2}$ (when $\epsilon \le 2$), so $q_1 = 0$. Also, I suggest making your life a little easier by defining $\xi$ to be half the size. Then you can just add or subtract $\xi$, not $\xi/2$, But that is just a suggestion, not a problem with your current description. $\endgroup$ Mar 23 at 17:08
  • 3
    $\begingroup$ Does this answer your question? Upper Riemann Sum of the Thomae function $\endgroup$
    – Mittens
    Apr 2 at 14:20

1 Answer 1



In total, you have $N-2$ points where $t(x) = \frac{1}{N-1}$. Suppose that we define a map $t_{N-1}$ always vanishing except on intervals centered on the points mentioned previously with length equal to $l_{n-1}$ where $t_{N-1}$ is equal to $\frac{1}{N-1}$.

Define in a similar way maps $t_i$ for $i \in \{1, \dots, N-1\}$. Then define $\overline{t} = \sup (t_1, \dots, t_{N-1})$. We will have

$$0 \le U(\overline{t}, P_{\overline{t}}) \le \sum_{i=1}^{N-1} l_i.$$ Now pick up the $l_i$ the right way!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .