A = \(x^2-4x-y^2+2y\)
= (\(x^2-4x+2^2\)) \(-\left(y^2-2y+1\right)\) - 4 - 1
= \(\left(x-2\right)^2-\left(y-1\right)^2\) - 5
Ta có \(\left(x-2\right)^2-\left(y-1\right)^2\) ≤ 0 ∀ x, y
\(\left(x-2\right)^2-\left(y-1\right)^2\) - 5 ≤ - 5
Hay A ≤ - 5
Dấu "=" xảy ra ↔ x - 2 = 0 ⇒ x = 2
- (y - 1) = 0 ⇒ y = 1
Vậy GTLN của A = -5 ↔ x = 2, y = 1