\(M=a^3+b^3+3ab\left(a^2+b^2\right)+6a^2b^2\left(a+b\right)\)
\(=\left(a+b\right)^3-3ab\left(a+b\right)+3ab\left(a^2+b^2+2ab\right)\)
\(=1-3ab+3ab\left(a+b\right)^2\)
= 1
\(M=a^3+b^2+3ab\left(a^2+b^2\right)+6a^2b^2\left(a+b\right)\)
\(M=\left(a+b\right)^3-3ab\left(a+b\right)+3ab\left(\left(a+b\right)^2-2ab\right)+6a^2b^2\left(a+b\right)\)
\(M=1^3-3ab.1+3ab\left(1^2-2ab\right)+6a^2b^2.1\)
\(M=1-3ab+3ab-6a^2b^2+6a^2b^2=1\)
vậy \(M=1\) khi \(a+b=1\)