<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] You can use this bit of trickery.
$\cos 3x = 4\cos^3 x - 3\cos x\\
\cos^3x = \frac 14 \cos 3x + \frac 34\cos x$
And that is easy to integrate.
But, to your actual question. $\int \sin^2x\cos x \ dx$
let $u = \sin x, du = \cos x$
$\int u^2 \ du$
</s>