# How does variable substiution in limit finding work?

I am asked to calculate the following limit:

$\displaystyle \lim{x \to \infty}$ for $x \ln(1+\frac{1}{x})$. This is an indeterminate form of $\infty * 0$. I have made a lengthy calculation switching the two parts to form (0 * inf) and then f(x)/(1/g(x)) to finally, using l'hopital, conclude in $\frac{(-1/x)}{(-1/x)} = 1$. This is the correct answer, but I question the validity of my method.

Wolfram alpha on the other hand uses a variable substitution:

$\lim{x \to \infty}$ for $x \ln(1+\frac{1}{x})$ becomes

$\lim{t \to 0}$ for $\frac{ln(1+t)}{t}$.

However, I fail to see how all the x terms are replaxed with t in this formulae. Especially how the limit goes from x->inf to t->0. Hope someone can explain that. Thanks in advance.

Set $t=\frac{1}{x}$. Now, as $x\to\infty$, $t\to0$. Also, from rearranging, we get $x=\frac{1}{t}$, so that we have $$\lim_{x\to\infty}x\ln(1+\frac{1}{x})=\lim_{t\to0}\frac{\ln(1+t)}{t}.$$ Does this clear things up?
Wolframalpha lets $t := \frac 1x \iff x = \frac 1t$. Then $t \downarrow 0$ as $x \to \infty$ and for each $t > 0$ we have $$x \log\left(1+\frac 1x\right) = \frac 1t \log(1 + t) = \frac{\log(1+t)}t$$