# Riemann-integral for a function that has infinitely many discontinuity points

The question is following:

Let $$f:[0,1]\rightarrow \mathbb{R}.$$

$$f(x)=x,$$ if $$x=1/n, n\in\mathbb{N}$$

$$f(x)=0,$$ otherwise.

Is $$f$$ Riemann-integrable? If it is, what is its value?

I know that the basic idea of Riemann-integral is to find two step-functions $$h$$ and $$g$$ which both integrate to the same value and $$h(x) \leq f(x) \leq g(x)$$. This time I can't find the upper step-function. However I guess that this function is Riemann-integrable as it's discontinuous only on $$1/n$$. Also I'm guessing that it's value is $$0$$. Am I correct and how could I proof it?

• There is a theorem that says that a bounded function is Riemann integrable if and only if the set of its discontinuities has measure zero. In particular, if a bounded function has countably many discontinuities, it is Riemann integrable. Jan 22, 2019 at 19:30
• Okay so this tells me that I'm correct with my guess that this function is Riemann-integrable and it's value is 0. However I'm stuck trying to proof it
– jte
Jan 22, 2019 at 19:31
• There is a different approach that uses more machinery, which I'm not sure is allowed for you. But, there is a theorem that says if $f$ is Riemann integrable, then its Riemann integral equals its Lebesgue integral. Your function satisfies the hypothesis of theorem. Using the Lebesgue integral, it is very easy to calculate that it is 0. Jan 22, 2019 at 20:03
• Sadly I have to use the definition of Riemann's integral for this :( I might check that out if I can't come up with a solution otherwise.
– jte
Jan 22, 2019 at 20:05
• Ok. The theorem I have referenced is Theorem 2.28 in Folland's Real Analysis, page 57. Good luck! Jan 22, 2019 at 20:06

To do this from scratch, let $$\epsilon>0$$ and consider the partition $$Q$$, such that:

$$1).\ \epsilon$$ is a partition point, so that if $$n>1/\epsilon,\ 1/n\in [0,\epsilon].$$ Let $$N\ge 2$$ be the smallest integer for which this happens

and

$$2).\$$ there are $$x_{k}\in Q,$$ such that $$x_k<1/k and $$x_{k+1}-x_k<\epsilon/2^k$$ for $$k

Then, $$U(f,Q)=\epsilon\sum^N_{k=1}\frac{1}{k2^k}+\frac{\epsilon }{N}<\epsilon.$$ Now clearly $$L(f,Q)=0$$ so $$U(f,Q)-L(f,Q)<\epsilon.$$

Since $$L(f,Q)\le\underline \int f\le \overline \int f\le U(f,Q)$$, we conclude that $$\overline \int f- \underline \int f<\epsilon$$, and since $$\epsilon$$ is arbitrary, $$\int f$$ exists and is equal to $$0.$$