Substitution for limits How does substitution for limits exactly work? 
I see often answers that use the substitution $t=\frac1x$, then changing $x\rightarrow\infty$ to  $t\rightarrow0^+$.
I have seen this question, this appears to solve my question in the finite case. How does it work when going to infinty? 
Books I'm using don't cover substitutions, but they seem very useful. 
 A: For real-valued function $f$ we say that:

$\underset{x\rightarrow \infty}{\text{lim}}f(x) = L \iff$ for all $\epsilon >
 0$ there exists $B > 0$ such that $x>B \implies |f(x) - L| <
 \epsilon$.

On the other hand:

$\underset{t\rightarrow 0^+}{\text{lim}}f(\frac{1}{t}) = L^* \iff$ for all $\epsilon > 0$ there exists $\delta > 0$ such that $0 < t <\delta \implies |f(\frac{1}{t}) - L^*|< \epsilon$.

If we have the second version, then by letting $\delta = 1/B$ we have that $0 < t < \frac{1}{B} \implies \frac{1}{t} > B \implies |f(\frac{1}{t})-L^*| < \epsilon$.
If $x = \frac{1}{t}$, we can rewrite the last part as $x > B \implies |f(x) - L^*| < \epsilon$ and we have the first version. By the uniqueness of limits, $L = L^*$.
This proves you can perform this change of variable without any trouble, and the limit will be the same if it exists.
A: Since the other question doesn't address the infinite case, I will try to prove some of them here myself. They are generally quite simple and there are numerous cases so I won't write them out all here. 

Lemma 1. Suppose that $\lim_{y\to \pm\infty} f(y)= \ell$ and suppose that $\lim_{x\to a} g(x)=\pm\infty$. Also suppose that the range of $g$  is a subset of the domain of $f$. Then $$\lim_{x \to \pm\infty} f(g(x)) = \ell $$

Proof. We only do the case for positive infinity. The negative case goes similiarly. 
We know that, for every $\varepsilon>0$, there is a $K$ such that for all $y>K$ we have $|f(y)-\ell|<\varepsilon$.
Also, we know that, for any $M$, that there is a $\delta$ such that if $|x-a|<\delta$, then $g(x) > M$. 
Now we have that there exist $\delta$ such that if $|x-a|<\delta$, then $g(x)> K$ and thus $|f(g(x))-\ell|<\varepsilon$. This concludes the proof. 

Lemma 2. Suppose that $\lim_{y\to  \ell} f(y)= \pm\infty$ and suppose that $\lim_{x\to a} g(x)=\ell$, yet $g$ does not attain the value $\ell$ in the neighbourhood of $x$.  Also suppose that the range of $g$  is a subset of the domain of $f$. Then $$\lim_{x \to a} f(g(x)) = \pm\infty$$

Proof. We only do the case for positive infinity. The negative case goes similiarly. 
We know that, for any $M$, that there is a $\delta_1$ such that if $|x-\ell|<\delta_1$, then $f(x) > M$. 
We know that, for every $\varepsilon>0$, there is a $\delta_2$ such that if $|x-a|<\delta_2$ we have $|g(x)-\ell|<\varepsilon$.
Therefore, there is a $\delta$ such that if $|x-a|<\delta$, then $|g(x)-\ell|<\delta_1$, and then we can conclude $f(g(x)) > M$. 
