<s>[INST] Integrate $\int\sin^2x\cos4x\,dx$ I'm having a difficult time solving this integral. 
I tried integrating by parts:
$\int\sin^2x\cos4x\,dx$
$u=\sin^2x$, $dv=\cos4x\,dx$
I used the power reducing formula to evaluate $\sin^2x$
$du = 2\sin x\cos x\,dx$, $v=1/4\sin4x$
$uv - \int\ v\,du$
$\dfrac{1}{4}\sin^2x\sin4x - \dfrac{1}{2}\int\sin x\cos x\sin4x\,dx$
After this step, I tried evaluating the integral by using the $\sin a\sin b$ property.
$\dfrac{1}{4}\sin^2x\sin4x + \dfrac{1}{4}\int\cos x(\cos5x-\cos3x)\,dx$
 [/INST] Integrals of this sort can be done using some useful identities that are immediate corollaries of the angle-sum formulas  $\cos A \cos B-\sin A \sin B=\cos (A+B)$   and $\sin A \cos B+\cos A \sin B=\sin (A+B),$ in conjunction with $\sin (-A)=-\sin A$ and $\cos (-A)=\cos A.$
We have $\cos (A+B)=\cos A \cos B -\sin A \sin B\;, $ and $\; \cos (A-B)=\cos A \cos B+\sin A \sin B.$ Adding these , we have $$\cos (A+B)+\cos (A-B)=2\cos A \cos B.$$ Subtracting them , we have $$\cos (A+B)-\cos (A-B)=-\sin A \sin B.$$ Similarly from the formulas for $\sin (A\pm B)$ we have $$\sin (A+B)+\sin (A-B)=2\sin A \cos B$$ and $$\sin (A+B)-\sin (A-B)=2\cos A \sin B.$$  From the angle-sum formulas, with $A=B$  and from $\cos^2A+\sin^2A=1,$ we have $$\sin^2 A=(1-\cos 2A)/2$$ and $$\cos^2 A=(1+\cos 2A)/2.$$ In particular $\sin^2 A \cos 4A=\frac {1}{2}(1-\cos 2A)\cos 4A=\frac {1}{2}(\cos 4A-\cos 2A\cos 4A)=\frac {1}{2}(\cos 4A-\frac {1}{2}(\cos 6A +\cos 2A)).$
For a lot more of this, see Trigonometry,  by Hobson. (Dover Press re-print.)
</s>