\(\left(cosx-sinx\right)\left(cos^2x+sin^2x+sinx.cosx\right)+1=0\)
\(\Leftrightarrow\left(cosx-sinx\right)\left(1+sinx.cosx\right)+1=0\)
Đặt \(cosx-sinx=a\) (\(\left|a\right|\le\sqrt{2}\))
\(\Rightarrow a^2=1-2sinx.cosx\Rightarrow sinx.cosx=\frac{1-a^2}{2}\)
\(\Rightarrow a\left(1+\frac{1-a^2}{2}\right)+1=0\)
\(\Leftrightarrow a\left(3-a^2\right)+2=0\)
\(\Leftrightarrow-a^3+3a+2=0\) \(\Rightarrow\left[{}\begin{matrix}a=2\left(l\right)\\a=-1\end{matrix}\right.\)
\(\Rightarrow cosx-sinx=-1\)
\(\Leftrightarrow\sqrt{2}sin\left(x-\frac{\pi}{4}\right)=1\)
\(\Rightarrow sin\left(x-\frac{\pi}{4}\right)=\frac{1}{\sqrt{2}}=sin\left(\frac{\pi}{4}\right)\)