# Let $f(x)=x$ for x irrational and $f(x)=0$ for x rational (Darboux Integration)

Let $f(x)=x$ for $x$ irrational and $f(x)=0$ for $x$ rational. Show that $f$ Darboux integrable (lower and upper) on $[0,1]$ and $$(\underline{D})\int_{0}^{1}f=0,\quad (\overline{D})\int_{0}^{1}f=\frac{1}{2}.$$

• Can you use the fact that Darboux integrability is equivalent to Riemann integrability? Dec 22, 2015 at 11:23
• @SirJective yes, i got it, but i still confused with the form of function. I mean how i can distinguish rational and irrational? Those are too many... Dec 22, 2015 at 11:49
• What is the $D$ with the over and underline supposed to refer to next to the integral? Dec 22, 2015 at 22:58
• I assume that the line indicates if it is the upper or lower integral correct? If so, then $f$ is only said to be Darboux integrable if the upper is equal to the lower Dec 14, 2019 at 3:53

So we know that Darboux integrability is equivalent to Riemann integrability. Let's consider the discontinuities of $f$. Given that $f$ is discontinuous at every rational in the interval, and the rationals are a countable set, we have that $\mathbb{Q} \cap [0,1]$ is countable. Since it is countable, it forms a zero set, and hence the set of discontinuities of $f$ is a zero set.
Now given that the function is defined on $[0,1]$ as $f(x)=x$ if $x$ is irrational, we can see that the function is bounded by $1$. By the Riemann-Lebesgue Theorem we have that a bounded function $f:[a,b]\to \mathbb{R}$ with a set of discontinuities which form a zero set is Riemann integrable. As mentioned in the comments, since it is Riemann integrable it is Darboux integrable.