The post above is very good but here it is in a nutshell:
We know that (a- b)3= a3-3a2b+ 3ab2- b3 and that 3ab(a-b)= 3a2b- 3ab so:
(a-b)3+ 3ab(a-b)= a3- b3
(the middle terms cancel).
That is: if we pick any two numbers a, b and let x= a- b, m= 3ab and n= a3- b3, then x3+ mx= n.
What about the other way? If we are given m and n, can we solve for a and b (and so find x)?
Yes, we can. From m= 3ab, we have b= m/(3a). Put that into
a3- b3= n and we have a3- m3/(33a3)= n
Multiply both sides of the equation by a3 and we have the (6th degree!) equation
a6- (m/3)3= naa3.
But if we let u= a3, this reduces to a quadratic equation for u: u2- nu- (m/3)3= 0.
We can solve that by the quadratic formula:
u= a3= (n +/- √(n2+ 4(m/3)3))/2= (n/2)+/- √((n/2)2+ (m/3)3).
Since a3- b3= n,
b3= a3- n
= (-n/2)+/- √((n/2)2+ (m/3)3).
Solving for a and b,
a= (((n/2)+/- √((n/2)2+ (m/3)3))1/3
b= ((-(n/2)+/- √((n/2)2+ (m/3)3))1/3
and, finally, x= a-b.
Notice that the equation was x3+ mx- n= 0 which has no x2. This is the "reduced" cubic.
To solve a general cubic, x3+ ax2+ bx+ c= 0,
"Shift" the variable: replace x by y+ y0 in this equation and then choose y0 to make the coefficient of y2 equal to 0.