Ta có :
2(xy - x^2 - y + 1008) = y^2 + 2018
<=> 2xy - 2x^2 - 2y + 2016 = y^2 + 2018
<=> 2xy - 2x^2 - 2y = y^2 + 2
<=> 2xy - 2x^2 - 2y - y^2 - 2 = 0
<=> -(2x^2 - 2xy + y^2/2) - y^2/2 - 2y - 2 = 0
<=> -2(x^2 - xy + y^2/4) - 2(y^2/4 + y + 1) = 0
<=> -2(x-y/2)^2 - 2(y/2 + 1)^2 = 0
<=> 2(x-y/2)^2 + 2(y/2 + 1)^2 = 0
Dấu " = " xảy ra <=> x - y/2 = 0 ; y/2 + 1 = 0
<=> x = y/2 ; y = -2
<=> x = -1 ; y = -2
Vậy x = -1 ; y = -2
Ta có :
2(xy - x^2 - y + 1008) = y^2 + 2018
<=> 2xy - 2x^2 - 2y + 2016 = y^2 + 2018
<=> 2xy - 2x^2 - 2y = y^2 + 2
<=> 2xy - 2x^2 - 2y - y^2 - 2 = 0
<=> -(2x^2 - 2xy + y^2/2) - y^2/2 - 2y - 2 = 0
<=> -2(x^2 - xy + y^2/4) - 2(y^2/4 + y + 1) = 0
<=> -2(x-y/2)^2 - 2(y/2 + 1)^2 = 0
<=> 2(x-y/2)^2 + 2(y/2 + 1)^2 = 0
Dấu " = " xảy ra <=> x - y/2 = 0 ; y/2 + 1 = 0
<=> x = y/2 ; y = -2
<=> x = -1 ; y = -2
Vậy x = -1 ; y = -2