\(\Leftrightarrow2cos^2x-1+cosx-\frac{\sqrt{2}}{2}=0\)
\(\Leftrightarrow2cos^2x+cosx-1-\frac{\sqrt{2}}{2}=0\)
\(\Rightarrow\left[{}\begin{matrix}cosx=\frac{\sqrt{2}}{2}\\cosx=-\frac{1+\sqrt{2}}{2}\left(l\right)\end{matrix}\right.\)
\(\Rightarrow x=\pm\frac{\pi}{4}+k2\pi\)