Let f be a function. Let g be a continuous function.
Consider the following limits:
$\underset{x\rightarrow x_{0}}{lim}f(g(x))$
$\underset{y\rightarrow g(x_{0})}{lim}f(y)$
I want to know if the existence of one of these limits imply the existence of the other.
Moreover, if both of these limits exist will they be necessarily equal ?
My gut-feeling is that I have to reason with the explicit definition of limits, so:
Suppose that $\underset{x\rightarrow x_{0}}{lim}f(g(x))=L_{1}$ then:
$\forall\epsilon_{1}>0,\exists\delta_{1}>0$ such that $|x-x_{0}|<\delta_{1}\rightarrow|f(g(x)-L_{1}|<\epsilon_{1}$
Somehow, from this I have to conclude that $\underset{y\rightarrow g(x_{0})}{lim}f(y)=L_{2}$ that is:
$\forall\epsilon_{2}>0,\exists\delta_{2}>0$ such that $|y-g(x_{0})|<\delta_{2}\rightarrow|f(y)-L_{2}|<\epsilon_{2}$
or the other way around ie existence of $L_{2}$ implies existence of $L_{1}$.
Any suggestions?
If $g$ is the constant function $0$, and $f(x)=1$ for $|x|>0$, $f(0)=-1$, then $\lim_{y\rightarrow 0}f(y)=1$ and $\lim_{x\rightarrow x_{0}}f(g(x))=\lim_{x\rightarrow x_{0}}f(0)=-1$.
For the existence, let $f(x)=\chi_{\bf{Q}}(x)$, the function taking value $1$ on rational numbers and zero otherwise, and let $g$ be the constant $0$, then $\lim_{x\rightarrow 0}f(g(x))=\lim_{x\rightarrow 0}f(0)=1$ and $\lim_{y\rightarrow 0}f(y)$ does not exist.
Another example is like, let $g(x)=x\sin(1/x)$ for $x\ne 0$, $g(0)=0$, and $f(y)=1$ for $y\ne 0$, $f(0)=-1$, then $\lim_{y\rightarrow 0}f(y)=1$ exists, and the $\lim_{x\rightarrow 0}f(g(x))$ does not exist because for $x_{n}=\dfrac{1}{2n\pi}$, $f(g(x_{n}))=f(0)=-1$ but for $z_{n}=\dfrac{1}{(2n+(1/2))\pi}$, $f(g(z_{n}))=f\left(\dfrac{1}{(2n+(1/2)\pi)}\right)\rightarrow 1$.