Show that $f(x)=\begin{cases}1/b& x=\frac{a}{b}\in [0,1],a,b\in\mathbb Z\\ 0&x\in \mathbb R\backslash \mathbb Q \cap [0,1]\end{cases}$ is integrable.

Show that $$f(x)=\begin{cases}\frac{1}{b}& x=\frac{a}{b}\in [0,1],a,b\in\mathbb Z\\ 0&x\in \mathbb R\backslash \mathbb Q \cap [0,1]\end{cases}$$ is integrable on $[0,1]$.

Let $$S_\sigma =\sum_{i=1}^n m_i(x_{i+1}-x_i)\quad \text{and}\quad S^{\sigma }=\sum_{i=1}^n M_i(x_{i+1}-x_i),$$ where $$M_i=\max_{ [x_{i+1},x_i]}f,\quad \text{and}\quad m_i=\min_{[x_{i+1},x_i]}f.$$

I have to show that $\overline{S}=\underline{S}$ where $$\overline{S}=\sup_{\sigma }S_\sigma \quad \text{and}\quad \underline{S}=\inf_\sigma S^\sigma .$$

Obviously $S_\sigma =0$ for all partition $\sigma$, and thus $\overline{S}=0$. But for $\underline{S}$ I have some problem. I just can't find $M_i$. But maybe something as :

I consider $\sigma _n : 0<\frac{1}{n}<...<\frac{n-1}{n}<1$. Then I would say that $M_i\leq \frac{1}{i}$, and thus

$$S^{\sigma _n}\leq \frac{1}{n}\sum_{k=1}^n\frac{1}{k}\underset{n\to \infty }{\longrightarrow }0,$$ and thus, the claim follow. It work ?

• Just to clarify: I suppose you mean Riemann integrable? – Wojowu Dec 11 '17 at 20:44
• Yes !!! @Wojowu – user380364 Dec 11 '17 at 20:47
• The simplest way is to show that it is bounded and continuous except on a set of measure zero. Do you know that theorem? – Zach Boyd Dec 12 '17 at 2:54
• @ZachBoyd: If it would be enough, then $\boldsymbol 1_{\mathbb Q\cap [0,1]}$ would be Riemann integrable, what is wrong, no ? – user380364 Dec 12 '17 at 9:14
• The function you cited is everywhere discontinuous, whereas the one from the problem is continuous except at the rationals, which is the difference. – Zach Boyd Dec 12 '17 at 10:15

$f$ is integrable iff $\exists P$ for every $\epsilon >0$ such that $S^{\sigma}-S_{\sigma}<\epsilon$.

Choose $P=\{x_0, ....,x_n\}$ such that $x_i - x_{i-1} = \frac{b-a}{n}$.

$S_{\sigma} = 0$ on $P$ because for every interval $[x_i, x_{i+1}]$, $m_i=0$.

Also, since $f(x)<1$ for $x<1$, we also have $M_i < 1$ and so $$\sum_{i=1}^n M_i < n$$

Put $\sum_{i=1}^n M_i = M <n$

Therefore $S^{\sigma}-S_{\sigma} = \frac{b-a}{n}M - 0<\epsilon$ on $P$ for large enough $n$.

• In what your proof wouldn't work if $f$ would be $\boldsymbol 1_{\mathbb Q\cap [0,1]}$ ? Because as you made it, $\boldsymbol 1_{\mathbb Q\cap [0,1]}$ looks Riemann integrable... – user380364 Dec 12 '17 at 9:13
• I don't understand what you mean. Can you better explain? – Yousif Mansour Dec 12 '17 at 14:20
• The fact that $M<n$ don't implies that $\frac{b-a}{n}M\to 0$ when $n\to \infty$. – Surb Dec 12 '17 at 16:03
• @Surb you are right. I see now. But we can easily show that M < 2. The proof would hold then. – Yousif Mansour Dec 12 '17 at 16:34
• It's even not true ! The best you can do is that $M=\mathcal O(\sqrt{n})$ but not better. – Surb Dec 12 '17 at 16:36