由x-y=2,y-z=1
两式相加,得
x-z=3
所以
x^2+y^2+z^2-xy-yz-zx
=(2x^2+2y^2+2z^2-2xy-2yz-2zx)/2
=[(x^2+y^2-2xy)+(x^2+z^2-2zx)+(y^2+z^2-2zy)]/2
=[(x-y)^2+(x-z)^2+(y-z)^2]/2
=[2^2+1^2+3^2]/2
=7
由x-y=2,y-z=1
两式相加,得
x-z=3
所以
x^2+y^2+z^2-xy-yz-zx
=(2x^2+2y^2+2z^2-2xy-2yz-2zx)/2
=[(x^2+y^2-2xy)+(x^2+z^2-2zx)+(y^2+z^2-2zy)]/2
=[(x-y)^2+(x-z)^2+(y-z)^2]/2
=[2^2+1^2+3^2]/2
=7