\(\Leftrightarrow\sqrt{3}\left(sin^2x+cos^2x-sin2x\right)+2cos^2x-1-\sqrt{3}=0\)
\(\Leftrightarrow\sqrt{3}-\sqrt{3}sin2x+cos2x-\sqrt{3}=0\)
\(\Leftrightarrow\frac{\sqrt{3}}{2}sin2x-\frac{1}{2}cos2x=0\)
\(\Leftrightarrow sin\left(2x-\frac{\pi}{6}\right)=0\)
\(\Leftrightarrow2x-\frac{\pi}{6}=k\pi\)
\(\Rightarrow x=\frac{\pi}{12}+\frac{k\pi}{2}\)