[Math] Counterexample around Dini’s Theorem

functional-analysismetric-spacespointwise-convergenceuniform-convergence

"Give an example of an increasing sequence $(f_n)$ of bounded continuous functions from $(0,1]$ to $\mathbb{R}$ which converge pointwise but not uniformly to a bounded continuous function $f$ and explain why Dini's Theorem does not apply in this case"

So clearly Dini's Theorem does not apply, as $(0,1]$ is not a closed interval (or compact metric space), but I can't figure out an example.

My first thought is $f_n(x)=\frac{1}{x^n}$, but this does not converge pointwise to a bounded continuous function, as $x=1$ is in the interval

My second thought is $f_n(x)=x^\frac{1}{n}$. This is clearly an increasing sequence of bounded continuous functions (I think?) I believe this converges pointwise to $f(x)=1$ for all $x\in (0,1]$, but I'm struggling to then show why this doesn't converge uniformly to $f(x)=1$

How would I do this? Or is then an easier/better example I could use?

Best Answer

Take $f_n(x)=e^{-\frac 1 {nx}}$ and $f=1$.

Note that $sup_x |f_n(x)-f(x)| \geq |f_n(\frac 1 n)-1|=1-\frac 1 e $.