x-y=1,
y-z=3
两式相加得
x-z=4
x^2+y^2+z^2-xy-yz-zx
=1/2(2x^2+2y^2+2z^2-2xy-2yz-2zx)
=1/2(x^2-2xy+y^2+y^2-2yz+z^2-2zx+x^2+z^2)
=1/2[(x-y)^2+(y-z)^2+(x-z)^2]
=1/2[1^2+3^2+4^2]
=1/2*26
=13
x-y=1,
y-z=3
两式相加得
x-z=4
x^2+y^2+z^2-xy-yz-zx
=1/2(2x^2+2y^2+2z^2-2xy-2yz-2zx)
=1/2(x^2-2xy+y^2+y^2-2yz+z^2-2zx+x^2+z^2)
=1/2[(x-y)^2+(y-z)^2+(x-z)^2]
=1/2[1^2+3^2+4^2]
=1/2*26
=13