<s>[INST] An almost impossible limit The following limit appeared in a qualification exam: Find the limit of
$$\lim_{x \to 0} \left( \frac{\tan (\sin (x))-\sin (\tan (x))}{x^7} \right).$$
I ended up doing it in Mathematica, is there any other way?
Thanks in advance!
 [/INST] I have not been able to find an elementary solution which avoids Taylor's series but I think we can provide much simpler approach in terms of calculations while following the Taylor's series approach.
Let $\tan x = t$ so that $\sin x = t/\sqrt{1 + t^{2}} = s$ and then $$\tan(\sin x) - \sin (\tan x) = \tan s - \sin t$$ Since $(\tan x)/x \to 1$ as $x \to 0$ we can replace the $x^{7}$ in denominator in the question by $t^{7}$. So the desired limit is equal to $$L = \lim_{t \to 0}\frac{\tan s - \sin t}{t^{7}}$$ where $s = t/\sqrt{1 + t^{2}}$. We will now need the expansion $$\tan s = s + \frac{s^{3}}{3} + \frac{2s^{5}}{15} + \frac{17s^{7}}{315} + \cdots$$ And then we have the tedious algebra $$\begin{aligned}A &= s + \frac{s^{3}}{3} + \frac{2s^{5}}{15}\\
&= \frac{t}{\sqrt{1 + t^{2}}} + \frac{t^{3}}{3(1 + t^{2})\sqrt{1 + t^{2}}} + \frac{2t^{5}}{15(1 + t^{2})^{2}\sqrt{1 + t^{2}}}\\
&= \frac{15t(1 + t^{2})^{2} + 5t^{3}(1 + t^{2}) + 2t^{5}}{15(1 + t^{2})^{2}\sqrt{1 + t^{2}}}\\
&= \frac{22t^{5} + 35t^{3} + 15t}{15(1 + t^{2})^{2}\sqrt{1 + t^{2}}}\\
&= \frac{22t^{5} + 35t^{3} + 15t}{15}\cdot(1 + t^{2})^{-5/2}\\
&= \left(t + \frac{7t^{3}}{3} + \frac{22t^{5}}{15}\right)\cdot\left(1 - \frac{5t^{2}}{2} + \frac{35t^{4}}{8} - \frac{105t^{6}}{16} + \cdots\right)\\
&= t + t^{3}\left(\frac{7}{3} - \frac{5}{2}\right) + t^{5}\left(\frac{35}{8} - \frac{35}{6} + \frac{22}{15}\right) + t^{7}\left(-\frac{105}{16} + \frac{245}{24} - \frac{22}{6}\right) + \cdots\\
&= t - \frac{t^{3}}{6} + \frac{t^{5}}{120} - \frac{t^{7}}{48} + \cdots\\
&= t - \frac{t^{3}}{3!} + \frac{t^{5}}{5!} - \frac{t^{7}}{48} + \cdots\end{aligned}$$ Note how nicely the first three terms match with those in expansion of $\sin t$.
The above tedious algebra was the only part which dealt with calculation of coefficients in a certain power series. One can see that it involves very less calculation and the series for $(1 + t^{2})^{-5/2}$ needs to be calculated till 3 terms only (ignoring the obvious first term 1).
Now the limit $L$ can be calculated very easily as follows $$\begin{aligned}L &= \lim_{t \to 0}\frac{\tan s - \sin t}{t^{7}}\\
& = \lim_{t \to 0}\frac{\tan s - A}{t^{7}} + \frac{A - \sin t}{t^{7}}\\
&= \lim_{t \to 0}\frac{\tan s - A}{s^{7}}\cdot\left(\frac{s}{t}\right)^{7} + \frac{A - \sin t}{t^{7}}\\
&= \frac{17}{315} - \frac{1}{48} + \frac{1}{7!} = \frac{1}{30}\end{aligned}$$ In the above we have used the expansion of $\sin t$ and $\tan s$ and we can see that the appropriate number of terms cancel because of the term $A$ and only the terms containing $s^{7}$ and $t^{7}$ are significant while the terms with higher powers of $s, t$ tend to $0$ and do not contribute to the limit. Also we have used the fact that as $t \to 0$ the variable $s \to 0$ and $s/t = 1/\sqrt{1 + t^{2}} \to 1$.
Note: An approach which avoids use of Taylor series and uses LHR is presented here (but it is really laborious).
</s>