# $\lim\limits_{x \to a} f(x)=L$ and $\lim\limits_{x \to L} g(x)=M$ implies $\lim\limits_{x \to a} g(f(x))=M$?

Let $f,g:\mathbb{R}\to\mathbb{R}$ and $a,L \in \mathbb{R}$

If $\lim\limits_{x \to a} f(x)=L$ and $\lim\limits_{x \to L} g(x)=M$

Then

$\lim\limits_{x \to a} g(f(x))=M$?

My proof:

Since $\lim\limits_{x \to a} f(x)=L$,

Let $\epsilon>0$,there exists a $\delta_1>0$ s.t $|x-a|<\delta_1\Rightarrow |f(x)-L|<\epsilon$

And $\lim\limits_{x \to L} g(x)=M$,

Let $\epsilon>0$,there exists a $\delta_2>0$ s.t $|x-L|<\delta_2\Rightarrow |g(x)-L|<\epsilon$

Let $\delta:=min\{\delta_1,\delta_2\}$

For all $\epsilon>0$ there exists a $\delta>0$ such that $|x-a|<\delta\Rightarrow|g(f(x))-M|<\epsilon$

Is my proof true or not?

• You only know that $\lvert f(x) - L\rvert < \epsilon$, but to conclude $\lvert g(f(x)) - M\rvert < \epsilon$, you need $\lvert f(x) - L\rvert < \delta_2$. Jun 8 '17 at 15:59
• Also note that some people use a definition of $\lim_{x\to a} f(x)$ that restricts $x$ to be different from $a$ (the implication is then $0 < \lvert x-a\rvert < \delta \implies \lvert f(x) - L\rvert < \epsilon$). With that definition of limit, it would not follow that $\lim_{x\to a} g(f(x)) = M$. Jun 8 '17 at 16:02
• @DanielFischer, could you please give an example when it would fail? Jun 8 '17 at 21:12
• @md2perpe $f(x) = 0$ for all $x$, and $g(x) = 0$ for $x\neq 0$, $g(0) = 1$. Then $\lim_{x\to 0} f(x) = 0$ (for both definitions of the limit), and $\lim_{x\to 0} g(x) = 0$ for the definition of limit that excludes $0$ (the limit doesn't exist in the definition that includes $0$ as an allowed argument), and $\lim_{x\to 0} g(f(x)) = 1$. Replace $f$ with $h(x) = x\sin (1/x)$ [and $h(0) = 0$ of course] and $\lim_{x\to 0} g(h(x))$ doesn't exist. Jun 8 '17 at 21:20
• Thanks. If my analysis is correct, the limit of the composition would work if we also demanded that $0<|f(x)-a|<\epsilon$, but that would unfortunately make $f(x) = L$ for all $x$ not converge to $L.$ The question of what definition to use (including or excluding $0$ for $|x-a|$) is delicate; both obviously have their pros and cons. Jun 9 '17 at 5:06

It is incorrect. You should first choose a $\delta_1 >0$ s.t. $\lvert y - L \rvert < \delta_1 \Rightarrow \lvert g(y) - M \rvert < \epsilon$ for arbitrary $\epsilon > 0$. Then choose $\delta_2 > 0$ such that $\lvert x-a \rvert < \delta_2 \Rightarrow \lvert f(x) - L \rvert < \delta_1.$
First is $|g(x) - M|$, not $|g(x) - L|$ . You have to do this: Since $\lim_{y \to L}g(y)=M$ Let $ϵ>0$, there exists a $\rho>0$ s.t $|y−L|<\rho⇒|g(y)−M|<ϵ.$ Then since $\lim_{x \to a}f(x)=L$ You can take $\rho$ in the following statement. For $\rho>0,$ there exists a $δ>0$ s.t $|x−a|<δ⇒|f(x)−L|< \rho$. Since $|f(x) - L| < \rho$, then $|g(f(x)) - M| < ϵ$. Finally $|x-a|<δ ⇒ |g(f(x)) - M| < ϵ$. By definition: $\lim_{x→a} g(f(x))=M$. The problem in your demonstration is that you don't make sure $|f(x)−L| < δ_2$.