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?
For each $x \in [0,1]$, $f_n(x) \to f(x)$. Since $f_n(x) \in [0,1]$, $f(x) \in [0,1]$. Idem for $g$.
Let $\epsilon > 0$.
\begin{align} & \exists N_1 \in \Bbb{N}: \forall n \ge N_1, \forall y \in [0,1], |f_n(y)-f(y)| < \epsilon \tag1 \label1 \\ & \exists \delta > 0 : \forall |y - y'| \le \delta, |f(y) - f(y')| < \epsilon \tag2 \label2 \\ & \exists N_2 \in \Bbb{N}: \forall k \ge N_2, \forall x \in [0,1], |g_k(x)-g(x)| < \delta \tag3 \label3 \end{align}
\eqref{1} and \eqref{3} are the definition of uniform continuity; \eqref{2} is due to the facts that the uniform limit $f$ of a sequence of continuous functions $(f_n)_n$ is continuous, and that $f$ is uniformly continuous on closed and bounded interval $[0,1]$.
Put \eqref{1}-\eqref{3} together. Take $N = \max\{N_1,N_2\}$. For all $n \ge N$,
\begin{align} & \quad |f_n(g_n(x)) - f(g(x))| \\ &\le |f_n(g_n(x)) - f(g_n(x))| + |f(g_n(x)) - f(g(x))| \\ &\le \epsilon + \epsilon = 2\epsilon. \end{align}
In the last inequality, we applied \eqref{1} with $y = g_n(x)$ in the first term, and \eqref{3} with $k = n$ composed with \eqref{2} with $y = g_n(x)$ and $y' = g(x)$ in the second term.
Hence $f_n \circ g_n$ converges uniformly to $f \circ g$.