<s>[INST] Solve the equation $\frac{\sqrt {3}}{2}\sin(x) -\cos x=\cos^2x$ 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.
 [/INST] Hint; Use the so-called Weierstrass Substitution:
$$\sin(x)=\frac{2t}{1+t^2}$$
$$\cos(x)=\frac{1-t^2}{1+t^2}$$
$$\tan(\frac{x}{2})=t$$
and you don't need square the equation.
You will get the equation
$$-\sqrt {3} \left( \sqrt {3}t+{t}^{2}+2 \right)  \left( -3\,t+\sqrt {3}
 \right) 
=0$$
</s>