Let $g:\mathbb R\to \mathbb R$ a continuous function and $(f_n)$ a sequence of continuous function that converge uniformly to $f$. Does $g(f_n)\to g(f)$ uniformly ? I denote $g(f)$ the function defined by $x\mapsto g(f(x))$.
Attempt
If $g$ is Lipshitz, then it's obvious. Now if $g$ is not Holder, I really have doubt.
If $g=x^2$ for example, then $$\sup_{x\in [0,1]}|f_n(x)^2-f(x)^2|\leq \sup_{[0,1]}|f_n-f|\cdot \sup_{[0,1]}|f_n+f|.$$
Since $$\sup_{[0,1]}|f_n+f|\leq \sup_{[0,1]}|f_n|+\sup_{[0,1]}|f|\leq \sup_{[0,1]}|f_n-f|+2\sup_{[0,1]}|f|,$$ we have that $f_n^2\to f^2$ uniformly.
But since this proof looks a little bit "complicate", I may think that $g(f_n)\to g(f)$ wrong in general. Could someone can confirm this with a counter-example, or give me a hint to show the statement ?
With $\Bbb R$ as domain of the $f_n$, we can take $$ f_n(x)=x+\frac1n,\qquad g(x)=x^2$$ as counterexample: We have $f_n\to \operatorname{id}$ uniformly, but $g(f_n(x))-g(f(x))=(x+\frac1n)^2-x^2=\frac 2nx+\frac1{n^2}$ is unbounded.
However, if the domain $D$ of the $f_n$ (and $f$) is compact, such as $D=[0,1]$, then $g\circ f_n\to g\circ f$ uniformly. Indeed, $f(D)$ is also compact, so contained in some interval $[a,b]$. Then for all $n\gg0$, the image of $f_n$ is contained in the compact interval $[a-1,b+1]$. On that interval, $g$ is uniformly continuous and therefore $g\circ f_n\to g\circ f$ uniformly.