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!
 A: 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.
A: 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)$
A: 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*}
A: Because the polynomial is homogeneous in degree (every term is 4th degree), the expression may reduced to two variables by "factoring out" a 4th power of  one of the variables.
If we set $X=x/z$ and $Y=y/z$, then the original expression is $z^4$ times the following:
$$ X^3 - X^3Y - Y^3 + Y + XY^3 - X $$
Collecting terms in descending powers of one variable (say $X$), we have:
$$ (1-Y)X^3 + (Y^3 - 1)X - Y^3 + Y $$
By inspection the leading coefficient is a factor:
$$ (1-Y)(X^3 - (Y^2 + Y + 1)X + (Y + 1)Y) $$
Since the second factor is now monic in $X$ and polynomials in $X$ over $\mathbb{Z}[Y]$ form a UFD, we check for factors of the form $X-d$ where root $d$ is a divisor of $(Y+1)Y$.  Equivalently we can substitute $X=d$ rather than perform long division, which amounts to synthetic division/Horner's method if you practice it.  In any case one gets the factor $X-Y$ rather easily:
$$ (1-Y)(X-Y)(X^2 + YX - (Y+1)) $$
Finally the third factor yields either to inspection, to root testing, or to the quadratic formula:
$$ (1-Y)(X-Y)(X - 1)(X + Y + 1) $$
Multiplying by $z^4$ in such a way that each factor above gets one copy of $z$ converts back to the original variables:
$$ (z-y)(x-y)(x-z)(x + y + z)$$
And we are done!
