# 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 '13 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! – Daniel Cook Sep 24 '13 at 1:38
Unfortunately, this sort of substitution does not in general work with limits. It works here because the intermediate limit is infinite (and the logarithm function is finite as $x \to 0^+$); it also works with a finite intermediate limit if the inner function never takes the value of that limit (or if either function is continuous, of course); probably there are other situations where it's valid. But it fails if the inner function is constant and the outer function is discontinuous at that value! – Toby Bartels Jan 29 '14 at 23:03
Here is a fancier situation where it fails: $$lim_{x \to 0} [-|x \sin(1/x)|].$$ (Here $[t]$ is the floor of $t$, the largest integer not larger than $t$.) As $x \to 0$, $x \sin(1/x) \to 0$ (a classic example of the squeeze/sandwich theorem). As $u \to 0$, $[-|u|] \to -1$ (because $-|u| < 0$ for $u \ne 0$). But as $x \to 0$, $[-|x sin(1/x)|]$ has no limit, because it takes the value $0$ at $x = 1/\pi, 1/(2\pi), 1/(3\pi), \ldots$, which can be arbitrarily close to $0$. – Toby Bartels Jan 29 '14 at 23:03
I can no longer edit my first comment above, but it has a minor error; where it says ‘or if either function is continuous’, it should say ‘or if the outer function is continuous’. – Toby Bartels Jan 29 '14 at 23:53

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}$.

-
My question is this, how does arctan(−∞) suddenly become limx→−∞arctan(w) ? – Daniel Cook Sep 24 '13 at 1:29
you cant take the arctan of -infinity, -infinity is not a number, but you can take a limit as it approaches infinity – Yan Yau Sep 24 '13 at 1:30

As $x$ approaches $-\dfrac{π}{2}$ from the right it will approach negative infinity, so $$\lim_{x\to-\infty}\arctan (x)=-\dfrac{π}{2}$$

-