\(\Leftrightarrow cosx\left(cosx-\sqrt{3}sinx\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}cosx=0\\tanx=\frac{1}{\sqrt{3}}\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\frac{\pi}{2}+k\pi\\x=\frac{\pi}{3}+k\pi\end{matrix}\right.\)