x^2+2xy+3(y^2)-4y+2
=(x+y)^2+2(y^2-2y+1)
=(x+y)^2+2(y-1)^2