Here come a nice exercise for a lecture on complex analysis. Let f and g be two different holomorphic non-linear functions defined in a neighborhood of 0 and such that f(0) et g(0) vanish and that f'(0) et g'(0) do not vanish. What is the limit in 0 of the function

$\frac{f\circ g-g\circ f}{f^{-1}\circ g^{-1}-g^{-1}\circ f^{-1}}\ ?$

The calculation is not very complicated, but it needs more than two or three lines. One can then use the result to compute the limit

$\lim_{x\to0}\ \dfrac{\sin(\tan(x))-\tan(\sin(x))}{\arcsin(\arctan(x))-\arctan(\arcsin(x))}$

which is the second problem of Arnold's Trivium.

I came to this question by chance while preparing a small exam where the students have to use the software Maxima and found out that the software sometimes gives wrong results. This is why I decided to do the calculations by hand, not just for the example of the functions sinus et tangent but in the more general setting of the question.

For those who use Maxima, here is the small programm where the software fails (at least in version wxMaxima 14.09.0):

v(x):=(sin(tan(x))-tan(sin(x)))/(asin(atan(x))-atan(asin(x)));
taylor(v(x),x,0,4);
V(x):=integrate(v(t),t,0,x);
taylor(V(x),x,0,5);

Maxima gives the Taylor series of the function v

$v(x)=1+\frac53x^2+\frac{1313}{1890}x^4+O(x^6).$

This is correct, but for the primitive V Maxima's answer is clearly wrong:

$V(x)=x+\frac{35}9x^3+\frac{40703}{9450}x^5+O(x^7).$