Does $\lim_{x\rightarrow 0}\frac{\ln(x)}{\cot(x)}$ exist or not? I stumbled on the following limit in a calculus textbook today:
\begin{equation*}
\lim_{x\rightarrow 0}\frac{\ln(x)}{\cot(x)}
\end{equation*}
According to the book's solutions and Mathematica, this limit exists and is equal to 0. I can see why $0$ is obtained using l'Hôpital's rule twice:
\begin{equation*}
...=\lim_{x\rightarrow0}\frac{\left(\frac{1}{x}\right)}{-\csc^2(x)}=-\lim_{x\rightarrow0}\frac{\sin^2(x)}{x}=-\lim_{x\rightarrow0}\frac{2\sin(x)\cos(x)}{1}=2\sin(0)\cos(0)=0
\end{equation*}
If I recall correctly, l'Hôpital's rule is applicable when we have:
\begin{equation*}
\lim_{x\rightarrow a}\frac{f(x)}{g(x)}
\end{equation*}
even if $f$ and $g$ are not derivable at precisely $a$, so there should be no issue in using it on the above limit.
However, I can't reconcile the fact that $\ln(x)$ is defined over $]0,+\infty[$ (and usually, only $\lim_{x\rightarrow0^+}\ln(x)$ exists) with the fact that the above limit exists (both as $x\rightarrow0^+$ and as $x\rightarrow0^{-}$).
It seems to me that only
\begin{equation*}
\lim_{x\rightarrow 0^+}\frac{\ln(x)}{\cot(x)}
\end{equation*}
should exist and thus the "bilateral limit" (with $x\rightarrow 0$) does not exist since the limit with $x\rightarrow0^-$ doesn't.
Is there something I am missing?
 A: Yes you are right, since $\ln x$ is defined for $x>0$ the limit for $x\to 0^-$ is meaningless and only
$$\begin{equation*}
\lim_{x\rightarrow 0^+}\frac{\ln x }{\cot x }
\end{equation*}$$
can be considered.
Note that this doesn't mean in general that the limit considered exists.
For example
\begin{equation*}
\lim_{x\rightarrow 0^+}\frac{\ln x }{\sin \frac1x}
\end{equation*}
can be considered but does not exist.
A: Needless to call L'Hospital for that: the answer is obvious with equivalents: near $0$, $\sin x \sim x$, $\cos x\sim 1$, so
$$\frac{\ln x}{\cot x}=\frac{\ln x\sin x}{\cos x}\sim_{0}\frac{x\ln x}1=x\ln x, $$
and it's a result from high school  that
$$\lim_{x\to 0^+}x\ln x=0.$$
A: Sometimes some tacit assumptions are omitted by authors, and sometimes there are oversights and typos. It should have said $\lim_{x\to 0^+}\;.$
We have $\lim_{x\to 0^+}(x\ln x)=0$  and $\lim_{x\to 0^+}\frac {\tan x}{x}=1.$ 
For $\pi /2>x>0$   we have $\cot x \ne 0$ and $$\frac {\ln x}{\cot x}=(\ln x)(\tan x)=(x\ln x)\cdot\frac {\tan x}{x}.$$
So $\lim_{x\to 0^+} \frac {\ln x}{\cot x}=0\cdot 1=0.$ 
