# Pointwise limit of continuous functions not Riemann integrable

The following is an exercise from Stein's Real Analysis (ex. 10 Chapter 1). I know it should be easy but I am somewhat confused at this point; it mostly consists of providing the Cantor-like construction for continuous functions on the interval $[0,1]$ whose pointwise limit is not Riemann integrable.

So, let $C'$ be a closed set so that at the $k$th stage of the construction one removes $2^{k-1}$ centrally situated open intervals each of length $l^{k}$ with $l_{1}+\ldots+2^{k-1}l_{k}<1$; in particular, we know that the measure of $C'$ is strictly positive. Now, let $F_{1}$ denote a piece-wise linear and continuous function on $[0,1]$ with $F_{1}=1$ in the complement of the first interval removed in the consutrction of $C'$, $F_{1}=0$ at the center of this interval, and $0 \leq F_{1}(x) \leq 1$ for all $x$. Similarly, construct $F_{2}=1$ in the complement of the intervals in stage two of the construction of $C'$, with $F_{2}=0$ at the center of these intervals, and $0 \leq F_{2} \leq 1$, and so on, and let $f_{n}=F_{1}\cdot \ldots F_{n}$.

Now, obviously $f_{n}(x)$ converges to a limit say $f(x)$ since it is decreasing and bounded and $f(x)=1$ if $x \in C'$; so in order to show that $f$ is discontinuous at every point of $C'$, one should show that there is a sequence of points $x_{n}$ so that $x_{n} \rightarrow x$ and $f(x_{n})=0$; I can't see this, so any help is welcomed, thanks a lot!

-

Take a point $c\in C'$ and any open interval $I$ containing $c$. Then there is an open interval $D\subseteq I$ that was removed in the construction of $C'$. Indeed, since $C'$ has no isolated points, there is a point $y\in C'\cap I$ distinct from $x$. Between $x$ and $y$, there is an open interval removed from the construction of $C'$, which we take to be our $D$.
Now, by the definition of the $f_n$, there is a point $d\in D$ (namely the center of $D$) such that $f(d)=0$.
To recap: given $x\in C'$ and any open interval $I$ containing $x$, there is a point $d\in I$ with $f(d)=0$. As $f(x)=1$, this implies that $f$ is not continuous at $x$.