<s>[INST] Integrating $\cos^3(x)$ My attempt at integrating $\cos^3(x)$:
$$\begin{align}\;\int \cos^3x\mathrm{d}x &= \int \cos^2x  \cos x \mathrm{d}x
\\&= \int(1 - \sin^2 x) \cos x \mathrm{d}x
\\&= \int \cos x dx - \int \sin^2x \cos x \mathrm{d}x 
\\&= \sin x - \frac {1}{3}\sin^3x + C\end{align}$$
My question is how does integrating $\sin^2(x) \cos x $ become $\frac {1}{3}\sin^3(x) + C$? What mathematical process is being done? Why does the $\cos x$ disappear?
 [/INST] If by $\sin(x)^2$ you mean $(\sin(x))^2$, we could follow
$$\cos(2x)=\cos(x)^2-\sin(x)^2=1-2\sin(x)^2$$
to have
$$\int \sin(x)^2 = \int \frac{1}{2} - \frac{1}{2}\cos(2x) = \frac{1}{2}x-\frac{1}{4}\sin(2x)$$
Then go ahead and use integration by parts we done.
</s>