Let $f(x)=2|x|+1$ if $x\in\mathbf{Q}$ and $f(x)=0$ if not. Show that $f$ is not Riemann integrable

integrationreal-analysisriemann sumriemann-integration

Let $f(x)=2|x|+1$ if $x\in\mathbf{Q}$ and $f(x)=0$ if $x\in \mathbf{R}/\mathbf{Q}$. Show that $f$ is not Riemann integrable on $[-2,3]$. 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$. We know as well that $\int_{-2}^{0}f(x)+\int_{0}^{3}f(x)=\int_{-2}^{3}f(x)$. So, if we show that $f$ is not integrable on $[-2,0]$ or on $[0,3]$, we could conclude that $f$ is not integrable on $[-2,3]$. In the following proof I will work with the interval $[0,3]$.

By density of irrational numbers, the lower Darboux sum is always equal to $0$ whatever the partition. So, we have to shiw that $\forall \epsilon>0$ $\exists$ a partition $\sigma$: $\overline{S}_{\sigma}(f)<\epsilon$. Let $M_i=\sup\{f(x):x\in[x_i,x_{i+1}]\}$. We have then the following:

$\overline{S}_{\sigma}(f)=\sum_{i=0}^{n}M_i(x_{i+1}-x_i)=\sum_{i=0}^{n}(2x_{i+1}+1)(x_{i+1}-x_i)\ge \int_{0}^{3}2x+1=12$.

Thus, there is no partition such that $\overline{S}_{\sigma}(f)<\epsilon$ for $0<\epsilon<12$. We conclude that $f$ is not intergable on $[0,3]$ and so not integrable on $[-2,3]$.

Best Answer

The computations are correct (although I think that it would be more interesting to do it without computing the Riemann integral of another function). However, there is a problem when you state that$$\int_{-2}^3f(x)\,\mathrm dx=\int_{-2}^0f(x)\,\mathrm dx+\int_0^3f(x)\,\mathrm dx.$$Your goal is to prove that $f$ is not integrable, but here you are acting as if it was. You could simply clam that if $f$ is not Riemann integrable on a subinterval of $[-2,3]$, then it is also not Riemann integrable on $[-2,3]$.