Từ giả thiết : \(a+b=-1\) và \(a^2+b^2=5\)
\(\Rightarrow\left(a+b\right)^2=1\) \(\Rightarrow a^2+2ab+b^2=1\)
\(\Rightarrow5+2ab=1\)
\(\Rightarrow2ab=-4\)
\(\Rightarrow ab=-2\)
Từ gt \(\Rightarrow\)\(\left(a+b\right).\left(a^2+b^2\right)=-5\)
\(\Rightarrow a^3+ab^2+a^2b+b^3=-5\)
\(\Rightarrow\left(a^3+b^3\right)+ab.\left(a+b\right)=-5\)
\(\Rightarrow M+\left(-2\right).\left(-1\right)=-5\)
\(\Rightarrow M+2=-5\)
\(\Rightarrow M=-7\)