# Taylor expansion of $\sin(x-x^2)$

I am solving a problem that involves expanding $\sin(x-x^2)$.

Since $$\sin(x)=x-x^3/6+x^5/120-...$$ i try to substitute $x$ to $x-x^2$ to arrive at expansion of $x-x^2-x^3/6+x^4/2-x^5/2+x^6/6+...$

Now that would be good enough, but if I look up at this expansion on WolframAlpha I see that it is supposed to look like $x-x^2-x^3/6+x^4/2-59x^5/120+x^6/8$

So does that mean that I cannot make that substitution? Where is the mistake?

-
You made some mistake in the expansion of sin. – Ron Gordon Jan 10 '13 at 14:51

It works out OK, you obviously just had a mistake in your substitution: $$\sin(x-x^2) \sim (x-x^2) -\frac{1}{6} \left(x-x^2\right)^3 + \frac{1}{120} \left(x-x^2\right)^5 =$$ $$x - x^2 -\frac{x^3}{6} +\frac{x^4}{2} -\frac{59 x^5}{120} +\frac{x^6}{8}...$$

-
Thanks! Missed the obvious ... – Sarunas Jan 10 '13 at 15:13

$$\sin(x-x^2)=\sum_{k=0}^\infty\frac{(-1)^n}{(2n+1)!}(x-x^2)^{2n+1}=\sum_{k=0}^\infty\frac{(-1)^n}{(2n+1)!}x^{2n+1}(1-x)^{2n+1}=$$

$$=x-x^2-\frac{(x-x^2)^3}{6}+\frac{(x-x^2)^5}{120}-\ldots=x-x^2-\frac{x^3-3x^4+3x^5-x^6}{6}+\ldots=$$

$$x-x^2-\frac{1}{6}x^3+\frac{1}{2}x^4+\ldots$$

-

$\sin (a-b) = \sin a \; \cos b - \cos a \; \sin b$ , expand each term as usual and collect the coefficients of $x$ have same power. I guess this is more complicated than substituting $x-x^2$ for $u$ in expansion of $\sin u$. Just another method.

-