Help with $\int \cos^6{(x)} \,dx$ Problem:
\begin{eqnarray*}
\int \cos^6{(x)} dx \\
\end{eqnarray*}
Answer:
\begin{eqnarray*}
\int \cos^4{(x)} \,\, dx &=& \int { \cos^2{(x)}(\cos^2{(x)})  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=& \int { \frac{(1+\cos(2x))^2}{4}  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=&
    \int { \frac{\cos^2(2x)^2 + 2\cos(2x)+1}{4}  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=&
    \int { \frac{(\frac{1+\cos(4x)}{2} + 2\cos(2x)+1}{4}  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=&
    \int { \frac{1+\cos(4x) + 4\cos(2x)+2}{8}  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=&
    \int { \frac{\cos(4x) + 4\cos(2x)+3}{8}  } \,\, dx \\
\int \cos^4{(x)} \,\, dx &=& \frac{\sin(4x)+ 8 \sin(2x)+12x}{32} \\
\text{Let }I_6 &=& \int \cos^6{(x)} \,\, dx \\
\end{eqnarray*}
To perform this integration, I use integration by parts with
$u = \cos^5(x)$ and $dv = \cos(x) dx$.
\begin{eqnarray*}
I_6 &=& \sin(x)\cos^5(x) - \int \sin(x) 5\cos^4(x)(-\sin(x)) \,\, dx \\
I_6 &=& \sin(x)\cos^5(x) + \int 5\cos^4(x)(\sin(x))^2 \,\, dx \\
I_6 &=& \sin(x)\cos^5(x) + \int 5\cos^4(x)(1 - \cos(x))^2 \,\, dx \\
I_6 &=& \sin(x)\cos^5(x) + \int 5\cos^4(x) \,\, dx  - 5I_6 \\
6I_6 &=& \sin(x)\cos^5(x) + \int 5\cos^4(x) \,\, dx \\
6I_6 &=& \sin(x)\cos^5(x) + \frac{5\sin(4x)+ 40 \sin(2x)+60x}{32}  + C_1 \\
6I_6 &=& \frac{32\sin(x)\cos^5(x) + 5\sin(4x)+ 40 \sin(2x)+60x}{32} + C_1 \\
I_6 &=& \frac{32\sin(x)\cos^5(x) + 5\sin(4x)+ 40 \sin(2x)+60x}{192} + C  \\
\end{eqnarray*}
I believe that the above result is wrong. Using an online integral
calculator, I get:
\begin{eqnarray*}
I_6 &=& \frac{\sin(6x) + 9\sin(4x) + 45 \sin(2x) + 60x}{192} + C \\
\end{eqnarray*}
I am hoping that somebody can tell me where I went wrong.
Bob
 A: You could also employ the binomial theorem
\begin{align}
\cos^6x&=\frac1{64}(e^{ix}+e^{-ix})^6\\
&=\frac1{64}(e^{i6x}+6e^{i4x}+15e^{i2x}+20+15e^{-i2x}+6e^{-i4x}+e^{-i6x})
\\
&=\frac1{32}(\cos(6x)+6\cos(4x)+15\cos(2x)+10).
\end{align}
Which now is easy to integrate.
A: In your solution, when substituting the already known expression for $I_4$ (in the third line from the bottom), you forgot to multiply it by $5$. That's the only error there. Put it back in there, and you'll have a correct answer. Your answer would still look different from the output of that online integrator, but the two are in fact equivalent via trigonometric identities.
On a side note, this integral can also be found without integration by parts, but by using the same approach that worked for $I_4$ if you write $\cos^6(x)=(\cos^2(x))^3$.
A: If you're going to use lots of trig identities and repeatedly apply integration by parts, we could've more quickly undone the entire problem by using Chebyshev polynomials of the first kind, reducing it down to some basic integral.  This method took me about 5 steps to do (minus simplifying):
$$\int32\cos^6(x)dx=\int\cos(6x)+6\cos(4x)+15\cos(2x)-10dx$$
Since,
$\phantom{10}\cos(6x)=32\cos^6(x)-48\cos^4(x)+18\cos^2(x)-1\\\phantom06\cos(4x)=\phantom{32\cos^6(x)}+48\cos^4(x)-48\cos^2(x)+6\\15\cos(2x)=\phantom{32\cos^6(x)-48\cos^4(x)}+30\cos^2(x)-15\\10\cos(0x)=\phantom{32\cos^6(x)-48\cos^4(x)+18\cos^2(x)}+10$
Indeed, the Chebyshev polynomials are the expansions of $\cos(nx)$ in powers of $\cos(x)$.  Very useful for these types of problems.  The following is the recursive formula for the Chebyshev polynomial:
$$\begin{align}T_0(x)&=1\quad&\cos(0x)&=1\\T_1(x)&=1\quad&\cos(1x)&=\cos(x)\\T_{n+1}(x)&=2xT_n(x)-T_{n-1}(x)\quad&\cos((n+1)x)&=2\cos(x)\cos(nx)-\cos((n-1)x)\end{align}$$
Which quickly allows for the calculation of $\cos(nx)$.  For this problem, we need $\cos(6x)$ and all even below.

Indeed, this is why most teachers stress that algebraic (or trigonometric) simplification should be taken before applying integration techniques.  Something like reduction formulas should be a last resort.
