# Show that $f$ is Riemann-Integrable

Let $$f$$ be a function defined on $$[0,1]$$ by: $$f(x)=1$$ if $$x=\frac{1}{n}, n \in \mathbf{N}^*$$ and $$f(x)=0$$ if not. Show that $$f$$ is Riemann integrable on $$[0,1]$$.

I know that there is already a post on this function and this problem might not be difficult, but I didn't really find an answer to my question. I'm not really good at proving if a function is integrable, so I would like to understand how it works correctly and become good x)

To show that $$f$$ is Riemann intergable on $$[a,b]$$, we consider the upper and lower Darboux sum. By definition we have to show the following: $$\exists$$ a subdivision $$\sigma$$: $$\overline{S}_{\sigma}(f)\le \underline{S}_{\sigma}(f)+\epsilon \ \forall \epsilon >0$$. By densition of irrational numbers, we have that $$\underline{S}_{\sigma}(f)=0 \ \forall \sigma$$. So, we have to show that $$\overline{S}_{\sigma}(f)\le\epsilon$$.

I remark that there exists $$\epsilon$$ such that there is a finite number of discontinuities on the interval $$[\epsilon,1]$$, so probably I can bound the things in the sum quite "easily". My problem is how to choose my subdibision correctly (and to be sure that it's correct) and how to work correctly on the interval $$[0,\epsilon]$$ as more we approach to 0, more there are of discontinuities (because of density of irrational numbers). I ask this question not only for this case, but in general how it works. If someone could explain these things in details, I would really appreciate it. Thank you very much in advance!

• I presume you probably didn't cover this result in class (so you shouldn't use this as proof), but a function is Riemann integrable if and only if it is continuous almost everywhere, which obviously makes your function Riemann integrable. – maritsm Feb 24 at 15:17
• @maritsm I saw this result, but I'm still interested in rigorous proof – Daniil Feb 24 at 15:19
• I mean, the theorem has a rigorous proof, but it happens to be a few pages long :) – maritsm Feb 24 at 15:21
• Proceed in steps : a continuous function is integrable, a bounded function with a single (hence finitely many) discontinuity is integrable. Then finally if the discontinuities of a bounded function have a finite number of accumulation points then the function in integrable. Proof of each step is based on or similar to that of previous step. – Paramanand Singh Feb 24 at 17:46
• Some of the results in last comment should be available in your textbook as standard theorems. You may try to learn the proof techniques from there. – Paramanand Singh Feb 24 at 17:47

Hint

For $$0 \lt \epsilon \lt 1$$, consider the subdivision

\begin{aligned}\sigma \equiv x_ 0 &= 0 \lt x_1 = \frac{\epsilon}{2}\\&\lt x_2 = \frac{1}{N} -\frac{\epsilon}{2 2^{N+1}} \lt x_3 = \frac{1}{N} +\frac{\epsilon}{2 2^{N+1}}\\ &\dots\\ &\lt x_{N} = \frac{1}{2} -\frac{\epsilon}{2 2^{2}} \lt x_3 = \frac{1}{N} +\frac{\epsilon}{2 2^{2}}\\ &\lt x_{N+2} = \frac{1}{2^0} -\frac{\epsilon}{2 2^{1}} \lt x_{N+3} = 1 \end{aligned}

Where $$N$$ is the largest integer such that $$\frac{1}{N}\gt \epsilon / 2$$.

To understand why that works, I suggest that you take an example, i.e. $$\epsilon = 1/10$$, and make a drawing of the subdivision vs. the function. From there, you can compute the Darboux lower and upper sum to complete the proof. You'll essentially see that Darboux lower sum is equal to zero while Darboux upper sum is less than

$$\frac{\epsilon}{2} + \frac{\epsilon}{2}\left(\frac{1}{2} + \frac{1}{2^2} + \dots + \frac{1}{2^{N+1}}\right) \lt \epsilon.$$

The idea, as you have seen is to isolate zero on one side from the other discontinuities of the function.

• I don't really understand the motivation of your subdivision, and how you got it.. I understand why you take $0<\epsilon<1$ and your subdivision up to $x_1$, but after I have no idea how you found it – Daniil Feb 24 at 15:19
• Have you made the drawing I suggested to see how the values $1/n$ are framed by the subdivision? – mathcounterexamples.net Feb 24 at 15:28
• Not yet, I'm doing it right now. Thank you for an answer. – Daniil Feb 24 at 15:42
• Alright, I think i got it. Thank you! – Daniil Feb 24 at 17:51
• It might be too late, but I think i have an altenrative partition. If you could tell me if it is correct, i would really appreciate ot :) Fix $0<\epsilon<1$ and let $N$ be the biggest number such that $\frac{1}{N}>\frac{\epsilon}{2}$. Then, we can calculate (with some examples) that in interval $(\epsilon/2,1]$ there are $2/\epsilon$ numbers of the form $1/n$. Then, to make the sum simplify, we can deduce that the distance between points is $\epsilon^2/4$. We can check that is works, as $1/(N-1)-1/N>\epsilon^2/4$, so there are "no drops" – Daniil Feb 24 at 19:25