<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 you let $u = \sin x$, then $du = \cos x \ dx,$ and 
$\int \sin^2x \cos x \ dx $ becomes $$\int u^2 du  = \frac{1}{3} u^3 + C.$$
Then you substitute $u=\sin x$ back in.
</s>