How to integrate $\cos^3x$ by parts I've converted $\cos^3(x)$ into $\cos^2(x)\cos(x)$ but still have not gotten the answer. 
The answer is $\dfrac{\sin(x)(3\cos^2x + 2\sin^2x)}{3}$
My answer was the same except I did not have a $3$ infront of $x$ and my $2\sin^2x$ was not squared.
Help! 
 A: $$
\begin{align}
\int\cos^3{x}\,dx
&=\int\cos^2{x}\cdot\cos{x}\,dx\\
&=\int\cos^2{x}(\sin{x})'\,dx\\
&=\cos^2{x}\sin{x}+2\int\sin^2{x}\cos{x}\,dx\\
&=\cos^2{x}\sin{x}+2\int(1-\cos^2{x})\cos{x}\,dx\\
&=\cos^2{x}\sin{x}+2\int\cos{x}\,dx-2\int\cos^3{x}\,dx\\
&=\cos^2{x}\sin{x}+2\sin{x}-2\int\cos^3{x}\,dx
\end{align}
$$
$$
I=\int\cos^3{x}\,dx
$$
$$
I=\cos^2{x}\sin{x}+2\sin{x}-2I\implies\\
3I=\cos^2{x}\sin{x}+2\sin{x}\implies\\
I=\frac{\cos^2{x}\sin{x}+2\sin{x}}{3}+C.
$$
Check:
$$
\frac{d}{dx}\left[\frac{1}{3}(\cos^2{x}\sin{x}+2\sin{x})+C\right]=\\
\frac{1}{3}(2\cos{x}(-\sin{x})\sin{x}+\cos^2{x}\cos{x}+2\cos{x})=\\
\frac{1}{3}(-2\sin^2{x}\cos{x}+\cos^3{x}+2\cos{x})=\\
\frac{1}{3}(-2(1-\cos^2{x})\cos{x}+\cos^3{x}+2\cos{x})=\\
\frac{1}{3}((-2+2\cos^2{x})\cos{x}+\cos^3{x}+2\cos{x})=\\
\frac{1}{3}(-2\cos{x}+2\cos^3{x}+\cos^3{x}+2\cos{x})=\\
\frac{1}{3}(2\cos^3{x}+\cos^3{x})=\\
\frac{1}{3}(3\cos^3{x})=\\
\cos^3{x}.
$$
The answer you provided is equivalent to mine:
$$
\dfrac{\sin{x}(3\cos^2x + 2\sin^2x)}{3}=
\dfrac{\sin{x}(3\cos^2x + 2(1-\cos^2{x}))}{3}=\\
\dfrac{\sin{x}(3\cos^2x + 2-2\cos^2{x})}{3}=
\dfrac{\sin{x}(\cos^2x + 2)}{3}=\\
\dfrac{\cos^2x\sin{x} + 2\sin{x}}{3}.
$$
A: Since $\cos^3x=(1-\sin^2 x)\cos x$, you can do $\sin x=t$ and $\cos x\,\mathrm dx=\mathrm dt$, thereby getting$$\int1-t^2\,\mathrm dt.$$
A: If you wish to do this using by parts,
use $\cos^2x$ as the first function (to differentiate) and integrate $\cos x$ to get:
$$\int \cos^2 x \cos x dx = \cos^2 x \sin x + 2\int \sin^2 x \cos {x}dx$$
Now use $\sin x = t$ to get $dt = \cos x dx$ and
$$\int \cos^2 x \cos x dx = \cos^2 x \sin x + \frac{2\sin^3 x}{3} + C$$
A: Note that
$$
\int\cos^3x\, dx=\int\cos^2x\, d(\sin x)=\cos^2x\sin x+\int2\sin^2 x\cos x\, dx
$$
To compute the last integral make the substitution $u=\sin x$.
