[Math] Sequence which converges pointwise but not uniformly

analysisconvergence-divergencereal-analysis

it might be simple but I don't find a sequence $f_n: [0,1] \rightarrow \mathbb{R}, n \in \mathbb{N}$ that converges pointwise but not uniformly.

First I thought it could be $f_n(x) = \frac{x}{n}$ but it is not right, is it?

Thanks for help!

Best Answer

$f_n(x)=x^n, x\in[0,1)$ $f_n(1)=1$

It converges pointwisely to $f(x)=0, x\in[0,1)$ $f(1)=1$ but not uniformly since uniformly convergence preserves continuity.

Your example converges uniformly on $[0,1]$.