Ta có: \(M=x^2+4x-5\)
\(=x^2+2.x.2+4-9\)
\(=\left(x+2\right)^2-9\)
Vì \(\left(x+2\right)^2\ge0\forall x\)
\(\Rightarrow M\ge-9\forall x\)
Dấu "=" xảy ra khi \(\left(x+2\right)^2=0\)
\(\Leftrightarrow x+2=0\Leftrightarrow x=-2\)
Vậy \(Max_M=-9\Leftrightarrow x=-2.\)
\(M=-x^2+4x-5=-\left(x^2-4x+4\right)-1=-\left(x-2\right)^2-1\)
Ta thấy: \(-\left(x-2\right)^2\le0\forall x\Rightarrow-\left(x-2\right)^2-1\le-1\)
Dấu ''='' xảy ra khi x - 2 = 0 <=> x = 2
Vậy MaxM = -1 <=> x = 2