Ta có: \(B=-2x^2-y^2+2x-2y-2\)
\(=-\left(2x^2+y^2-2x+2y+2\right)\)
\(=-\left(2x^2-2x+\dfrac{1}{2}+y^2+2y+1+\dfrac{1}{2}\right)\)
\(=-2\left(x-\dfrac{1}{2}\right)^2-\left(y+1\right)^2-\dfrac{1}{2}\le\dfrac{1}{2}\forall x,y\)
Dấu '=' xảy ra khi \(x=\dfrac{1}{2}\) và y=-1