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?
 A: 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.
A: Hint:
Try starting $$\sin (\tan x)=\tan x - \frac{(\tan x)^3}{3!} + \frac{(\tan x)^5}{5!} +o((\tan x)^5)$$
And you must consider all terms that have $x^5$ in them, for example, $(\tan x)^3= (x+\frac{x^3}{3} +\frac{2}{15}x^5)^3$ have $(\frac{x^5}{3}+\frac{2x^5}{3})$
So, if you gather all the $x^5$ terms respectively, you'll find out that the coefficient of $x^5$ in the series is $$\frac{2}{15} -\frac{1}{6}(\frac{1}{3}+\frac{2}{3})+\frac{1}{5!}= \frac{-3}{120}=\frac{-1}{40}$$
A: Taylor's expansions up to the same order can be composed. So you have to consider the Taylor polynomial of degree $5$ for $\sin x$, and substitute $x$  with the degree $5$ Taylor polynomial for $\tan x$, truncating the successive powers of the latter polynomial at degree $5$.
As a start-up, here is the computation for degree $3$:
$$\bigl(x+\tfrac13x^3 +\tfrac2{15}x^5\bigr)^2=x^2+\tfrac19x^4+o(x^5),$$
\begin{align}
&\text{so that}\hspace{6em} &\bigl(x+\tfrac13x^3 +\tfrac2{15}x^5\bigr)^3&=\bigl(x^2+\tfrac19x^4+o(x^5)\bigr)\bigl(x+\tfrac13x^3 +\tfrac2{15}x^5\bigr)&\hspace{6em} \\
&&&=x^3+\tfrac13x^5+\frac19x^5+o(x^5)=\color{red}{x^3+\tfrac49x^5}+o(x^5).
\end{align}
A: The organized and detailed solution must be:
$$\sin y=y-\frac{y^3}{6}+\frac{y^5}{120}+O(y^7);\\
\sin \overbrace{\tan x}^{y}=\overbrace{\tan x}^{y}-\frac{(\overbrace{\tan x}^{y})^3}{6}+\frac{(\overbrace{\tan x}^{y})^5}{120}+O((\overbrace{\tan x}^{y})^7)=\\
\tan x=\color{blue}{x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^7)};\\
(\tan x)^2=(\tan x)(\tan x)=\left[x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^7)\right]\left[x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^7)\right]=\\
x^2+\frac23x^4+O(x^6);\\
(\tan x)^3=(\tan x)^2(\tan x)=\left[x^2+\frac23x^4+O(x^6)\right]\left[x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^7)\right]=\\
\color{red}{x^3+x^5+O(x^7)};\\
(\tan x)^5=(\tan x)^3(\tan x)^2=\left[x^3+x^5+O(x^7)\right]\left[x^2+\frac23x^4+O(x^6)\right]=\\
\color{green}{x^5+O(x^7)};\\
\sin \tan x=\color{blue}{\left[x+\frac{x^3}{3}+\frac{2x^5}{15}+O(x^7)\right]}-\frac{\color{red}{x^3+x^5+O(x^7)}}{6}+\frac{\color{green}{x^5+O(x^7)}}{120}+O(x^7)=\\
x+\left(\frac{x^3}{3}-\frac{x^3}{6}\right)+\left(\frac{2x^5}{15}-\frac{x^5}{6}+\frac{x^5}{120}\right)+O(x^7)=\\
x+\frac{x^3}{6}-\frac{x^5}{40}+O(x^7).$$
