# Is the indicator function of rational numbers integrable?

I want to ask if the indicator function of rational numbers is Riemann-integragle, cause I read that a function is Riemann-integrable if the set of discontinuities is at most of Lebesgue measure $$0$$ on a compact set, And $$\mathbb{Q}$$ has zero Lebesgue measure. However I also read arguments about the non integrability using Darboux sums, so it is not clear for me if it is integrable or not.

Thanks.

• – Greg Martin Jun 13 at 21:33

Yes, the rationals have measure $$0$$, but the indicator function of the rationals is actually discontinuous everywhere.
This function is not continuous at any point, not just at the rationals. Let's call the function $$D$$. Given any $$x\in\mathbb{R}$$ you can pick a sequence $$x_n$$ of rational numbers and a sequence $$y_n$$ of irrational numbers in your interval such that both converge to $$x$$. However, $$D(x_n)\to 1$$ and $$D(y_n)\to 0$$, so $$D$$ is not continuous at the point $$x$$. So the set of discontinuities of $$D$$ in an interval $$[a,b]$$ has full measure $$b-a$$, and hence $$D$$ is not Riemann integrable. So there are no contradictions here.