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 ?

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

1 Answer 1


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

  • $\begingroup$ 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... $\endgroup$
    – user380364
    Dec 12, 2017 at 9:13
  • $\begingroup$ I don't understand what you mean. Can you better explain? $\endgroup$ Dec 12, 2017 at 14:20
  • $\begingroup$ The fact that $M<n$ don't implies that $\frac{b-a}{n}M\to 0$ when $n\to \infty $. $\endgroup$
    – Surb
    Dec 12, 2017 at 16:03
  • $\begingroup$ @Surb you are right. I see now. But we can easily show that M < 2. The proof would hold then. $\endgroup$ Dec 12, 2017 at 16:34
  • $\begingroup$ It's even not true ! The best you can do is that $M=\mathcal O(\sqrt{n})$ but not better. $\endgroup$
    – Surb
    Dec 12, 2017 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.