I am trying to prove the theorem of limit of composition of functions under the scenario: $\lim_{x\to a}f(x)=l$ , $\lim_{x\to b}g(x)=a$. I need to prove $\lim_{x\to b}f(g(x))=l$.
There are two cases where this is valid:
(i) If $f$ is continuous at $a$
(ii) $f$ is not continuous at $a$, but there exists an open interval $I$ containing $b$ such that $g(x)\neq a$ $\forall x\in I $ except possibly at $b$.
I made a proof for (i) easily. But have a problem in (ii)
My proof(incomplete) for (ii) : Let $\epsilon>0$ Hence, $\exists\delta>0$ such that |u-a|<$\delta$, u$\neq a$ then |f(u)-l|<$\epsilon$ .
Now $g(x)\neq a$ $\forall x\in I $ except possibly at $ b$. There exists h>0 such that |x-b|<$h$, x$\neq$b then
|g(x)-a|<$\delta$ , as $\delta$>0. But we have no guarantee that |g(x)-a|$\neq$0 (We require that to put u=g(x)) Here's where I am stuck. I can't just say that $h$ is such a number that |x-b|<$h$, x$\neq$b then
0<|g(x)-a|<$\delta$, because that is an extra restriction on |g(x)-a|. The limit definition would only give |g(x)-a|<$\delta$ for sufficiently small h>0, but |g(x)-a|$\neq$0 is not necessary. Simply, I have to prove that there always exists $h>0$ , such that $(b-h,b+h)$ is a subset of $I$ and in that interval, $0<|g(x)-a|< \delta $ (see that "there always exists" part is what I need to prove) Is this assertion true? If so, why?
Your statement (ii) is correct: If $\lim_{y\to a} f(y)=\ell$, $\ \lim_{x\to b} g(x)=a$, and $g$ does not assume the value $a$ in a punctured neighborhood $\dot U$ of $b$ then $\lim_{x\to b}f\bigl(g(x)\bigr)=\ell$.
Proof. Let an $\epsilon>0$ be given. Then there is a punctured neighborhood $\dot V$ of $a$ such that $|f(y)-\ell|<\epsilon$ for all $y\in\dot V$. Furthermore there is a punctured neighborhood $\dot W$ of $b$ such that $g(x)\in V$ for all $b\in\dot W$. The set $\dot \Omega:=\dot W\cap\dot U$ is a punctured neighborhood of $b$ as well, and for all $x\in \dot \Omega$ we have $g(x)\ne a$, hence $g(x)\in \dot V$. This then implies that
$$\bigl|f\bigl(g(x)\bigr)-\ell\bigr|<\epsilon\qquad\forall x\in\dot\Omega\ ,$$ and proves the claim. Note that this proof also works when $a$ or $b$ are $\ =\pm\infty$.
In $\epsilon/\delta$ terms exactly the same proof is much more cumbersome:
Let an $\epsilon>0$ be given. Then there is a $\delta>0$ such that $$0<|y-a|<\delta\quad\Rightarrow\quad |f(y)-\ell|<\epsilon\ .\tag{1}$$ Furthermore there is an $\eta'>0$ such that $$0<|x-b|<\eta'\quad\Rightarrow\quad |g(x)-a|<\delta\ .\tag{2}$$ Since $g$ does not assume the value $a$ in a punctured neighborhood of $b$ there is an $\eta''>0$ such that $$0<|x-b|<\eta''\quad\Rightarrow\quad g(x)\ne a\ .\tag{3}$$ Put $\eta:=\min\{\eta', \eta''\}>0$. Then $(2)$ and $(3)$ together imply $$0<|x-b|<\eta\quad\Rightarrow\quad 0<|g(x)-a|<\delta\ .\tag{4}$$ Taking $(4)$ and letting $y:=g(x)$ in $(1)$ we finally obtain $$0<|x-b|<\eta\quad\Rightarrow\quad \bigl|f\bigl(g(x)\bigr)-\ell\bigr|<\epsilon\ .$$