Show that $f=\sin(x)$ if $x\in\mathbb{Q}$ and $f(x)=\cos(x)$ if $x\in\mathbb{R}\setminus\mathbb{Q}$ is not Riemann integrable on $[0,1]$

142 Views Asked by At

Show that $f=\sin(x)$ if $x\in\mathbb{Q}$ and $f(x)=\cos(x)$ if $x\in\mathbb{R}\setminus\mathbb{Q}$ is not integrable on $[0,1]$. I know that there is already a post on this function, but I didn't find the same approach as mine. So, I would like to have a feedback on my proof and to know if it holds, please.

My attempt is to pass by Darboux upper and lower sums.

To show that $f$ is Riemann integrable, we have to show the following:$\forall \epsilon>0$ $\exists$ a partition $\sigma$: $\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}(f)<\epsilon$.

To show that $f$ is not integrable on $[0,1]$, we can show that it is not integrable on it's sub interval $[0,\frac{\pi}{4}]$. Let $M_i=\sup\{f(x):x\in[x_{i},x_{i+1}\}$ and $m_i=\inf\{f(x):x\in[x_{i},x_{i+1}\}$. On the chosen interval, $M_i=\cos(x_i)$ and $m_i=\sin(x_i)$ by the dansity of rational and irrational numbres. We have then that:

$\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}(f)=\sum_{i=0}^{n}M_i(x_{i+1}-x_{i})-\sum_{i=0}^{n}m_i(x_{i+1}-x_{i})=\underbrace{\sum_{i=0}^{n}\cos(x_i)(x_{i+1}-x_{i})}_{\ge \int_{0}^{\pi/4}\cos(x)}-\underbrace{\sum_{i=0}^{n}\sin(x_i)(x_{i+1}-x_{i})}_{\le\int_{0}^{\pi/4}\sin(x)}\ge\int_{0}^{\pi/4}\cos(x)-\int_{0}^{\pi/4}\sin(x)=\sqrt{2}-1$

Therefore, there is no partition such that $\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}(f)<\epsilon$ for $0<\epsilon<\sqrt{2}-1$. So, $f$ is not integrable on $[0,\pi/4]$ $\implies$ not integrable on $[0,1]$.