f=x1^2+6x1x2-4x1x3+5x2^2-4x2x4+4x3^2-8x3x4-x4^2= (x1+3x2-2x3)^2 -4x2^2+12x2x3-4x2x4-8x3x4-x4^2= (x1+3x2-2x3)^2 -4(x2-3/2x3+1/2x4)^2+9x3^2-14x3x4= (x1+3x2-2x3)^2 -4(x2-3/2x3+1/2x4)^2+9(x3-7/9x4)^2-49/9x4^2= y1^2-4y2^2+9y3^2-49/9y4^2