<s>[INST] General solution of $\sin 2x+\cos x=0$ 
Solve the trigonometric equation $\sin 2x+\cos x=0$

My Attempt
$$
2\sin x\cos x+\cos x=0\implies\cos x=0 \text{ or }\sin x=\frac{-1}{2}=\sin\frac{-\pi}{6}\\
x=(2n+1)\frac{\pi}{2} \text{ or }x=n\pi+(-1)^n\frac{-\pi}{6}\\
x=n\pi+\frac{\pi}{2} \text{ or }x=2n\pi-\frac{\pi}{6}\text{ or }x=2n\pi+\pi+\frac{\pi}{6}
$$
Reference
$$
\cos x=-\sin 2x=\cos\Big(\frac{\pi}{2}+2x\Big)\implies x=2n\pi\pm\Big(\frac{\pi}{2}+2x\Big)\\
-x=2n\pi+\frac{\pi}{2}\text{ or }3x=2n\pi-\frac{\pi}{2}\implies x=2m\pi-\frac{\pi}{2}\text{ or }x=\frac{2m\pi}{3}-\frac{\pi}{6}
$$
But my reference gives the solution $x=2n\pi-\dfrac{\pi}{2}$ or $x=\dfrac{2n\pi}{3}-\dfrac{\pi}{6}$. I understand how it is reached and both represent the same solutions. But, how do I derive the solution in my reference from what I found in my attempt ? i.e.,

How to derive
  $$
\bigg[x=n\pi+\frac{\pi}{2} \text{ or }x=2n\pi-\frac{\pi}{6}\text{ or }x=2n\pi+\pi+\frac{\pi}{6}\bigg]\\
\implies \bigg[x=2n\pi-\dfrac{\pi}{2}\text{ or }x=\dfrac{2n\pi}{3}-\dfrac{\pi}{6}\bigg]
$$

 [/INST] $$\sin(2x)+\cos(x)=0$$
$$2\sin(x)\cos(x)+\cos(x)=0$$
$$\cos(x)\left(2\sin(x)+1\right)=0$$
so you have two sets of solutions:
$$\cos(x)=0,\,\sin(x)=-\frac{1}{2}$$
EDIT:
firstly they have:
$$x=2n\pi-\pi/2=\pi(2n-1/2)$$
and you have:
$$x=(2n+1)\pi/2$$
let:
$$\pi/2(4n-1)=\pi/2(2m+1)$$
so:
$$4n-1=2m+1$$
$$m=(4n-2)/2=2n-1$$
so for all integer values of $n$, $m$ is also an integer and so they are equivalent?
</s>