# show that $f$ is Riemann integrable on $[0,1]$

Let $$f(x)=\sin\left(\frac{1}{x}\right)$$ if $$0 and $$f(x)=0$$ if $$x=0$$. Show that $$f$$ is Riemann integrable on $$[0,1]$$ and calculate it's integral on $$[0,1]$$.

I would like to know if my proof holds, please. And, I would like have a hint on how we can calculate the intergal of this such of functions, 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$$.

Let $$0<\epsilon<2$$ and consider the following intervals $$[0,\epsilon/2]$$ and $$[\epsilon/2,1]$$. First of all, as $$f(x)$$ is continuous on $$[\epsilon/2,1]$$($$\sin(\frac{1}{x})$$ is continuous on $$[\epsilon/2,1]$$), it is integrable on this interval. We would like to show now that $$f$$ is intergable on $$[0,\epsilon/2]$$. Consider the partition $$\sigma=\{0,\frac{\epsilon}{2}\}$$ on $$[0,\epsilon/2]$$ We have that

$$\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}(f)=\sum_{i=0}^{0}M_i(x_{i+1}-x_i)-\sum_{i=0}^{0}m_i(x_{i+1}-x_i)$$ with $$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}]\}$$.

We have that $$M_i\le1$$ and $$m_i\le 0$$. Thus,

$$\sum_{i=0}^{0}M_i(x_{i+1}-x_i)-\sum_{i=0}^{0}m_i(x_{i+1}-x_i)\le1\cdot \frac{\epsilon}{2}< \epsilon$$. Therefore, as $$f(x)$$ is integrable on $$[0,\epsilon/2]$$ and on $$[\epsilon/2,1]$$, we conclude that $$f$$ is integrable on $$[0,1]$$.

Now, I would like to calculate it's integral value... If someone could help with it, I would appreciate it. Honestly, I have no idea how to integrate this such of discontinuous functions at finitely many points.

Edit:

As $$f(x)$$ is continuous on $$[\epsilon/3,1]$$, it is integrable on this interval. Therefore, $$\forall \epsilon>0 \ \exists$$ partition $$\tau$$ on the interval $$[\epsilon/3,1]$$: $$\overline{S}_{\tau}(f)-\underline{S}_{\tau}(f)<\epsilon/3$$

To show that $$f$$ is integrable on $$[0,1]$$, we have to show that: $$\forall \epsilon>0 \ \exists$$ a partition $$\sigma$$: $$\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}<\epsilon$$

Suppose $$0<\epsilon<3$$ and let $$\sigma=\tau \ \cup \{0\}$$ be a partition on the interval $$[0,1]$$. We have that (for the following inequality I use the same definition for $$M_i$$ and $$m_i$$ as above in the post):

$$\overline{S}_{\sigma}(f)-\underline{S}_{\sigma}=\Big(\sum_{i=0}^{0}\underbrace{M_i}_{\le1}(x_{i+1}-x_i)-\sum_{i=0}^{0}\underbrace{m_i}_{\ge -1}(x_{i+1}-x_i)\Big)+\underbrace{\Big(\sum_{i=1}^{n}M_i(x_{i+1}-x_i)-\sum_{i=1}^{n}m_i(x_{i+1}-x_i)\Big)}_{<\epsilon/3}<\frac{\epsilon}{3}+\frac{\epsilon}{3}+\frac{\epsilon}{3}=\epsilon$$.

Therefore, $$f$$ is integrable on $$[0,1]$$.

• So, could someone give a feedback on the proof, please? – Daniil Feb 26 at 20:26
• You may also look at proof for Riemann integrability for functions with finite set of discontinuities. It should be available somewhere on this site. – Paramanand Singh Feb 27 at 2:44
• For example see this answer of mine. The first part of the answer is exactly what you need here. – Paramanand Singh Feb 27 at 2:46

Your goal is to find a partition $$\sigma$$ such that $$\overline{S}_{\sigma} (f) <\underline{S} _{\sigma} (f) +\epsilon$$ but instead you are trying to use that $$f$$ is integrable on $$[\epsilon/2,1]$$ and prove that $$f$$ is integrable on $$[0,\epsilon/2]$$.

This is not what you want. You want a partition $$\sigma$$ which works as expected.

You can just say that since the function is integrable on $$[\epsilon/2,1]$$ there is a partition $$\sigma_1$$ of $$[\epsilon/2,1]$$ which works for this interval and then take $$\sigma=\sigma_1\cup \{0\}$$ and using your argument in question show that this particular partition works for $$[0,1]$$.

You have the correct idea but you need to present it in proper manner.

• Alright, thank you for the feedback! I will try to finish the proof correctly. – Daniil Feb 27 at 7:47
• Thank you very much for your encouragement.... – Sebastiano Feb 27 at 9:38
• @Paramanand Singh I edited my answer. If you could take a look at it, I would really appreciate it x) Thank you very much for your help and answers! Edit: I think there is a problem in my inequality because of $m_i$ – Daniil Feb 27 at 10:11
• @Daniil: looks fine now (but I haven't done proof reading to check for typos). – Paramanand Singh Feb 27 at 10:13
• @Paramanand Singh Alright, thank you. But I think m inequality doesn't hold as if i suppose that $m_i\le 0$ it is not true my inequality. Probably, I should have used the interval with $\epsilon/3$ instead of $\epsilon/2$ and use the fact that $m_i\ge-1$ – Daniil Feb 27 at 10:22

Integrate by parts $$\int \sin \left(\frac{1}{x}\right) \, dx=x\sin \left(\frac{1}{x}\right) -\int x \left(-\frac{1}{x^2}\right)\cos \left(\frac{1}{x}\right)\,dx=$$ $$=x \sin \left(\frac{1}{x}\right)-\text{Ci}\left(\frac{1}{x}\right)+C$$ Ci is cosine integral $$\text{Ci}(x)=-\int_x^{\infty}\frac{\cos x}{x}$$

$$\int_0^1 \sin \left(\frac{1}{x}\right) \, dx=\sin (1)-\text{Ci}(1)-\lim_{a\to 0^+}\left[a \sin \left(\frac{1}{a}\right)-\text{Ci}\left(\frac{1}{a}\right)\right]$$ set $$\frac{1}{a}=t$$ $$\lim_{t\to\infty}\left[\frac{1}{t} \sin t-\text{Ci}\left(t\right)\right]=0$$ $$\int_0^1 \sin \left(\frac{1}{x}\right) \, dx=\sin (1)-\text{Ci}(1)\approx 0.504$$

• Thank you for the answer! But, I still didn't see improper integrals. Does it matter in this case? – Daniil Feb 26 at 17:28
• Without knowing Cosine Integral function we can't solve the given integral. Or they wanted just an approximeted result? @Daniil – Raffaele Feb 26 at 17:32
• No, it was asked to calculate the value. But as it is not a homework (just problem found in the internet), I just would like to know if I'm capable to calculate this such of integrals. My level is Advanced Analysis I (so I didn't see improper integrals). But still I understand the idea of your calculation so thank you very much! But my main problem in the calculation was that I didn't know how to proceed as $\sin(1/x)$ is undefined at $0$ but I think I see how you calculated it – Daniil Feb 26 at 17:38
• @Daniil I added a few lines to explain how to deal with this improper integral. Hope it is clear – Raffaele Feb 26 at 17:49
• It is more clear, thank you! What do you think about my proof on $f$ integrability, please? – Daniil Feb 26 at 17:50