Solve the equation $\frac{\sqrt {3}}{2}\sin x-\cos x=\cos^2x$
My approach $\cos^2x=1-\sin^2x $
$\frac{\sqrt {3}}{2}\sin x-\cos^2x =\cos x$
$\frac{\sqrt {3}}{2}\sin x+\sin^2x -1=\cos x$
$\sqrt {3}\sin x+2\sin^2x-2=2\cos x$
Though the equation comes in form of $\sin x$ from here onward after squaring still not getting the answer.
Just to flesh out A. Pongrácz's answer, let $c=\cos x,\,s=\sin x$ so $\frac{s\sqrt{3}}{2}=c(1+c)$ and $3(1-c^2)=4c^2(1+c)^2$. After some rearrangment, $(c+1)(c-\frac{1}{2})(2c^2+3c+3)=0$, with the quadratic factor lacking real roots. We must be careful with the signs of $c,\,s$. One solution is $c=-1,\,s=0$; the other is $c=\frac{1}{2},\,s=\frac{\sqrt{3}}{2}$. In other words, the real $x$ allowed are $x=\pi(2k+1),\,x=\frac{\pi (1+6k)}{3}$ for $k\in\mathbb{Z}$.