At the moment I am trying to rewrite this term:
$2x^2-2xy+5y^2-4x+2y+2$
as a sum of squares. So I am trying to find an experession of $2x^2-2xy+5y^2-4x+2y+2=a^2+b^2+c^2$ (for example)
It looks easy, but everything I have tried failed so far. So I wonder if there is such expression. I know that this term is nonnegativ for every pair $(x,y)$.
One try might look like this:
$2x^2-2xy+5y^2-4x+2y+2=x^2-2xy+y^2+x^2+4y^2-4x+2y+2=(x-y)^2+(x-2)^2+4y^2+2y-2$
Here $4y^2+2y-2=4(y-\frac12)(y+1)$
Do you see a nice sequence of calculations?
Thanks in advance.