3

Let $f(x)=\cos^2(x)$ if $x\in \mathbb{Q}$ and $f(x)=0$ if not. Show that $f$ is Riemann Integrable on $\left[0,\pi/2\right]$.

The problem that I have, is that I don't really see why this function would be Riemann integrable. I will start the proof and explain in details what I did. So, if someone could tell me where my intuition is worng, I would appreciate it.

By definition, $f$ is integrable iff. $\exists$ a subdivision $\sigma$: $\overline{S}_{\sigma}(f)<\underline{S}_{\sigma}(f)+\epsilon \ \forall \epsilon>0$.

By density of irrational numbers, the lower Darboux sum is equal to $0$. So, we have to show that $$\overline{S}_{\sigma}(f)<\epsilon \iff \sum_{i=0}^{n}M_i(x_{i+1}-x_i)<\epsilon,$$ with $M_i=\sup\{f(x):x\in[x_{i},x_{i+1}]\}$. By density of rational numbers, we consider the following sum:

$$\sum_{i=0}^{n}\cos^2(x_i)(x_{i+1}-x_i)$$ as $\cos^2(x)$ is decreasing on $[0,\pi/2]$. But, $0\le\cos^2(x)\le 1$ on $[0,\pi/2]$. Therefore, $$\sum_{i=0}^{n}\cos^2(x_i)(x_{i+1}-x_i)\le 1 \cdot \sum_{i=0}^{n}(x_{i+1}-x_i)=\frac{\pi}{2}-0>\epsilon$$ for every subdivision. Thus, $f$ is not intergable on $[0,\pi/2]$.

Gary
  • 31,845
Daniil
  • 1,647
  • Can you figure out the points where $f$ is discontinuous? Also do you know Lebesgue's theorem for Riemann integrability? If not, then the proof is difficult here. – Paramanand Singh Feb 25 '21 at 16:18
  • @Paramanand Singh I tried to determine it but I didn't succeed.. No I didn't see that theorem – Daniil Feb 25 '21 at 16:20
  • @Paramanand Singh Is it more difficult thant the proof for Thomae's function integrability? x) – Daniil Feb 25 '21 at 16:24
  • Are you sure the function is supposed to be proved as integrable? It looks like it is not. – Paramanand Singh Feb 25 '21 at 16:24
  • Yes, the statement asks to show that $f$ is integrable. But even my approach I don't really see why it wouldn't work, as we work on $\mathbf{Q}$ and $\mathbf{R/Q}$. So by density, intuitively, i feel we can simply bound $\cos$ in the sum.. I tried to determine the distance between all the points in $\mathbf{Q}$ in function of $\epsilon$ but i didn't succeed – Daniil Feb 25 '21 at 16:25
  • @ParamanandSingh The function is identically zero except on a set $;(\Bbb Q);$ of (Lebesgue) measure zero, and thus it is Riemann Integrable there... – DonAntonio Feb 25 '21 at 16:26
  • @DonAntonio No, that is not what the criterion says. The criterion asks about the continuity points. $1_{\mathbb{Q}}$ for example is discontinuous everywhere, not just at the spikes where it is equal to 1. – Ian Feb 25 '21 at 16:27
  • @DonAntonio: well the function is discontinuous on entire interval except for $\pi/2$ and hence not Riemann integrable. – Paramanand Singh Feb 25 '21 at 16:28
  • The function is continuous on any point on $;\left[0,,\frac\pi2\right];$ except on a set of measure zero, which is the countable set $;\Bbb Q;$ ....! Oh, wait: there is a problem that I didn't see in the original question...hold on. – DonAntonio Feb 25 '21 at 16:28
  • Right on: the function isn't continuous also on the irrational points of the interval (except the right extreme point), but this really doesn't matter: it is enough to have an interval of any positive length isn't concintuous to get the function isn't Riemann integrable. – DonAntonio Feb 25 '21 at 16:31
  • To me the statement looks wrong. With Thomae's function, "most" rationals are mapped to small numbers, and so most of them have values "close" to their irrational "neighbors", which allows for continuity at the irrationals. But you don't have this behavior for this function (except at $\pi/2$). – Ian Feb 25 '21 at 16:32
  • Thus Paramanand was right: the function isn't integrable Riemann in that interval. – DonAntonio Feb 25 '21 at 16:33
  • Is there the way to prove the statement using "basic" knowledge (so in this case that it is not Riemann integrable as you all say)? (without Lebesgue theorem) – Daniil Feb 25 '21 at 16:33
  • I think you used the easiest argument for that, however I think the proof could be simplified. – nicomezi Feb 25 '21 at 16:44
  • 2
    Your proof breaks down because all you have shown is that the upper Darboux sum is bounded above. You need to show it cannot be smaller than any $\epsilon > 0$ with an appropriately chosen partition. – RRL Feb 25 '21 at 16:46
  • 1
    You can avoid measure theory and Lebesgue's theorem but even then the proof is not easy. See this answer. – Paramanand Singh Feb 25 '21 at 17:06
  • 1
    +1 by the way for asking a great question (the problem as well presenting it with context). – Paramanand Singh Feb 25 '21 at 17:43

1 Answers1

3

