已知X+Y+Z=a,XY+YZ+XZ=b,求X*X+Y*Y+Z*Z的值

问题描述:

已知X+Y+Z=a,XY+YZ+XZ=b,求X*X+Y*Y+Z*Z的值

X*X+Y*Y+Z*Z=(X+Y+Z)*(X+Y+Z)-2(XY+YZ+XZ)=a*a-2b

(x+y+z)(x+y+z)=a*a,展开x*x+y*y+z*z+2(x*y+x*z+y*z)=a*a,代入得到
x*x+y*y+z*z+2b=a*a,即x*x+y*y+z*z=a*a-2b

X+Y+Z=a,两边平方
(X+Y+Z)^2=a^2
X*X+Y*Y+Z*Z+2(XY+YZ+XZ)=a^2
X*X+Y*Y+Z*Z=a^2-2b

X*X+Y*Y+Z*Z=(X+Y+Z)^2-2(XY+YZ+XZ)=a^2-2b

(X+Y+Z)^2=x^2+y^2+z^2+2(xy+yz+xz)
=a^2=x^2+y^2+z^2+2b
所以x^2+y^2+z^2=a^2-2b

X*X+Y*Y+Z*Z=(X+Y+Z)^2-2(XY+XZ+YZ)=a^2-2b

(X+Y+Z)^2=(X+Y)^2+2(X+Y)*Z+Z*Z=X*X+Y*Y+Z*Z+2(XY+XZ+YZ)=a^2
所以X*X+Y*Y+Z*Z=a^2-2b