x^3+y^3+z^3-3xyz
=[( x+y)^3-3x^2y-3xy^2]+z^3-3xyz
=[(x+y)^3+z^3]-(3x^2y+3xy^2+3xyz)
=(x+y+z)[(x+y)^2-(x+y)z+z^2]-3xy(x+y+z)
=(x+y+z)(x^2+y^2+2xy-xz-yz+z^2)-3xy(x+y+z)
=(x+y+z)(x^2+y^2+z^2-xy-xz-yz)
x^3+y^3+z^3-3xyz
=[( x+y)^3-3x^2y-3xy^2]+z^3-3xyz
=[(x+y)^3+z^3]-(3x^2y+3xy^2+3xyz)
=(x+y+z)[(x+y)^2-(x+y)z+z^2]-3xy(x+y+z)
=(x+y+z)(x^2+y^2+2xy-xz-yz+z^2)-3xy(x+y+z)
=(x+y+z)(x^2+y^2+z^2-xy-xz-yz)