\(\Leftrightarrow\left(1+2sinx.cosx\right)-2\left(sinx+cosx\right)+2=-m\)
\(\Leftrightarrow\left(sinx+cosx\right)^2-2\left(sinx+cosx\right)+2=-m\)
Đặt \(sinx+cosx=\sqrt{2}sin\left(x+\frac{\pi}{4}\right)=t\Rightarrow-\sqrt{2}\le t\le\sqrt{2}\)
\(\Rightarrow t^2-2t+2=-m\)
Xét \(f\left(t\right)=t^2-2t+2\) trên \(\left[-\sqrt{2};\sqrt{2}\right]\)
\(-\frac{b}{2a}=1\) ; \(f\left(1\right)=1\) ; \(f\left(-\sqrt{2}\right)=4+2\sqrt{2}\) ; \(f\left(\sqrt{2}\right)=4-2\sqrt{2}>1\)
\(\Rightarrow1\le f\left(t\right)\le4+2\sqrt{2}\)
\(\Rightarrow\) Pt có nghiệm khi và chỉ khi \(1\le-m\le4+2\sqrt{2}\)
\(\Rightarrow-4-2\sqrt{2}\le m\le-1\)