Ta có : \(x^2+2018y^2-4xy-3x+6y+2=0\)
\(\Leftrightarrow x^2-4xy+4y^2-3\left(x-2y\right)+2+2014y^2=0\)
\(\Leftrightarrow\left(x-2y\right)^2-3\left(x-2y\right)+2=-2014y^2\)
do \(y^2\ge0\Rightarrow-2014y^2\le0\)
\(\Rightarrow\left(x-2y\right)^2-3\left(x-2y\right)+2\le0\)
\(\Leftrightarrow\left(x-2y-1\right)\left(x-2y-2\right)\le0\)
\(\Leftrightarrow1\le x-2y\le2\) Vậy Min P = 1 khi x = 1 ; y = 0
Max P = 2 khi x = 2 ; y = 0