Give an example of a sequence of functions $f_n \in C(X)$ (where $X$ is a compact metric space), and a function $f \in C(X)$ such that $f_n \rightarrow f$ pointwise, but not uniformly.
I am having trouble with the condition that $f_n$ and $f$ are in $C(X)$, so I assume they both need to be continuous?
Consider $f_n$ = $\frac{nx}{1+n^2 x^2}$ where $x$ $\epsilon$ $[0,1]$.Here the limit function for the above sequence is $f$ = $0$ when for all $x$ $\epsilon$ $[0,1]$.
Clearly, $f_n$ = $\frac{nx}{1+n^2 x^2}$ is a sequence of continuous functions and $f$ is also continuous.
Now, $M_n$ $=$ $sup_{x \in [0,1]}|f_n(x) - f(x)|$ = $sup_{x \in [0,1]} \frac{nx}{1+n^2 x^2}$ $=$ $\frac{1}{2}$.
So by $M_n$ test, $f_n$ converges to f pointwise, not uniformly.