<s>[INST] Find the fifth expression of Taylor's for $\sin (\tan x)$ around $x=0$ 
Find the fifth expression of Taylor's for $\sin (\tan x)$ around $x=0$

My try:
$$\sin x=x+r_{1}(x), r_{1}(x)=o(x)$$ $$\tan x=x+\frac{x^3}{3}+\frac{2}{15}x^5+r_{2}(x), r_{2}(x)=o(x^5)$$ So: $$\sin \tan x=(x+\frac{x^3}{3}+\frac{2}{15}x^5)+r_{3}(x+\frac{x^3}{3}+\frac{2}{15}x^5+r_{2}(x)))=x+\frac{x^3}{3}+\frac{2}{15}x^5+r_{4}(x), r_{4}(x)=o(x)$$
That is why fifth expression of Taylor's is $\frac{2}{15}x^5$ for me. However Mathematica say that: $$\sin \tan x=x+\frac{x^3}{6}-\frac{x^5}{40}+o(x^5)$$ Where have I a mistake?
 [/INST] Don't use the same symbol $x$  for two different variables :
$$\sin(\tan(x))=\sin(X)\quad\text{with}\quad X=\tan(x).$$
$$\tan(x)=x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^6)$$
$$\sin(X)=X-\frac{X^3}{6}+\frac{X^5}{120}+O(X^6)$$
$\sin(\tan(x))=\big(x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^6)\big) -\frac{\big(x+\frac{x^3}{3}+O(x^4)\big)^3 }{6}+\frac{\big(x+O(x^2)\big)^5}{120}+O(x^6)$
Expand each term and eliminate the powers of $x$ higher than 5 :
$\big(x+\frac{x^3}{3}+O(x^4)\big)^3=x^3+x^5+O(x^6)$ 
$\big(x+O(x^2)\big)^5=x^5+O(x^6)$
Put them into the above equation for $\sin(\tan(x))$ and simplify :
$\sin(\tan(x))=x+\frac{x^3}{3}+\frac{2x^5}{15} -\frac{x^3+x^5 }{6}+\frac{x^5}{120}+O(x^6)$
$$\sin(\tan(x))=x+\frac{x^3}{6} -\frac{x^5}{40}+O(x^6)$$
NOTE : 
Your calculus is not correct at $ $$\sin \tan x=(x+\frac{x^3}{3}+\frac{2}{15}x^5)+r_{3}(x+\frac{x^3}{3}+\frac{2}{15}x^5+r_{2}(x)))$ because one must take the term $(x+\frac{x^3}{3}+\frac{2}{15}x^5)$ at power 3 and the next at power 5. 
Write explicitly $r_1(x),r_2(x), r_3(x)$ as series of powers of $x$ and you will understand.
</s>