Let $f:[0,1] \to \mathbb{R}$ a not zero continuous function such that $f(0)=0=f(1)$ and let define s sequence of functions as $g_{n}(x)=f(x^{n})$ for every $n \in \mathbb{N}$ and $x \in [0,1]$. Prove that $g_{n}$ pointwise converges to $0$ but it doesnt uniformly converges to $0$.
It was not hard to prove that $g_{n}(x) \to 0$ pointwise by considering three cases: $x=0$, $x=1$ and $0< x<1$ the first two cases can be proved directly and for the last case we consider the fact $x^{n} \to 0$ and $f$ is continuous. The trouble start when proving $g_{n}$ doesnt converges uniformly to $0$. I tried this by computing $$(*)=d_{u}(g_{n}(x),g(x))=sup_{x \in [0,1]}|g_{n}(x)-g(x)|=sup_{x \in [0,1]}|f(x^{n})-f(x)|.$$
Then compute $lim_{n \to \infty} d_{u}(g_{n}(x),g(x))$ and verify that
$$lim_{n \to \infty} d_{u}(g_{n}(x),g(x)) \neq 0.$$
But Im stuck at computing $(*)$. Any help proving the uniform convergence of this sequence either in the way I proposed or other will be appreciated.
Hint: $|f|$ attains a nonzero maximum at some $a \in (0,1)$. Then for any $n \in \mathbb{R}$, we have $g_{n}(a^{\frac{1}{n}}) = f(a)$. Thus $\sup_{x\in [0,1]} |g_{n}(x)| = f(a) > 0$. Note that $a^{\frac{1}{n}} \in (0,1)$