# How does the chain rule for limits work?

I have to evaluate the limit of this function,

$$\lim_{x\to0^+} \arctan(\ln x)$$

I already know the answer, it's $-\dfrac{π}{2}$, but the only part I don't get it, how does it come to that? I did the following steps:

$$\lim_{x\to0^+} \arctan(\ln x) = \arctan\left(\lim_{x\to0^+} \ln x\right)$$

The limit of $\ln(x)$ when $x$ approaces $0^+$ is negative infinity, wouldn't that mean the answer we're looking for is arctan of negative infinity, which is something we can't find?

Still, it goes to:

$$\lim_{x\to -\infty} \arctan (x) = -\dfrac{\pi}{2}$$, which is how the answer seem to work? How does this happen? And, how does the chain rule come in all this?

-
You don't mean "chain rule" here, rather "composition of functions". –  Doc Sep 24 at 1:26

Look at the expression $$\lim_{x \to 0^+} \arctan(\ln x)$$ Let $u = \ln x$. Then $u \to -\infty$ as $x \to 0^+$. So we can substitute $u$ for $\ln x$ and $u \to -\infty$ for $x \to 0^+$ to obtain $$\lim_{x \to 0^+} \arctan(\ln x) = \lim_{u \to -\infty} \arctan(u)$$ This evaluates to $-\dfrac{\pi}{2}$.

All we did was substitute a new variable; nothing too in-depth!

-
Thank you, that makes sense! –  extremez Sep 24 at 1:38
As $x$ approaches $0$ from the right, $\ln x$ becomes very large negative. As $w$ becomes very large negative, $\arctan w$ approaches $-\frac{\pi}{2}$.
As $x$ approaches $-\dfrac{π}{2}$ from the right it will approach negative infinity, so $$\lim_{x\to-\infty}\arctan (x)=-\dfrac{π}{2}$$