TITLE: Cleverly showing that $\lim_{x\to 0}\frac{x^{(\sin x)^x}-(\sin x)^{x^{\sin x}}}{x^3}=\frac{1}{6}$
QUESTION [12 upvotes]: $$\lim_{x\to 0}\frac{\textstyle x^{\textstyle(\sin  x)^{\textstyle x}}-(\textstyle \sin  x)^{\textstyle x^{\textstyle \sin  x}}}{\textstyle x^3}=\frac{1}{6}$$
The limit is easy to get results, but how to rigorously prove it without using Taylor formula?
At first, I guess the numerator is equivalent to $x-\sin x$
And I also find the following several limits have the same results:
$$\lim_{x\to 0}\frac{\textstyle x^{\textstyle x^{\textstyle x}}-(\textstyle \sin  x)^{\textstyle (\sin x)^{\textstyle \sin  x}}}{\textstyle x^3}=\frac{1}{6}$$
$$\lim_{x\to 0}\frac{\textstyle x^{\textstyle x^{\textstyle \tan x}}-(\textstyle \sin  x)^{\textstyle x^{\textstyle \tan  x}}}{\textstyle x^3}=\frac{1}{6}$$
I guess if $f(x)\sim g(x)\sim h(x)\sim O(x)^k$ when $x\to 0$ , then $$\lim_{x\to 0}\textstyle f(x)^{\textstyle g(x)^{\textstyle h(x)}}=f(x)$$

REPLY [3 votes]: Note the limit is only defined as $x\to 0^+$, so I'll answer as such. Not sure how 'clever' this is either and the solution is a little fast and loose, but oh well.

Using LHR or other methods we have
$$
\lim_{x\to0^+} f_1(x)^{f_2(x)} = 1,
$$for $f_1,f_2\in \{\sin,\operatorname{id}\}$. This means we can interchange some of the exponents with mild impunity. In particular, I claim
$$
\lim_{x\to0^+} \frac{x^{(\sin x)^x}-(\sin x)^{x^{\sin x}}}{x^3}
=\lim_{x\to0^+} \frac{x^{x^x}-(\sin x)^{(\sin x)^{\sin x}}}{x^3}
$$
Introduce $x-\sin x$:
$$
=\lim_{x\to0^+} \frac{x^{x^x}-(\sin x)^{(\sin x)^{\sin x}}}{x-\sin x}\cdot \frac{x-\sin x}{x^3}
$$We will break into two limits and justify this by showing the first equals $1$; the second clearly equals $1/6$ by LHR. Then we are interested in
$$
\lim_{x\to0^+} \frac{x^{x^x}-(\sin x)^{(\sin x)^{\sin x}}}{x-\sin x}
$$
Let $q:[0,1]\to\mathbb{R}$, $q(z)=z^{z^z}$ and $q(0)=0$. By the MVT, for some $y$ between $\sin(x)$ and $x$ we have
$$
\frac{x^{x^x}-(\sin x)^{(\sin x)^{\sin x}}}{x-\sin x} = q'(y)
$$Since $q'$ is continuous, it suffices to show $\lim_{y\to 0^+}q'(y) = 1$.
We have
$$
q'(y) = y^{y^y+y-1} \left(y \log ^2 y+y \log y+1\right)
$$The second term is easily seen to approach $1$ in the limit; for example, put $y=e^w$ or play with LHR. The first term isn't as apparent, but using the bound $1>y^y>1+y\log y$ on $(0,1)$ reduces the problem to evaluating $\lim_{y\to 0^+}y^{y+y\log y},$ which is just $1$ (exercise). One could also show it directly.