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?

Notice that applying the chain rule to $\frac{1}{3}\sin^3(x)$ yields $\sin^2(x)\cos(x)$. Indeed you have $\int\sin^2(x)\cos(x)\,dx=\int\sin^2(x)\,d(\sin(x))=\frac{1}{3}\sin^3(x)+c$
