f(x1,x2,x3)=2x1^2+4x1(x2-x3)+5x2^2+5x3^2-8x2x3
=2[x1^2+2x1(x2-x3)]+5x2^2+5x3^2-8x2x3
=2[x1+(x2-x3)]^2-2(x2-x3)^2+5x2^2+5x3^2-8x2x3
=2[x1+x2-x3]^2+3x2^2+3x3^2-4x2x3
=2[x1+x2-x3]^2+3[x2^2-2×x2×2/3x3]+3x3^2
=2[x1+x2-x3]^2+3[x2^2-2/3x3]^2+5/3x3^2
令y1=x1+x2-x3,y2=x2-2/3x3,y3=x3,则f(x1,x2,x3)=2y1^2+3y2^2+5/3y3^2.