# Prove that the indicator function for $\mathbb{Q}\cap[0,1]$ is not Riemann integrable

Prove that the function $\phi_\mathbb Q : [0,1] \to \{0,1\}$ defined by $$\phi_\mathbb{Q}(w)=\begin{cases} 1 &\text{if } w\in \mathbb Q, \\ 0 & \text{if } w\notin \mathbb Q \end{cases}$$ is Lebesgue integrable and not Riemann integrable.

I proved that the function is Lebesgue integrable as follows:

The function is positive so we just have to prove that $\int_0^1 \phi_\mathbb Q(x) dx <+ \infty$, and it goes like this :

$\int_0^1 \phi_\mathbb Q(x) dx \le\int_0^1 1\ dx = 1 < \infty$

so $\phi_\mathbb{Q}$ is Lebesgue integrable.

However I couldn't find a proof for being not Riemann integrable.

• What is the your definition of the Riemann integrability? If it is through Riemann sums, show that for any partition there is one zero sum and one which equals $1$ – Ilya Jan 19 '13 at 21:05
• we studied one definition and it is Rienman sums , i dont know how to connect it with this function – Lofaif Jan 19 '13 at 21:08
• @Lofaif: Lebesgue integrable functions must also be measurable; i.e., you have to know that the integral makes sense before claiming that it is finite. So for completeness on the Lebesgue part you could give a reason $f$ is measurable, or show by other means why the Lebesgue integral actually exists. – Jonas Meyer Jan 19 '13 at 21:14

First of all, w.r.t. Lebesgue integrability. The function is simple: $\phi_\Bbb Q(x) = 1_{\Bbb Q}(x)$ and thus $$\int_{[0,1]}\phi_\Bbb Q(x)\lambda(\mathrm dx) = \lambda([0,1]\cap\Bbb Q) = 0$$ just by the definition of the Lebesgue integral for simple functions.
Let us now consider the Riemann integral. The function $f:[0,1]\to\Bbb R$ is Riemann integrable if exists the following limit: $\lim_{\mu(T)\to 0}S_T(f)$ where $$T = \{0 = t_0<\xi_1<t_1<\dots<t_{n-1}<\xi_n<t_n =1\}$$ is a pointed partition of $[0,1]$, $\mu(T) = \max_k|t_{k} - t_{k-1}|$ and $$S_T(f) = \sum_{k=1}^nf(\xi_k)(t_k - t_{k-1})$$ is a Riemann sum. To show that the limit does not exist for $f = \phi_\Bbb Q$ it is sufficient to to show that for any small $\delta$ there are two partitions $T',T''$ such that $\mu(T')\leq\delta$ and $\mu(T'')\leq\delta$ but $0=S_{T'}(f)\neq S_{T''}(f) = 1$. That's easy - we take both partitions to be uniform, but we choose $\xi'_i$ in the first case to be irrational numbers and $\xi''_i$ to be rational.