\(\left(x+y+z\right)^2+\left(x+y-z\right)^2-4z^2=\left(x+y+z\right)^2+\left(x+y-z-2z\right)\left(x+y-z+2z\right)=\left(x+y+z\right)^2+\left(x+y-3z\right)\left(x+y+z\right)=\left(x+y+z\right)\left(x+y+z+x+y-3z\right)=\left(x+y+z\right)\left(2x+2y-2z\right)=2\left(x+y+z\right)\left(x+y-z\right)\)
Ta có:
(x + y + z)2 + (x + y – z)2 – 4z2
\(=\left(x+y-z\right)^2+\left(x+y-z\right)\left(x+y+3z\right)\)
\(=\left(x+y-z\right)\left(x+y+3z+x+y-z\right)\)
\(=2\left(x+y-z\right)\left(x+y+z\right)\)\(\left(x+y+z\right)^2+\left(x+y-z\right)^2-4z^2\)
\(=x^2+y^2+z^2+2xy+2yz+2xz+x^2+y^2+z^2+2xy-2xz-2yz-4z^2\)
\(=2x^2+2y^2-2z^2+4xy\)
\(=2\left(x^2+2xy+y^2-z^2\right)\)
\(=2\left(x+y-z\right)\left(x+y+z\right)\)