`~rai~`
\(\cos x+\sqrt{3}\sin x=\dfrac{2}{\cos x+\sqrt{3}\sin x-1}\quad(1)\\\text{Đặt }t=\cos x+\sqrt{3}\sin x\quad(t\in[-2;2];t\ne 1)\\\text{Thay vào (1) được:}\\t=\dfrac{2}{t-1}\\\Leftrightarrow t(t-1)=2\\\Leftrightarrow t^2-t-2\quad(a-b+c=0)\\\Leftrightarrow \\\Leftrightarrow \left[\begin{array}{I}t=-1\\t=2\end{array}\right.\quad\text{(thỏa mãn)}\\\Leftrightarrow \left[\begin{array}{I}\cos x+\sqrt{3}\sin x=-1\\\cos x+\sqrt{3}\sin x=2\end{array}\right.\\\Leftrightarrow \left[\begin{array}{I}2\left(\dfrac{1}{2}\cos x+\dfrac{\sqrt{3}}{2}\sin x\right)=-1\\2\left(\dfrac{1}{2}\cos x+\dfrac{\sqrt{3}}{2}\sin x\right)=2\end{array}\right.\\\Leftrightarrow \left[\begin{array}{I}\sin\left(x+\dfrac{\pi}{6}\right)=-\dfrac{1}{2}\\\sin\left(x+\dfrac{\pi}{6}\right)=1\end{array}\right.\\\Leftrightarrow \left[\begin{array}{I}x+\dfrac{\pi}{6}=-\dfrac{\pi}{6}+k2\pi\\x+\dfrac{\pi}{6}=\pi+\dfrac{\pi}{6}+k2\pi\\x+\dfrac{\pi}{6}=\dfrac{\pi}{2}+k2\pi\end{array}\right.\\\Leftrightarrow \left[\begin{array}{I}x=-\dfrac{\pi}{3}+k2\pi\\x=\pi+k2\pi\\x=\dfrac{\pi}{3}+k2\pi.\end{array}\right.\quad(k\in\mathbb{Z})\)