limit of composite functions- switching order of limit When is it correct to do stuff like this: 
$$\lim\limits_{x\to a}f(g(x))=f(\lim\limits_{x\to a}g(x)) \quad (*)$$
I know (*) is true when $g$ is continuous at $a$ and $f$ is continuous at $g(a)$. 
However, what about the other cases ? For instance,  what can we say about $\lim\limits_{x\to a}f(g(x))$ when $\lim\limits_{x\to a}g(x)$ equals $\pm \infty$ or does not exist ? 
A Similar question in evaluating limits in the indeterminate forms $1^\infty, 0^0,\infty^\infty$. The technique used here is using $e^x$ and $\ln x$ as following $$\lim\limits_{x\to a}f(x)^{g(x)}=
\lim\limits_{x\to a} e^{g(x)\ln f(x)}=e^{\lim\limits_{x\to a}g(x)\ln f(x)},\quad \text{provided the limit exists}$$
Here, the limit is switched from the outside to the inside of the exponential fuction. 
Can I conclude the following statements ? why and why not ?


*

*If $\lim\limits_{x\to a}g(x)\ln f(x)=\infty$ then $\lim\limits_{x\to
    a}f(x)^{g(x)}=\infty$ 

*If $\lim\limits_{x\to a}g(x)\ln f(x)=-\infty$ then
$\lim\limits_{x\to a}f(x)^{g(x)}=0$ 

*If $\lim\limits_{x\to a}g(x)\ln f(x)$ does not exist, then
$\lim\limits_{x\to a}f(x)^{g(x)}$ does not exist.
 A: Recall the definition of $f$ being continuous at $t_0$:

$$
t\to t_0\quad\Rightarrow\quad f(t)\to f(t_0).
$$

In other words, $\lim f(t)=f(\lim t)$. It is exactly the commutation with the limit if $\lim t$ exists.
Thus, you first and second cases are simply the fact that the function $f(t)=e^t$ is continuous even at $\pm\infty$.
The third one is trickier, since for a general continuous function it is possible for the limit of $f(g(x))$ to exists even if $\lim g(x)$ does not exists. For example, $f(x)=x^2$. The limit of $(-1)^n$ does not exist, but $\lim_{n\to\infty}f((-1)^n)=1$. However, in your particular case the function $f(t)=e^t$ is not just continuous, but also continuously invertible, which makes it possible to use the continuous inverse function $f^{-1}$ to conclude the existence.


*

*if $\lim g(x)$ exists then $\lim f(g(x))$ exists (since $f$ is continuous), and

*if $\lim f(g(x))$ exists then $\lim g(x)=\lim f^{-1}(f(g(x)))=f^{-1}(\lim f(g(x)))$ exists (since $f^{-1}$ is continuous).


Hence, $\lim g(x)$ does not exists iff $\lim f(g(x))$ does not exists for continuous and continuously invertible $f$ (i.e. $f$ is a homeomorphism).