Using the density of irrationals and rationals and the monotonicity of $x \mapsto \cos^2x$ on $[0,\pi/2]$, we have for any subinterval $[x_{j},x_{j+1}]$ of a partition $P$,

$$\sup_{x \in [x_{j},x_{j+1}]} f(x) = \cos ^2 x_{j}, \quad \inf_{x \in [x_{j},x_{j+1}]} f(x) = 0$$

Immediately we see that the lower Darboux sum is $L(P,f) =0$ and the upper Darboux sum is

$$U(P,f) = \sum_{j=0}^{n-1} \cos ^2 x_{j}(x_{j+1}-x_j)$$

Using the facts that $U(P,f)$ is also an upper Darboux sum for the decreasing and Riemann integrable function $x \mapsto \cos^2 x$, we get

$$ U(P,f)\geqslant \int_0^{\pi/2}\cos^2 x\, dx = \frac{\pi}{4} >0$$

This proves that $f$ is not Riemann integrable since for any $0 < \epsilon < \frac{\pi}{4}$ there can be no partition such that $U(P,f) - L(P,f) < \epsilon$.

RRL
  • 90,707
  • I like the idea, thank you very much for an answer! I just have one question, which is certainly stupid: How did you conclude that upper Darboux sum is bigger than the integral of $\cos^2(x)$ on $[0,\pi/2]$? Oh i think I see, it is just because in upper Darboux sum we will get the bigger surface than it's "real" one – Daniil Feb 25 '21 at 17:02
  • 2
    @Daniil: Since $\cos^2 x_j \geqslant \cos^2 x$ for $x \in [x_j, x_{j+1}]$, we get $$\cos^2 x_j (x_{j+1}- x_j) = \int_{x_j}^{x_{j+1}} \cos^2x_j , dx \geqslant \int_{x_j}^{x_{j+1}} \cos^2x_, dx $$. Now sum over $j$. However, this is always true for upper Darboux sums even if the function is not monotone. The integral always falls in between upper and lower sums. – RRL Feb 25 '21 at 17:08
  • Wow!! +1 for the simplest proof possible. The monotone nature of function at rational points helped a lot here. – Paramanand Singh Feb 25 '21 at 17:36
  • @RRL I just have one question, please. I am kinda confused right now. But, how the not existence of the partition for $0<\epsilon<\pi/4$ can prove the non I integrability of $f$? Probably there is a partition for higher $\epsilon$ which works, no? I ask this question, because in one post I was told that we don’t have to show the inequality $\forall \epsilon>0$, but for epsilon which “depends” on the partition. If you could explain it, I would really appreciate it! Thank you very much in advance ! – Daniil Feb 25 '21 at 20:58
  • The Riemann criterion for integrability is that $f$ is Riemann integrable if and only if for ANY $\epsilon > 0$, no matter how small, there exists a partition $P_\epsilon$ such that $U(P_\epsilon,f) - L(P_\epsilon,f) < \epsilon$. I just showed here that this is not going to hold for ANY $\epsilon > 0$ -- clearly it is impossible if $\epsilon < \pi/4$. – RRL Feb 25 '21 at 21:19
  • For the Riemann integral to exist we need the upper and lower Darboux integrals $\inf_PU(P,f)$ and $\sup_P L(P,f)$. to be equal. These upper and lower integrals always exist for a bounded function, but to be equal we would need for upper and lower sums to come arbitrarily close to one another as the partition is refined. – RRL Feb 25 '21 at 21:21
  • @ParamanandSingh: Thanks. It is also pretty clear that the function is everywhere discontinuous as you pointed out. – RRL Feb 25 '21 at 21:24
  • @RRL Altight, it is clear for me right now. Thank you very much ! – Daniil Feb 25 '21 at 21:33
  • @RRL I’m sorry for keeping asking question here, but I found kinda similar problem and I read one more time your proof and comments. As you sais the inequality holds every time even if the function is non monotonic. The question is: so why did you pass by the fact that $\cos^2$ is decreasing here ? If you could directly consider the inequality. Or it is wrong (what I’m saying) – Daniil Feb 26 '21 at 20:19
  • 1
    It is easy to visualize the fact that the upper Darboux sum is bigger than the integral when you have a nice decreasing and continuous function like $\cos^2 x$. The upper Darboux sum happens to be the Riemann sum using the left endpoint for evaluation and a picture makes that very clear. As is often the case in this subject, there is not just one way to prove something. – RRL Feb 26 '21 at 20:31
  • 1
    On the other hand, as I'm sure you know we have $L(P_1,f) \leqslant U(P_2,f)$ for any partitions $P_1,_2$ and, thus $L(P_1,f) \leqslant \sup_P L(P,f) \leqslant \inf_P U(P,f) \leqslant U(P_2,f)$. So when the function is integrable $\int_a^bf(x) , dx = \sup_P L(P,f) =\inf_P U(P,f) $ and $U(P_2,f) \geqslant \int_a^bf(x) , dx$ for any $P_2$. – RRL Feb 26 '21 at 20:34
  • Alright, so if I understand well, we could use the inequality with the integral even without the fact that $\cos^2$ is decreasing? As the upper Darboux sum is greater or equal to the integral of the function whatever the subdivision – Daniil Feb 27 '21 at 10:49
  • 1
    @Daniil: That is correct. – RRL Feb 27 '21 at 14:56