Q:

Sequence of continuous functions which converges to a continuous limit

Any help with this: construct a sequence of continuous functions defined on $ [0,1] $ which converges pointwise but not uniformly to a continuous limit ?
Thank you.

A:

Hint: Consider $f_n: [0,1] \to \Bbb R$ defined by 
$$f_n(x) := \begin{cases}
 2n^2x   & \text{if $0 \le x \le \frac1{2n}$}\\
 2n-2n^2x & \text{if $\frac1{2n} \le x \le \frac 1n$}\\
 0              & \text{if $x \ge \frac1n$}
\end{cases}$$
What is the pointwise limit of the $f_n$?

A:

Consider $f_n: [0,1] \to \Bbb R$ defined by 
$$f_n(x) := \begin{cases}
 nx   & \text{if $0 \le x \le \frac1{n}$}\\
 2-nx & \text{if $\frac1{n} \le x \le \frac 2n$}\\
 0              & \text{if $ x \ge \frac2n $}
\end{cases}$$
It is not hard to verify that the pointwise lmit of $f_n(x)$ is 0. In fact, it is obvious that
. Now for any $x \in (0,1]$ we will have a sufficiently large N such that
$f_n(x) = 0$ if $n \geq  N$. However, $f_n(x)$ does not converge uniformly to 0 due to the fact that $\sup|f_n(x) - f(x)| = 1$ for $x\in [0,1]$

