Another method if you are interested is to first convert into half angles:
this simplifies to:
using conjugate properties this becomes:
dividing everything by sinx/2 and subbing in the double angles for cosx/2 gives:
which simplifies to:
note in the previous step i broke sin^2(x/2) + 4cos^2(x/2) into sin^2(x/2) + cos^2(x/2) + 3cos^2(x/2) so i could take one out