How do you factorise $x^3z - x^3y - y^3z + yz^3 + xy^3 - xz^3$?

I'm trying to factorise $$ x^3z - x^3y - y^3z + yz^3 + xy^3 - xz^3 $$ into four linear factors. By plugging it into WolframAlpha I've learned that it's $$-(x-y)(x-z)(y-z)(x+y+z)$$

My question is: what are the steps involved in factorising the expression? Is there a method I don't know about that I'd have access to with my limited maths?

Really appreciate any help!


mathlove has a great hint. The way to factor polynomials is to find their zeroes. That is to say, something like $x^2+2x-3$ can be factored as $(x-1)(x+3)$, where $x=1$ and $x=-3$ are the zeroes. So, playing around with this equation you may think about trying something like $x=y$ to see what happens. This is great, because it causes the whole expression to equal zero, so you know that $x=y$ is a zero. This means you can factor out a quantity of $(x-y)$. Doing polynomial division you will find $$ x^3z - x^3y - y^3z + yz^3 + xy^3 - xz^3 = (x-y)(x^2z+xyz+y^2z-x^2y-xy^2-z^3)$$ Now you can repeat this process on the quantity $x^2z+xyz+y^2z-x^2y-xy^2-z^3$ and factor out another zero, proceeding until everything has been factored. You already know which quantities can be factored out so it shouldn't be too bad. But going through polynomial division is great practice, and is often necessary for factoring polynomials of degree three or higher.


Let's do this inelegantly, just to show that it can be done.

First write as a polynomial (cubic) in $x$ to give $$(z-y)x^3+(y^3-z^3)x+yz^3-y^3z=(z-y)x^3-(z-y)(z^2+yz+y^2)x+yz(z-y)(y+z)=$$$$=(z-y)(x^3-z^2x-xyz-y^2x+y^2z+yz^2)$$

Now tackle the second bracket as a quadratic in $y$ viz $$(z-x)y^2+z(z-x)y+x(x+z)(x-z)=(z-x)(y^2+zy-x^2-xz)$$(we could have used the quadratic formula here to solve for $y$)

Now the second bracket here is linear in $z$ $$(y-x)z+(y-x)(y+x)=(y-x)(z+y+x)$$

Put the pieces together to get $(z-y)(z-x)(y-x)(x+y+z)$


Here's the way we did this when I was beginning high school: as it's a symmetric function of 3 variables, at some point we have to break the symmetry. All we meed is remarkable identities:

The expression can be rewritten as \begin{align*} (x^3-y^3)z&+(z^3-x^3)y+(y^3-z^3)x =(x^3-y^3)z+(z^3-y^3+y^3-x^3)y+(y^3-z^3)x\\ & =(x^3-y^3)(z-y)+(y^3-z^3)(x-y)\\ & =(x-y)(z-y)(x^2+xy+y^2)+(x-y)(y-z)(y^2+yz+z^2)\\ &= (x-y)(y-z)(z^2+yz-x^2-xy)\\ &= (x-y)(y-z)\bigl((z-x)(z+x)+y(z-x)\bigr)\\ &=(x-y)(y-z)(z-x)(x+y+z). \end{align*}