Prove that $\tan(\sin(x))=x-\frac{x^{3}}{6}+o(x^{3})$ 
Prove that $\tan(\sin(x))=x-\frac{x^{3}}{6}+o(x^{3})$

I know that when I calculate derivative then I get true answer. However I want to know why the way that I will present soon does not work. My try:$$\tan(x)=x+r_{1}(x), \quad  r_{1}(x)=o(x)$$ $$\tan(\sin(x))=\sin(x)+r_{1}(\sin x),\quad r_{1}(\sin x)=o(\sin x)$$ $$\tan(\sin(x))=x-\frac{x^{3}}{6}+r_{2}(x)+r_{1}(x-\frac{x^{3}}{6}+r_{2}(x)),\quad r_{2}(x)=o(x^{3})$$ In this moment I should find: $$o(?)=r_{1}(x-\frac{x^{3}}{6}+r_{2}(x))$$I suspect that $o(?)=o(x^{3})$ so I write: $$\frac{r_{1}(x-\frac{x^{3}}{6}+r_{2}(x))}{(x-\frac{x^{3}}{6}+r_{2}(x))}\cdot \frac{(x-\frac{x^{3}}{6}+r_{2}(x))}{x^{3}}$$ But in this moment I have $0 \cdot (+\infty)$. Moreover I see that $$r_{1}(x-\frac{x^{3}}{6}+r_{2}(x))=o(x)$$ because $$\frac{r_{1}(x-\frac{x^{3}}{6}+r_{2}(x))}{(x-\frac{x^{3}}{6}+r_{2}(x))}\cdot \frac{(x-\frac{x^{3}}{6}+r_{2}(x))}{x} \rightarrow 0$$Can someone tell me where I'm making a mistake, that I'm getting $ o (x) $ instead of $ o (x ^ {3}) $?
 A: I think you are getting confused by your way of doing the algebra (and the fact that your desired statement is not correct). The easy way to do it is like this:
$$\tan(\sin(x))=\sin(x)+\sin(x)^3/3+o(\sin(x)^3) \\
= (x-x^3/6+o(x^3))+(x-x^3/6+o(x^3))^3/3+o(x^3) \\
= x+x^3/6 + o(x^3).$$
Basically, the first step approximates $\tan(y)$ by $y+y^3/3$ then the second step approximates $\sin(x)$ by $x-x^3/6$, then you substitute, combine, and drop higher order terms. (More generally, composition of power series can be done using the Cauchy product, which works even when the series are merely asymptotic rather than convergent.)
The basic problem in your approach is that you need to begin with a better approximation of $\tan$ and $\sin$ than you began with in order to obtain a result of the desired level of asymptotic accuracy.
A: The problem statement contains a sign error.
In any case you want to compute $\tan \sin x$ modulo $o(x^3)$, so you should compute $\sin x$ and $\tan x$ modulo $o(x^3)$, not $o(x)$. Indeed,
$$\sin x = x - \frac{1}{6} x^3 + o(x^3), \qquad \tan y = y + \frac{1}{3} y^3 + o(y^3) ,$$
so substituting gives $$\color{#df0000}{\boxed{\tan \sin x = \left(x - \frac{1}{6} x^3\right) + \frac{1}{3} \left(x - \frac{1}{6} x^3\right)^3 + o(x^3) = x + \frac{1}{6} x^3 + o(x^3)}} .$$
A: Your algebraic manipulation is correct, but your desired result is wrong (as mentioned in another answer). The problem with your approach is that although it is correct it does not lead you to anything useful. The equation $$\tan(\sin x) =x-\frac{x^3}{6}+o(x^3)+o(\sin x) \tag{1}$$ although correct is much less useful compared to the equation $$\tan(\sin x) =x+\frac{x^3}{6}+o(x^3)\tag{2}$$ precisely because equation $(1)$ contains two errors terms of different orders. The typical mechanism in these scenarios is use to expansions upto desired order and then perform algebraic manipulation.
So here it goes
\begin{align*}
\tan\sin x &= \sin x+\frac{\sin^3x}{3}+o(\sin^3x)\\
&=x-\frac{x^3}{6}+o(x^3)+\frac{\sin^3x}{3}+o(x^3)\tag{3}\\
&=x-\frac{x^3}{6}+\frac{1}{3}\left(x-\frac{x^3}{6} +o(x^3)\right)^3+o(x^3)\\
&=x+\frac{x^3}{6}+o(x^3)
\end{align*}
You should observe the equality $o(x^3)=o(\sin^3x)$ used in $(3)$ which comes as a result of $\sin x=x+o(x) $.
