\(\cos2x-\sin x+\cos x=0\Leftrightarrow\cos^2x-\sin^2x+\left(\cos x-\sin x\right)=0\)
\(\Leftrightarrow\left(\cos x-\sin x\right)\left(\cos x+\sin x+1\right)=0\)
\(\Leftrightarrow\begin{cases}\cos x-\sin x=0\\\cos x+\sin x+1=0\end{cases}\) \(\Leftrightarrow\begin{cases}\sqrt{2}\cos\left(x+\frac{\pi}{4}\right)=0\\\sqrt{2}\cos\left(x-\frac{\pi}{4}\right)=-1\end{cases}\)
\(\Leftrightarrow\begin{cases}x+\frac{\pi}{4}=\frac{\pi}{2}+k\pi\\x-\frac{\pi}{4}=\frac{3\pi}{4}+k2\pi\\x-\frac{\pi}{4}=-\frac{3\pi}{4}+k2\pi\end{cases}\) \(\Leftrightarrow\begin{cases}x=\frac{\pi}{4}+k\pi\\x=\pi+k2\pi\\x=-\frac{\pi}{2}+k2\pi\end{cases}\)