a ) \(M=2+x-x^2\)
\(=-x^2+x-\frac{1}{4}+\frac{9}{4}\)
\(=-\left(x-\frac{1}{2}\right)^2+\frac{9}{4}\le\frac{9}{4}\)đạt GTNN là \(\frac{9}{4}\) tại x = \(\frac{1}{2}\)
b ) \(S=-x^2+2xy-4y^2+2x+10y-3\)
\(=\left[\left(-x^2+2xy-y^2\right)+\left(2x-2y\right)-1\right]+\left(-3y^2+12y-12\right)+10\)
\(=\left[-\left(x-y\right)^2+2\left(x-y\right)-1\right]-3\left(y-2\right)^2+10\)
\(=-\left(x-y-1\right)^2-3\left(y-2\right)^2+10\le10\) có GTLN là 10
Dấu "=" xảy ra \(\Leftrightarrow\hept{\begin{cases}x-y-1=0\\y-2=0\end{cases}\Rightarrow\hept{\begin{cases}x=3\\y=2\end{cases}}}\)
Vậy \(S_{max}=10\Leftrightarrow x=3;y=2\)