I thought this one up, but I am not sure how to solve it. Here is my attempt: $$\sin x-\sqrt{3}\ \cos x=1$$ $$(\sin x-\sqrt{3}\ \cos x)^2=1$$ $$\sin^2x-2\sqrt{3}\sin x\cos x\ +3\cos^2x=1$$ $$1-2\sqrt{3}\sin x\cos x\ +2\cos^2x=1$$ $$2\cos^2x-2\sqrt{3}\sin x\cos x=0$$ $$2\cos x(\cos x-\sqrt{3}\sin x)=0$$ $2\cos x=0\Rightarrow x\in \{\frac{\pi }2(2n-1):n\in\Bbb Z\}$
But how do I solve $$\cos x-\sqrt{3}\sin x=0$$

Hint: at the very beginning divide both sides by $2$ and use the formula for the sin of difference of 2 arguments