<s>[INST] Evaluate $\lim\limits_{x \to 0+}\left[\frac{x^{\sin x}-(\sin x)^{x}}{x^3}+\frac{\ln x}{6}\right].$ Problem
Evaluate
$$\lim_{x \to 0+}\left[\frac{x^{\sin x}-(\sin x)^{x}}{x^3}+\frac{\ln x}{6}\right].$$
Attempt
First, we may obtain
$$\lim_{x \to 0+}\left[\frac{x^{\sin x}-(\sin x)^{x}}{x^3}+\frac{\ln x}{6}\right]=\lim_{x \to 0+}\frac{6e^{\sin x\ln x}-6e^{x\ln\sin x}+x^3\ln x}{6x^3}.$$
Here, you can apply L'Hôpital's rule, but it's too complicated. Moreover, you can also apply Taylor's formula, for example
$$e^{\sin x\ln x}=1+\sin x\ln x+\frac{1}{2}(\sin x\ln x)^2+\cdots,\\e^{x\ln\sin x}=1+x\ln\sin x+\frac{1}{2}(x\ln\sin x)^2+\cdots,$$
but you cannot cancel the terms, thus you cannot avoid differentiating, either. Is there any elegant solution?
P.S. Please don't suspect the existence of the limit. The result equals $\dfrac{1}{6}.$
 [/INST] The key here is obtaining the expansions for $x^{\sin x} $ and $\sin^xx$ but it is simpler to deal with their logarithms. Consider
\begin{align} 
f(x) &=\sin x \log x-x\log\sin x\notag\\
&=(x\log x)\left(1-\frac{x^2}{6}+\frac{x^4}{120}-\dots \right)-x\log x-x\log\left(1-\frac{x^2}{6}+\frac{x^4}{120}-\dots\right)\notag\\
&=\notag\\
&=-\frac{x^3\log x} {6}+\frac{x^3}{6}+o(x^3)\notag
\end{align}
And then the expression under limit is $$\sin^xx\cdot\frac{e^{f(x)} - 1}{x^3}+\frac{\log x} {6}$$ which can be further written as $$\sin^xx \left(\frac{e^{f(x)} - 1}{x^3}+\frac{\log x} {6}\right) +\frac{\log x} {6}\cdot(1-\sin^xx) $$ From the expansion of $f(x) $ it is clear that $f(x) =o(x^2)$ and hence $$\frac{e^{f(x)} - 1}{x^3}=-\frac{\log x} {6}+\frac{1}{6}+o(1)$$ The desired limit is $1/6$ if we can prove that $\sin^xx \to 1$ and $(\log x) (1-\sin^xx) \to 0$ and this is not difficult to prove.
We just need to note that $$(\log x) \cdot(1-\sin^xx)=-\frac{\exp(x\log\sin x) - 1}{x\log\sin x} \cdot x\log \sin x\cdot\log x$$ and the fraction above tends to $1$ so that the limit of above expression is equal to the limit of $$-x\log x\left(\log x+\log\frac{\sin x} {x} \right) $$ which is same as $$-x(\log x) ^2-(x\log x) \log\frac{\sin x} {x} $$ and the above clearly tends to $0$.
</s>