# If $(f_n)_{n\geq 1} \to f$ uniformly and $(g_n)_{n\geq 1} \to g$ uniformly then $(f_n \circ g_n)_{n\geq 1} \to f\circ g$ uniformly

EDIT: Let $X$ be a compact metric space, $A$ a set. Let $(f_n)_{n\geq 1}$ be a sequence of continuous functions from $X$ to $\mathbb{R}$, and suppose $f_n \to f$ uniformly where $f:X\to \mathbb{R}$. Let and $(g_n)_{n\geq 1}$ be a sequence of continuous functions from $A$ to $X$ and suppose $g_n \to g$ uniformly, where $g:A \to X$. Show that $(f_n \circ g_n)_{n\geq 1} \to f\circ g$ uniformly.

I've managed a proof, but Im not sure if Im prooving uniform convergence.

Given $\epsilon>0$ Im looking for $m_0 \in \mathbb{N}$ such that $|f_n \circ g_n(x) - f\circ g(x)|<\epsilon$ if $n \geq m_0$ for all $x\in A$.

Now consider $\epsilon /2$, there exist $\delta >0$ such that $d(x,y)<\delta$ implies $|f(x)-f(y)|<\epsilon /2$. (Since $f_n \to f$ uniformly, then $f$ is continuous.) So for this given $\delta$ there exist $n_0$ such that $d(g_n(x),g(x))<\delta$ if $n\geq n_0$, for every $x \in A$ (because of the uniform convergence of $g_n \to g$) and therefore, $|f(g_n(x))-f(g(x))|<\epsilon /2$

Because of the uniform convergence of $f_n \to f$, given $\epsilon /2$ there exist $n_1$ such that $|f_n(x) - f(x)|<\epsilon /2$ if $n \geq n_1$, for all $x\in X$.

Then taking $m_0 = max \{n_0,n_1\}$, and since $f$ is uniformly continuous ($f$ continuous in $X$ compact)

$|f_n (g_n(x)) - f(g(x))| \leq |f_n(g_n(x))-f(g_n(x))|+|f(g_n(x))-f(g(x))|<\epsilon$

• Shouldn't $A$ also be a metric space? – Hagen von Eitzen Jun 9 '15 at 21:51
• What is uniform convergence of functions defined on a set? – Mathematician 42 Jun 9 '15 at 21:52
• It's not. I didn't use the continuity of $g$ (which probably doesn't even have any sense.) – Joaquin Liniado Jun 9 '15 at 21:52
• It does not make any sense, and whatever you are trying to do, you should use some continuity properties of $g$, but they have to make sense first. – Mathematician 42 Jun 9 '15 at 21:55
• In the proof I didn't have to use any continuity property of $g$. Actually, since there is no metric defined in $A$, the exercise is intended not to use the "continuity" properties of $g$ which actually doesn't have. – Joaquin Liniado Jun 9 '15 at 21:57

The proof fails, because you are using uniform continuity of $f$, not just continuity.
To see that even the claim fails in general, consider $f_n (x) = x^2 = f(x)$ for all $n$. Clearly, $f_n \to f$ uniformly. Furthermore, let $A = \Bbb{R}$ and $g_n (x) = x+1/n$, as well as $g(x) = x$ for all $x \in A = \Bbb{R}$. Clearly $g_n \to g$ uniformly.
But $$| f_n (g_n(n)) - f (g(n))| = | (n + \frac{1}{n})^2 - n^2| = |2 + \frac{1}{n^2}| \geq 2,$$ so that $f_n \circ g_n$ does not converge uniformly to $f \circ g$.
• The metric space $X$ was compact, I didn't read that! That's why $f$ is uniformly continuous. Im sorry! Thank you anyways! – Joaquin Liniado Jun 14 '15 at 15:30