Cute limit: $\lim\limits_{x \to 0^{+}}\frac{\sin(x)^x − x^ {\sin(x)}}{\tan(x) ^x − x^{\tan (x)}}$ What's the fastest way to calculate the below limit (ideally, without resorting to Taylor expansions)?
$$\lim_{x \to 0^{+}}\frac{\sin(x)^x
 − x^ {\sin(x)}}{\tan(x)
^x − x^{\tan (x)}}$$
 A: The Mean Value Theorem says
$$
\frac{e^x-e^y}{x-y}=e^\xi
$$
for some $\xi$ between $x$ and $y$. Therefore,
$$
\begin{align}
\lim_{x\to0^+}\frac{\sin(x)^x−x^{\sin(x)}}{\tan(x)^x−x^{\tan(x)}}
&=\lim_{x\to0^+}\frac{x\log(\sin(x))-\sin(x)\log(x)}{x\log(\tan(x))-\tan(x)\log(x)}\tag{1}\\[6pt]
&=\lim_{x\to0^+}\frac{x\log(x)+x\log\left(\frac{\sin(x)}{x}\right)-\sin(x)\log(x)}{x\log(x)+x\log\left(\frac{\tan(x)}{x}\right)-\tan(x)\log(x)}\tag{2}\\
&=\lim_{x\to0^+}\frac{x-\sin(x)+\frac{x}{\log(x)}\log\left(\frac{\sin(x)}{x}\right)}{x-\tan(x)+\frac{x}{\log(x)}\log\left(\frac{\tan(x)}{x}\right)}\tag{3}\\
&=\lim_{x\to0^+}\frac{x-\sin(x)+\frac{x}{\log(x)}O\!\left(\frac{x-\sin(x)}{x}\right)}{x-\tan(x)+\frac{x}{\log(x)}O\!\left(\frac{x-\tan(x)}{x}\right)}\tag{4}\\
&=\lim_{x\to0^+}\frac{x-\sin(x)+O\!\left(\frac{x-\sin(x)}{\log(x)}\right)}{x-\tan(x)+O\!\left(\frac{x-\tan(x)}{\log(x)}\right)}\tag{5}\\[9pt]
&=\lim_{x\to0^+}\frac{x-\sin(x)}{x-\tan(x)}\tag{6}\\[15pt]
&=\lim_{x\to0^+}\frac{1-\cos(x)}{1-\sec^2(x)}\tag{7}\\[15pt]
&=\lim_{x\to0^+}-\frac{\cos^2(x)}{1+\cos(x)}\tag{8}\\[15pt]
&=-\frac12\tag{9}
\end{align}
$$
Explanation:
$(1)$: Mean Value Theorem
$(2)$: $\log(ab)=\log(a)+\log(b)$
$(3)$: divide numerator and denominator by $\log(x)$
$(4)$: $\log(1+x)=O(x)$
$(5)$: algebra
$(6)$: $O\!\left({\raise{1.5pt}\frac{u}{\log(x)}}\right)=o(u)$ as $x\to0^+$
$(7)$: L'Hôpital
$(8)$: multiply numerator and denominator by $\frac{\cos^2(x)}{1-\cos(x)}$
$(9)$: evaluate at $x=0$
A: To expand on my comment, I will use the following two limits apart from the standard lmits: $$\lim_{x \to 0}\frac{x - \sin x}{x^{3}} = \frac{1}{6},\,\lim_{x \to 0}\frac{x - \tan x}{x^{3}} = -\frac{1}{3}$$ Both the above are easily obtained either via Taylor series or via L'Hospital's Rule.
We have then
\begin{align}
L &= \lim_{x \to 0^{+}}\frac{\sin^{x}x - x^{\sin x}}{\tan^{x}x - x^{\tan x}}\notag\\
&= \lim_{x \to 0^{+}}\frac{\exp(\sin x\log x)}{\exp(\tan x\log x)}\cdot\frac{\exp(x\log\sin x - \sin x\log x) - 1}{\exp(x\log\tan x - \tan x\log x) - 1}\notag\\
&= \lim_{x \to 0^{+}}\frac{\exp(x\log\sin x - \sin x\log x) - 1}{\exp(x\log\tan x - \tan x\log x) - 1}\notag\\
&= \lim_{x \to 0^{+}}\frac{\exp(x\log\sin x - \sin x\log x) - 1}{x\log\sin x - \sin x\log x}\cdot\frac{x\log\sin x - \sin x\log x}{x\log\tan x - \tan x\log x}\notag\\
&\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\cdot\frac{x\log\tan x - \tan x\log x}{\exp(x\log\tan x - \tan x\log x) - 1}\notag\\
&= \lim_{x \to 0^{+}}\frac{x\log\sin x - \sin x\log x}{x\log\tan x - \tan x\log x}\notag\\
&= \lim_{x \to 0^{+}}\dfrac{(x - \sin x)\log x + x\log\dfrac{\sin x}{x}}{(x - \tan x)\log x + x\log\dfrac{\tan x}{x}}\notag\\
&= \lim_{x \to 0^{+}}\frac{x - \sin x}{x - \tan x}\cdot\dfrac{1 - \dfrac{1}{\log x}\dfrac{x}{\sin x - x}\log\dfrac{\sin x}{x}}{1 - \dfrac{1}{\log x}\dfrac{x}{\tan x - x}\log\dfrac{\tan x}{x}}\notag\\
&= \lim_{x \to 0^{+}}\frac{x - \sin x}{x - \tan x}\cdot\dfrac{1 - 0\cdot 1}{1 - 0\cdot 1}\notag\\
&= \lim_{x \to 0^{+}}\dfrac{\dfrac{x - \sin x}{x^{3}}}{\dfrac{x - \tan x}{x^{3}}}\notag\\
&= -\frac{1}{2}\notag
\end{align}

We have used the following standard limits in the derivation above $$\lim_{x \to 0}\frac{\sin x}{x} = \lim_{x \to 0}\frac{\tan x}{x} = \lim_{x \to 0}\frac{\log(1 + x)}{x} = \lim_{x \to 0}\frac{\exp(x) - 1}{x} = 1,\lim_{x \to 0^{+}}x\log x = 0$$ Note that $\sin x\log x = \dfrac{\sin x}{x}\cdot x \log x \to 1\cdot 0 = 0$ as $x \to 0^{+}$ and similarly $\tan x\log x \to 0$. Further $x\log\sin x = x\log x + x\log\dfrac{\sin x}{x} \to 0 + 0\cdot \log 1 = 0$ as $x \to 0^{+}$ and similarly $x\log\tan x \to 0$. Also note that if $t = (\sin x - x)/x$ then $t \to 0$ as $x \to 0^{+}$ and hence $$\frac{x}{\sin x - x}\log\frac{\sin x}{x} = \frac{\log(1 + t)}{t} \to 1$$ and in similar manner $$\frac{x}{\tan x - x}\log\frac{\tan x}{x} \to 1$$
The above is a reasonably fast way (though not as good as the use of Taylor series) to evaluate this cute limit and the real effort is in typing the full solution. The limits mentioned in the beginning of the answer are already famous and play a key role here apart from the standard limits mentioned in the later part of the answer.
