Problem 243.A cubic equation $\displaystyle x^3+px^2+qx+r=0$ has three roots $\displaystyle x_1, x_2, x_3$ Find: $\displaystyle (x_1-x_2)^2(x_1-x_3)^2(x_2-x_3)^2$ as an expression containing p, q, and r. This polynomial in p, q, and r is called thediscriminantof the cubic equation.

I've mulled over it for some time and seem to get half way there but never quite manage to neatly solve this.