It's too late to understand where is the mistake, I can only write my own solution to this now
It's similar to yours, I think
(After this we can get new roots, so we have to check them after solving)
So we know:
We know, that these formulas are cube polynomial's coefficients.
is the polynom:
are roots of this polynom
Now we can use some formulas (http://en.wikipedia.org/wiki/Cubic_func ... c_function
) or find trivial solutions, they are:
Then we must understand that all variables are equivalent, have the same rights, so if we swap some of them, we will get a new answer.
Finally the answers are: