<s>[INST] Help figuring out all the alternative solutions to the integrals of sine and cosine I always worry a lot when doing integrals with trigonometric functions because there's always many ways to write the final answer.  I am trying to figure out the general pattern for the various different solutions.
The integral
$$ \int \sin^3\left(x\right)\cos^2\left(x\right)\, \mathrm{d}x $$
My answer (which never seems to be the same with wolfram alpha's):
$$\frac{\cos^5\left(x\right)}{5} + \frac{-\cos^3\left(x\right)}{3} + C$$
wolfram alpha lists many more:
$$\cos^3\left(x\right)\left(\frac{1}{10}\cos\left(2x\right)-\frac{7}{30}\right) + C$$
$$\frac{1}{240}\left(-30\cos\left(x\right) - 5\cos\left(3x\right)+3\cos\left(5x\right)\right)+C$$
$$\frac{\cos^5\left(x\right)}{80} -\frac{\cos^3\left(x\right)}{48}-\frac{\cos\left(x\right)}{8}-\frac{1}{8}\sin^2\left(x\right)\cos^3\left(x\right) + \frac{1}{16}\sin^4\left(x\right)\cos\left(x\right)+\frac{1}{16}\sin^2\left(x\right)\cos\left(x\right) + C$$ 
Could anyone help me understand what integration procedure would result in those answers?
 [/INST] Putting $\cos x=z,dz=-\sin xdx$
$$ \int \sin^3\left(x\right)\cos^2\left(x\right)\, \mathrm{d}x=\int (1-z^2)z^2(-dz)=\int z^4 dz-\int z^2 dz=\frac{z^5}5-\frac{z^3}3+c=\frac{\cos^5x}5-\frac{\cos^3x}3+C $$
(i)
$$\frac{\cos^5x}5-\frac{\cos^3x}3=\frac{\cos^3x}{15}(3\cos^2x-5)=\frac{\cos^3x}{30}(6\cos^2x-10)=\frac{\cos^3x}{30}\{3(1+\cos2x)-10\}$$ as $\cos2x=2\cos^2x-1$
$$\implies \frac{\cos^5x}5-\frac{\cos^3x}3=\frac{\cos^3x(3\cos2x-7)}{30}$$  
(ii)
Using the Euler's Identity $e^{iy}=\cos y+i\sin y\implies e^{-iy}=\cos (-y)+i\sin(-y)=\cos y-i\sin y\implies 2\cos y=e^{iy}+e^{-iy} $, 
$(2\cos x)^5=(e^{ix}+e^{-ix})^5=(e^{5ix}+e^{-i5x})+\binom5 1(e^{3ix}+e^{-i3x})+\binom5 2(e^{ix}+e^{-ix})=2\cos5x+10\cos 3x+20\cos x$
Similarly, $(2\cos x)^3=(e^{ix}+e^{-ix})^3=e^{3ix}+e^{-3ix}+3(e^{ix}+e^{-ix})=2(\cos 3x+3\cos x)$
Put the values of $\cos5x,\cos 3x$ is the integration result to get $$\int \sin^3\left(x\right)\cos^2\left(x\right)\, \mathrm{d}x=\frac{\cos5x}{80}-\frac{\cos3x}{48}-\frac{\cos x}8+ c$$  which is the last alternative form of wolfram alpha
(iii) As $\sin3x=3\sin x-4\sin^3x,\cos2x=2\cos^2x-1,$ $$\sin^3x\cos^2x=\frac{(3\sin x-\sin3x)(1+\cos2x)}8=\frac{3\sin x-\sin3x+3\sin x\cos2x-\sin3x\cos2x}8$$
Applying $2\sin A\cos B=\sin(A+B)+\sin(A-B),$
$$\sin^3x\cos^2x=\frac{6\sin x-2\sin3x+3(\sin 3x-\sin x)-(\sin5x+\sin x)}{16}=\frac{\sin3x}{16}-\frac{\sin5x}{16}+\frac{\sin x}8$$
Now we can use $$\int\sin mx dx=-\frac{\cos mx}m+C$$
</s>