Let $f_n: [0,1] \mapsto \mathbb{R}$ given by $$f_n(x) = \begin{cases} 1 & \text{ for } x = \frac{1}{i} \text{ with } i \in \{1, ..., n\}, \\ 0 & \text{ otherwise.} \end{cases}$$
The task is: a) Is $f_n$ Riemann integrable? If yes, calculate $\int \limits_{0}^{1}f_n(x)dx$
b) Consider $f: [0,1] \to \mathbb{R}$ by virtue of the pointwise limit $f(x):= \lim_{n \to \infty}f_n(x)$. Is $f$ Riemann integrable? If yes, what is the value of the integral?
My thoughts to a) are that $f_n$ ist integrable, because the points of discontinuity are finite for any given $n$. The value of the integral is 0.
To b) The pointwise limit should be $$f(x):= \begin{cases} 1 & \text{ for } x = \frac{1}{k}, \; k \in \mathbb{N} \\ 0 & \text{ otherwise.} \end{cases}$$ Now I suppose that f is not Riemann integrable, because the points of discontinuity are infinite (casually spoken), but I cannot prove it.
Any ideas? And are my thoughts to a) correct so far?
X3nius
A is correct. The limit function is correct, but it is integrable. You can have infinite discontinuities , the key is that they are measure 0. You said in comments you don't have Lebesgue measure yet, fortunately for countable infinite discontinuities the proof is easy. For countability, it's pretty easy to prove directly via the Darboux equivalent version of the Riemann integral, that for any $\epsilon>0$ you can find a partition $P$ such that the upper sum minus the lower sum on that partition is less than $\epsilon$. Note that the lower sum is always 0 and your upper sum will just be the sum of the lengths of the intervals covering $\frac 1 k$ in your partition. So cover each $\frac 1 k$ with an interval of width $\frac \epsilon {2^k}$, which is a geometric series that sums to $\epsilon$