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 ?