# 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.

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}$.
• @SamarImamZaidi Solve on $[0,\,2\pi]$ first. – J.G. Aug 19 '18 at 14:34
A straightforward approach is indeed to square the equation: $$\frac{\sqrt{3}}{2}\sin x = \cos^2 x +\cos x$$
and replace $\sin^2 x$ by $1-\cos^2 x$. You obtain a quartic equation in $\cos x$. Maybe not the most elegant solution, but you cannot go wrong with it. Also, one root is clear without calculation: $\cos x = 1/2$ is fine. So you can surely reduce to a cubic equation. (And possibly even further to a quadratic one.)
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$$