# The limit of a composed function

Let $g_n: \mathbb{N} \rightarrow \mathbb{R}$ and $f_n(x): \mathbb{N\times R} \rightarrow \mathbb{R}$.

If $g_n \rightarrow g$ and $f_n(g) \rightarrow f(g)$, can we deduce $f_n(g_n) \rightarrow f(g)$?

If we cannot deduce that unconditionally, what is the condition(s) for it to hold?

• I imagine that you mean $f_n(g) \rightarrow f(g)$ and not $f_n(g) \rightarrow f$? – mathcounterexamples.net Jul 10 '15 at 6:04
• @mathcounterexamples.net I edited the question. Thanks for your remark. – Amir Kazemi Jul 10 '15 at 7:51

It is sufficient, if $f_n\to f$ uniformly on a neighborhood $U$ of $g$ and $f$ is continuous at $g$. Notice that for $n$ sufficiently large we have $g_n\in U$ and $$|f_n(g_n) - f(g)| = |f_n(g_n) - f(g_n) + f(g_n) - f(g)| \le \|f_n - f \|_{\infty, U} + |f(g_n) - f(g)| \to 0.$$

• Thanks, both for the sufficient condition and its proof. Anyway, would you please introduce a reference (a book or an article) in this regard? – Amir Kazemi Jul 15 '15 at 18:05
• @AmirKazemi: I forgot where I have read it, probably some exercise in some standard literature on analysis. Sorry :( – user251257 Jul 15 '15 at 18:08

Let $f_n$ be continuous piecewise linear with $f_n(0)=f_n(\frac{1}{n})=0$ and $f_n(\frac{1}{2n})=n$. $(f_n)$ converges pointwise to the always vanishing function.

For $g_n$ take $g_n(x)=\frac{1}{2n}$ for all $x \in \mathbb R$. $(g_n)$ converges uniformly to the always vanishing function.

$f_n(g) \to 0$ but $f_n(g_n)=n$ diverges everywhere.

• Thanks for your counterexample. Is it possible to derive the condition upon which my argument holds? – Amir Kazemi Jul 10 '15 at 6:13
• If $f_n \to f$ uniformly, $g_n \to g$ uniformly and all the $f_n$ are equicontinuous, that should work. But that is pretty strong – mathcounterexamples.net Jul 10 '15 at 6:18
• Thanks. Would you prove your conditions or at least give some references or guides so that I can prove them by myself? – Amir Kazemi Jul 10 '15 at 6:45