[Math] Composition of two uniformly convergent sequences of functions is uniformly convergent

real-analysissequences-and-seriesuniform-convergence

I am trying to prove or provide a counter-example for the following:

Let $f_k$ and $g_k$ be sequences of continuous functions on $[0,1]\to[0,1]$ converging uniformly to $f:[0,1]\to \mathbb{R}$ and $g:[0,1]\to \mathbb{R}$ respectively. Does $f_k \circ g_k$ coverge uniformly to $f\circ g$?

What I've done so far:

I know I need to prove that $\forall \epsilon>0, \exists N\in \mathbb{N}$ such that $||f_k(g_k(x)) – f(g(x))|| < \epsilon$ for all $x \in [0,1]$ and $k\geq N$.

At first, I thought I can prove this easily since it follows trivially from the definition of $f_k$ uniformly converging to $f$. However, I noticed that is only true for all $x \in [0,1]$ and $g$ maps onto all of $\mathbb{R}$, not just $[0,1]$. So does that mean it's not necessarily true? Can anyone provide a counter-example?

Best Answer

Let $\|h\|_\infty = \sup_{x \in [0,1]} |h(x)|$.

Note that $f$ is uniformly continuous since $[0,1]$ is compact. Hence since $\|g-g_k\|_\infty \to 0$, we see that $\|f \circ g-f \circ g_k\|_\infty \to 0$.

Then \begin{eqnarray} |f \circ g(x)-f_k \circ g_k (x)| &\le& |f \circ g(x)-f \circ g_k (x)| + |f \circ g_k(x)-f_k \circ g_k (x)| \\ &\le & \|f \circ g-f \circ g_k\|_\infty + \|f-f_k\|_\infty \end{eqnarray} Hence $\|f \circ g-f_k \circ g_k\|_\infty \to 0$.