# Show $f$ is Lebesgue-Integrable

Let $f$ be a function defined over $[0,1]$, $$f(x) = \begin{cases}1 , & x\in \Bbb R-\Bbb Q \\ 0, & x\in \Bbb Q\end{cases}$$ Show that $f$ is Lebesgue-Integrable but not Riemann-Integrable.

I know that $f$ is Lebesgue-Integrable iff $|f|$ is Lebesgue-Integrable. But not sure how this can be proved by the function. I'm also stuck on how to prove it is not Riemann-Integrable. Could someone help to provide a complete explanation please? Thanks.

## 2 Answers

Observe that $\mathbb{R} \setminus \mathbb{Q}$ is measurable because $\mathbb{Q}$, being a countable union of singletons, is measurable. Hence $$f = \chi_{\mathbb{R} \setminus \mathbb{Q}} + 0\chi_{\mathbb{Q}}$$ $f$ is simple (it is in fact only a characteristic function), and thus integrable.

$f$ is not Riemann integrable on $[0,1]$ because its discontinuity set has positive Lebesgue measure. This can be proved by noticing the fact that a rational number and an irrational number exist inbetween every two real numbers.

$f=\chi_{(\mathbb R\setminus\mathbb Q)\cap[0,1]}$ and so is Lebesgue integrable by definition, with integral $$\int f\ \mathsf d m = m(\mathbb R\setminus\mathbb Q)\cap[0,1])=m([0,1])=1.$$

$f$ is not Riemann integrable, because any subinterval of $[0,1]$ contains both rational and irrational numbers, so the lower sum of any partition would be $0$ and the upper sum $1$.