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?
 A: If $$\cos x=\cos A\ \ \ \ (1)$$
$x=2m\pi\pm A$
$$(1)\iff\sin(\pi/2-x)=\sin(\pi/2-A)$$
Either
$$\pi/2-x=2n\pi+(\pi/2-A)\iff x=A-2n\pi\implies n=-m$$
Or
$$\pi/2-x=2m\pi+\pi-(\pi/2-A)\iff x=-2n\pi-A$$
A: Use the angle sum formulas
$$
\sin(a\pm b)= \sin(a)\cos(b)\pm \cos(a)\sin(b)\hspace{4pc} \cos(a+b)=\cos(a)\cos(b)\mp \sin(a)\sin(b).
$$
We will apply this to both by taking $\sin(x/2)=\sin\left (x-\frac{x}{2}\right)$ and $\cos(3x/2)=\cos\left (x+\frac{x}{2}\right )$.
\begin{eqnarray}
\sin(x/2)-\cos(3x/2)&=& \sin(x)\cos(x/2)-\cos(x)\sin(x/2)-\cos(x)\cos(x/2)+\sin(x)\sin(x/2)\\
&=& \sin(x)[\cos(x/2)+ \sin(x/2)] -\cos(x)[\cos(x/2)+\sin(x/2)]\\
&=& [\sin(x)-\cos(x)][\cos(x/2)+\sin(x/2)].
\end{eqnarray}
Setting this equal to zero now you should be able to find a solution set quite easily.  From here you can find that this breaks up into two equations: $\tan(x)=1$ and $\tan(x/2)=-1$ which gives us solutions of the form $\frac{\pi}{4}+\pi k$ and $\frac{3\pi}{2}+2\pi k$ respectively.  You can arrange the last of these expressions to be $-\frac{\pi}{2}+2\pi k$
A: Cosine to sine:
$$\sin(x/2)-\cos(3x/2)=0 \\
\sin(x/2) - \sin(\pi/2-3x/2)=0 \\
\sin(x/2)=\sin(\pi/2-3x/2).$$
Now you have a tricky issue: two sines can be equal when their arguments are equal up to a shift by a multiple of $2\pi$, or when the argument of one is $\pi$ minus the argument of the other up to a shift by a multiple of $2\pi$. In the first case:
$$x/2=\pi/2-3x/2 + 2n\pi \\
x=\pi/4+n\pi.$$
In the second case:
$$x/2=\pi-(\pi/2-3x/2)+2n\pi \\
x/2=\pi/2+3x/2+2n\pi \\
x=-\pi/2+2n\pi$$
where I've changed what $n$ is between the second and last line since it is still an arbitrary integer.
So both sets of solutions wind up being valid. Similar reasoning applies if you convert the sine to a cosine, in that case there is another "branch" where the argument of one is the negative of the argument of the other up to a shift by a multiple of $2\pi$. In general you can only conclude that $x=y+2n\pi$ if $\sin(x)=\sin(y)$ and also $\cos(x)=\cos(y)$.
A: 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$$
