[Math] The Riemann Integrability of a function similar to Dirichlet’s function

lebesgue-integralreal-analysissolution-verification

$\textbf{Problem:}$ Consider the function $f: [0,1] \rightarrow \mathbb{R}$ defined by letting $f(x)=0$ for rational $x$ and $f(x)=x$ for irrational $x$. Calculate the upper and lower Riemann integrals of $f$. Is $f$ Riemann integrable?

$\textbf{ Solution Attempt:}$ Let $P_n=\{0=t_0,…,t_n=1\}$ be a partition of $[0,1]$, where $t_k = \frac{k}{n}$. For this partition, we have $$U(f,P_n)=\sum^{n}_{k=1} t_k (t_k – t_{k-1}) = \sum^{n}_{k=1} t_k (\frac{k}{n} – \frac{k-1}{n})=\sum^{n}_{k=1} \frac{k}{n} (\frac{1}{n})= \frac{1}{n^2} \sum^{n}_{k=1} k.$$ A familiar property of the natural numbers gives us that $\sum^{n}_{k=1} k= \frac{1}{2}n(n+1).$ Thus, $U(f,P)= \frac{1}{2} + \frac{1}{2n}.$ Recall, the upper Riemann integral $U(f)$ is defined as $U(f)=\inf
\{U(f,P)\}$, where $P$ is a parition of $[0,1].$ As $n \rightarrow \infty$, $P_n \rightarrow \frac{1}{2}.$ [Note: this is where I am a little unsure of myself.] Thus, $U(f)=\frac{1}{2}$. However, the lower Riemann integral is $0$. Hence, the upper and lower Riemann integrals disagree. We conclude that $f$ is not Riemann integrable. $\blacksquare$

If the aforementioned function was changed so that it took on the value of $0$ for irrational $x$ and $x$ for rational $x$, then $f$ would be zero almost-everywhere. Hence, it would be Lebesgue integrable. Is this correct? I am quite unsure of the Lebesgue integrability for the original function. A hint would great! Thank you!

Best Answer

A nice theorem to know is that a bounded function is Riemann integrable if and only if the set of its discontinuities has measure zero. Your function is only continuous at 0. So since your interval is uncountable, $f$ is NOT Riemann Integrable.

Related Question