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

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.
