Limit of composite function I know that $$\lim_{x \rightarrow a} (fg(x)) = f\left(\lim_{x \rightarrow a} g(x)\right)$$
provided that $\lim_{x \rightarrow a} g(x)$ exists and $f$ is continuous at this limit point. 
Normally when we say that a limit exists, we don't refer to it being infinity. So I am wondering if this applies when $\lim_{x \rightarrow a} g(x) = \infty$
It would seem so, because when I evaluate $$\lim_{x \rightarrow \infty} \tan(\sinh x) = \lim_{x \rightarrow \infty} \tan(x)$$ since $\lim_{x \rightarrow \infty} \sinh x = \infty$ . Even though, we don't evaluate $\tan$ at $\infty$, it is still that same idea... 
So I have two questions: is what I wrote above correct for that specific example? Can someone write out the conditions clearly for the case where $\lim_{x \rightarrow a} g(x) = \infty$ (I haven't been able to find it online)
Thanks
 A: It is correct for this specific example and for functions in general. It follows from the $\varepsilon,\delta$ definition:

Theorem: If $f,g:\mathbb{R}\rightarrow\mathbb{R}$ (other domains may also work) be functions such that $$\lim_{x\rightarrow\infty} g(x)=\infty$$ then $$\lim_{x\rightarrow\infty} f(x) = \lim_{x\rightarrow\infty} f\circ g(x)$$ provided that $\lim_{x\rightarrow\infty} f(x)$ exists (it also works if the limit is infinity).

Let me provide the key point of the proof (for simplicity I'll assume that $\lim_{x\rightarrow\infty} f(x) = L<\infty$ I will leave the case where the limit is infinity as an exercise).
Proof: Let $\varepsilon>0$, since $\lim_{x\rightarrow\infty} f(x)=L$ there exists $R_f\in\mathbb{R}$ such that for every $x>R_f$ we have $|f(x)-L|<\varepsilon$.
For this $R_f$, since $\lim_{x\rightarrow\infty} g(x)=\infty$ there exists $R_g$ such that for every $x>R_g$ we have $g(x)>R_f$
Hence, for $x>R_g$ we have that $g(x)>R_f$ and so $|f(g(x))-L|<\varepsilon$. Hence $f\circ g (x)\rightarrow L$ as $x\rightarrow\infty$ which completes the proof.
A: We can show directly by the definition, without any requirements about continuity, that
$$\tag{1} \lim_{x \to \infty} f(x) \,\text{exists (finite or infinite)}\, \land \,\lim_{x \to a} g(x)=\infty \implies \lim_{x \to a} (f\circ g(x))=\lim_{x \to \infty} f(x) $$
but we can't write that
$$\lim_{x \rightarrow a} (f\circ g(x)) = f\left(\lim_{x \rightarrow a} g(x)\right)$$
since $f(\infty)$, according to the usual definitions, is meaningless.

To prove $(1)$ let consider $2$ cases
1) Assuming $\lim_{x \to \infty} f(x)=L<\infty$ we have
$$\forall \epsilon>0\quad \exists M\quad \forall x>M\quad |f(x)-L|<\epsilon$$
and since $\lim_{x \to a} g(x)=\infty$
$$\forall M \quad \exists \delta>0\quad \forall x:\, |x-a|<\delta \quad g(x)>M$$
we have that
$$\forall \epsilon>0\quad \exists \delta>0\quad \forall x: \, |x-a|<\delta \quad g(x)>M \implies |f(g(x))-L|<\epsilon$$ 
that is $\lim_{x \rightarrow a} (f\circ g(x))=L$.
2) Assuming $\lim_{x \to \infty} f(x)=\infty$ we have
$$\forall M \quad \exists \bar x\quad \forall x>\bar x \quad f(x)>M$$
and since $\lim_{x \to a} g(x)=\infty$
$$\forall \bar x \quad \exists \delta>0\quad \forall x: \, |x-a|<\delta \quad g(x)>\bar x$$
we have that
$$\forall M \quad  \exists \delta>0\quad \forall x: \,|x-a|<\delta \quad g(x)>\bar x \implies f(g(x))>M$$ 
that is $\lim_{x \rightarrow a} (f\circ g(x))=\infty$.
The case $\lim_{x \to \infty} f(x)=-\infty$ is analogous.
Note that we didn't used any condition about continuity which indeed is not requested.

See also the related


*

*Limit of the composition of two functions with f not necessarily being continuous.

*Finding a limit using change of variable- how come it works?
