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

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]$$.

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]$$.

• Alright, thank you for your feedback. Is it false to say that if $f$ is not integrable on $[2,3]$, then it is not integrable on $[-2,3]$? If yes, could you provide a counter-example, please? Feb 27, 2021 at 16:49
• Not, it is not false. There was a typo in my answer: I meant $[-2,3]$ at the end. Feb 27, 2021 at 16:50
• Alright, thank you very much! Feb 27, 2021 at 16:51
• Without involving the integral, you could do: $2x_{i+1}+1\ge1$ then the sum would be greater or equal to $3$? Then there is no partition for $0<\epsilon<3$ Feb 27, 2021 at 16:55
• Yes, that would work. Feb 27, 2021 at 16:56

Another way to approach this is to show $$f$$ fails to satisfy the conditions of the Riemann-Lebesgue Theorem. Specifically, what we need to do is show $$f$$ is discontinuous on a set of positive measure.

taking the definition of continuity - $$\forall \epsilon > 0$$, $$\exists\delta$$ where $$|f(x_0)-f(x)|<\epsilon$$ when $$|x-x_0| < \delta$$. Pick any arbitrary sub interval $$[a,b]\subset [-2,3]$$, and note that $$\forall x \in [a,b]$$, we have, regardless of $$\delta$$ with $$x\in (x-\delta,x+\delta)$$,

$$|f(x_0)-f(x)| = 2|x|+1$$ (holds for each irrational $$x$$ for $$x_0$$ rational and vice versa).