# L'Hopital's rule usage?

I am trying to calculate the limit of a particular function. At some point the limit I want is

$$\lim_{n\to\infty} \frac{\ln(1+n^2)}{\ln(n)}$$

I know the limit of this is 2, which I can kind of show. However I would also think that L'Hopital's rule should be applicable, since we have an indeterminate form. When I do so, however, this gives,

$$\frac{\lim_{n\to\infty} n}{\lim_{n\to\infty} 1+n^2}$$

If I understand correctly then I need to apply the rule again giving

$$\frac{\lim_{n\to\infty} 1}{\lim_{n\to\infty} 2n}$$

which implies a limit of zero. So my question then is, what did I do wrong?

## 2 Answers

When I do so, however, this gives,

$$\frac{\lim_{n\to\infty} n}{\lim_{n\to\infty} 1+n^2}$$

(...)

So my question then is, what did I do wrong?

You forgot the chain rule when taking the derivative of $$\ln(1+n^2)$$: $$\left(\ln(1+n^2)\right)'=\frac{\color{red}{(1+n^2)'}}{1+n^2}=\frac{2n}{1+n^2}$$

$$\lim \frac {\ln(1+x^{2})} {ln(x)}=\lim \frac {(2x)/(1+x^{2})} {1/x}=\lim \frac {2x^{2}} {1+x^{2}}=2$$. [$$\frac d {dx} \ln(1+x^{2})=\frac 1 {1+x^{2}} (2x)$$].