Well new subject in my Calculus 2 class, and I do not understand why I was wrong on my homework. First I'll show you my work and then I'll show the correct answer from wolfram which uses a formula (reduction Formula) I have yet to learn. I only used wolfram to check the answer.

The Start,

$\displaystyle \int sin^5(x)cos^8(x)dx$

Break them up:

$\displaystyle \int sin^4(x)cos^8(x)sin(x)dx$

Break sin up even further so I can use Trig Identities:

$\displaystyle \int (sin^2(x))^2cos^8(x)sin(x)dx$

Replace sin squared with a trig identity:

$\displaystyle \int (1-cos^2(x))^2cos^8(x)sin(x)dx$

Substitution:

$\displaystyle u=cos(x)$

$\displaystyle du=-sin(x)dx$

Replace cos(x) with u:

$\displaystyle -\int (1-u^2)^2u^8(x)du$

FOIL:

$\displaystyle u^8(1-u^2)(1-u^2)$

$\displaystyle (1-u^2-u^2+u^4)$

$\displaystyle u^8(1-2u^2+u^4)$

$\displaystyle (u^8-2u^{10}+u^{12})$

Enter in Newly FOIL'ed equation:

$\displaystyle -\int (u^8-2u^{10}+u^{12})du$

Integrate:

$\displaystyle -(\frac{{u}^{9}}{9}-2\frac{{u}^{11}}{11}+\frac{{u}^{13}}{13})+C$

Revert 'u' back to cos(x):

$\displaystyle (-\frac{1}{9}cos^{9}(x)+\frac{2}{11}cos^{11}(x)-\frac{1}{13}cos^{13}(x))+C$

Now in Short from Wolfram Alpha (the correct answer):

$\displaystyle \frac{-(cos^9(x) (-540 cos(2 x)+99 cos(4 x)+505))}{10296} +constant$

Where did I go wrong? How do I do this integral without referring to reduction formula?