`C = -x^2 + 2x - y^2 - 4y + 6`
`= -x^2 + 2x - 1 - y^2 - 4y - 4 + 11`
`= - (x^2 - 2x + 1) - (y^2 + 4y + 4) + 11`
`= -(x-1)^2 - (y+2)^2 + 11`
\(\left\{{}\begin{matrix}\left(x-1\right)^2\ge0\\\left(y+2\right)^2\ge0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}-\left(x-1\right)^2\le0\\-\left(y+2\right)^2\le0\end{matrix}\right.\)
`=> -(x-1)^2 - (y+2)^2 + 11 ≤ 11`
Dấu `=` xảy ra khi:
\(\left\{{}\begin{matrix}x-1=0\\y+2=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=1\\y=-2\end{matrix}\right.\)
Vậy `C_(max) = 11 <=> x = 1; y = -2`