\(2cos^2x-1+cosx-1=0\)
\(\Leftrightarrow cosx\left(2cosx+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}cosx=0\\cosx=-\frac{1}{2}\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=\frac{\pi}{2}+k\pi\\x=\pm\frac{2\pi}{3}+k2\pi\end{matrix}\right.\)