Ta có: \(M=-x^2-2x+5\)
\(=-\left(x^2+2x-5\right)\)
\(=-\left(x^2+2x+1\right)+6\)
\(=-\left(x+1\right)^2+6\)
Vì \(-\left(x+1\right)^2\le0\forall x\)
\(\Rightarrow-\left(x+1\right)^2+6\le6\forall x\)
Dấu "=" xảy ra \(\Leftrightarrow x=-1\)
Vậy \(MAX_M=6\Leftrightarrow x=-1\)