\(\Leftrightarrow-cos2x+\sqrt{3}sin2x=\sqrt{3}-1\)
\(\Leftrightarrow\frac{\sqrt{3}}{2}sin2x-\frac{1}{2}cos2x=\frac{\sqrt{3}-1}{2}\)
\(\Leftrightarrow sin\left(2x-\frac{\pi}{6}\right)=\frac{\sqrt{3}-1}{2}\)
\(\Leftrightarrow\left[{}\begin{matrix}2x-\frac{\pi}{6}=arcsin\left(\frac{\sqrt{3}-1}{2}\right)+k2\pi\\2x-\frac{\pi}{6}=\pi-arcsin\left(\frac{\sqrt{3}-1}{2}\right)+k2\pi\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\frac{\pi}{12}+\frac{1}{2}arcsin\left(\frac{\sqrt{3}-1}{6}\right)+k\pi\\x=\frac{7\pi}{12}-\frac{1}{2}arcsin\left(\frac{\sqrt{3}-1}{6}\right)+k\pi\end{matrix}\right.\)