# Prove a function is not Darboux-integrable

Prove $$f(x) = \begin{cases} 2+x, & x \in \Bbb Q \\ 1, & x \notin \Bbb Q \end{cases}$$ is not integrable on $$[0,1]$$

My attempt:

Let $$P=\{t_0,...,t_n\}$$ be a partition of $$[0,1], I_i=[t_{i-1},t_i], m_i=\inf_{I_i}f, M_i=\sup_{I_i}f$$

Since there exists at least one irrational number in $$I_i$$ we have that $$m_i=1$$

Since there exists at least one rational number in $$I_i$$ we have that $$M_i=2+t_i$$ or $$M_i \approx 2+t_i$$, where $$t_i \in \Bbb Q$$

$$\implies L(f,P)=1-0=1 \ne \displaystyle{\sum _{i=1}^{n}} {M_i(t_i-t_{i-1})=U(f,P)}$$, because $$M_i \ne m_i$$ $$\forall i$$

Is this correct? If not, then what can be improved? Thanks in advance.

You could replace $$M_i \approx 2+t_i$$ by
$$M_i\ge 2$$ which is more precise.
then $$M_i-m_i\ge 2-1$$ and $$U (f,P)-L (f,P)=\sum_{i=0}^{n-1}(M_i-m_i)(t_{i+1}-t_i)\geq 1$$
if we take $\epsilon=\frac {1}{2}$ then for all partition $P$ of $[0,1]$
$$U (f,P)-L (f,P)>\epsilon$$ $f$ is not integrable at $[0,1]$.