=>(cosx+sinx)-2*sinx*cosx*(sinx+cosx)=0
=>\(\left(sinx+cosx\right)\left(2\cdot sinx\cdot cosx-1\right)=0\)
=>\(\sqrt{2}\cdot sin\left(x+\dfrac{pi}{4}\right)\cdot\left(sin2x-1\right)=0\)
=>\(\left[{}\begin{matrix}sin\left(x+\dfrac{pi}{4}\right)=0\\sin2x-1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x+\dfrac{pi}{4}=kpi\\sin2x=1\end{matrix}\right.\)
=>\(\left[{}\begin{matrix}x=kpi-\dfrac{pi}{4}\\2x=\dfrac{pi}{2}+k2pi\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=kpi-\dfrac{pi}{4}\\x=\dfrac{pi}{4}+kpi\end{matrix}\right.\)