<s>[INST] Probelm in solving $\sin\left(\frac{x}{2}\right) - \cos\left(\frac{3x}{2}\right) = 0$ While solving $\sin\left(\frac{x}{2}\right) - \cos\left(\frac{3x}{2}\right) = 0$, if I convert $\sin$ into $\cos$, I am getting answer (i.e. $\left(n + \frac{1}{4}\right)\pi$ and $\left(2n - \frac{1}{2}\right)\pi$. However, if I convert $\cos$ to $\sin$, I am not getting answer (i.e. $\left(\frac{1}{2} - n\right)\pi$ and $\left(\frac{n}{2} +\frac{1}4{}\right)\pi$). 
Where am I wrong? 
Is there any specific way to solve these equations?
 [/INST] Write $\sin \frac x2=-\cos(\frac\pi2+\frac x2)$ and factorize with $\cos a+\cos b =2\cos\frac{a+b}2 \cos\frac{a-b}2$,
$$\sin\frac x2 - \cos\frac{3x}2 
= -2\cos(x+\frac\pi4)\cos(\frac x2-\frac\pi4)=0$$
which leads to the solutions
$$x= \frac\pi4+n\pi,\> -\frac{\pi}2+2n\pi$$
</s>