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]
$$
There are two ways to solve the equation.

Your method: $2\sin x\cos x+\cos x=0$, so $\cos x(2\sin x+1)=0$. Thus we have either $\cos x=0$ or $\sin x=-1/2$. Thus 
\begin{align}
x&amp;=\frac{\pi}{2}+2n\pi &amp;\text{or}&amp;&amp;  x&amp;=-\frac{\pi}{2}+2n\pi &amp;&amp; \text{(from $\cos x=0$)} \\[4px]
x&amp;=-\frac{\pi}{6}+2n\pi  &amp;\text{or}&amp;&amp; x&amp;=\frac{7\pi}{6}+2n\pi &amp;&amp; \text{(from $\sin x=-1/2$)}
\end{align}
(you grouped together the families of solutions of $\cos x$ and of $\sin x=-1/2$, but I prefer to keep them separated). Good job.

Alternative method: $\cos x=-\sin2x=\cos(\frac{\pi}{2}+2x)$. Therefore either
$$
x=\frac{\pi}{2}+2x+2n\pi \to x=-\frac{\pi}{2}-2n\pi
$$
or
$$
x=-\frac{\pi}{2}-2x+2n\pi \to 3x=-\frac{\pi}{2}+2n\pi \to x=\frac{2n\pi}{3}-\frac{\pi}{6}
$$

How do you recover the previous sets of solutions?

One set is already present. For the other three, consider the cases when $n=3k$, $n=3k+1$ or $n=3k+2$, with integer $k$. Then
\begin{align}
n&amp;=3k &amp; x&amp;=\frac{6k\pi}{3}-\frac{\pi}{6}=2k\pi-\frac{\pi}{6} \\[4px]
n&amp;=3k+1 &amp; x&amp;=\frac{(6k+2)\pi}{3}-\frac{\pi}{6}=2k\pi+\frac{2\pi}{3}-\frac{\pi}{6}=2k\pi+\frac{\pi}{2}\\[4px]
n&amp;=3k+2 &amp; x&amp;=\frac{(6k+4)\pi}{3}-\frac{\pi}{6}=2k\pi+\frac{4\pi}{3}-\frac{\pi}{6}=2k\pi+\frac{7\pi}{6}
\end{align}
$$\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?