\(A=-x^2-y^2+xy+2x+2y\\ =-2x^2-2y^2+2xy+4x+4y\\ =\left(-x^2+2xy-y^2\right)+\left(-x^2+4x-4\right)+\left(-y^2+4y-4\right)+8\\ =-\left(x^2-2xy+y^2\right)-\left(x^2-4x+4\right)-\left(y^2-4y+4\right)+8\\ =-\left(x-y\right)^2-\left(x-2\right)^2-\left(y-2\right)^2+8\\ =-\left[\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2\right]+8\\ \left(x-y\right)^2\ge0\forall x,y;\left(x-2\right)^2\ge0\forall x;\left(y-2\right)^2\ge0\forall y\\ \Rightarrow\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2\ge0\\ \Leftrightarrow-\left[\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2\right]\le0\\ \Leftrightarrow-\left[\left(x-y\right)^2+\left(x-2\right)^2+\left(y-2\right)^2\right]+8\le8\)
Dấu "=" xảy ra khi:
\(\left\{{}\begin{matrix}\left(x-y\right)^2=0\\\left(x-2\right)^2=0\\\left(y-2\right)^2=0\end{matrix}\right.\\ \Leftrightarrow\left\{{}\begin{matrix}x-y=0\\x-2=0\\y-2=0\end{matrix}\right.\\ \Leftrightarrow x=y=2\)
Vậy \(MAX_A=8\text{ khi }x=y=2\)