Hi, Tuom
I'm trying to attach a file answering your questions.
I hope it arrives.
Kalevi
> <http://mathforum.org/dr.math/faq/faq.cubic.equations.html>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/0f9016d5-7f23-4f49-91e1-b39a12db9e32%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The solution of a quartic equation
x^4 + ax^3 + bx^2 + cx + d = 0
is usually started with the substitution x <- x - a/4 (which explains
-a/4 in the final formulas).
This leads to the "depressed equation"
x^4 + px^2 + qx + r = 0
with sum of roots equal to zero.
Euler's method of solving this equation consists of writing the roots
as sums of three square roots
y_i = sqrt(z_i) (i = 1,2,3),
and deriving the qubic equation for the three z_i's, the so-called
resolvent equation.
(Each sqrt has two signs. This yields altogether 8 sums. Four of them
are roots of the equation, and the rest are their opposites.)
Squaring
x = y_1 + y_2 + y_3
we obtain
x^2 - z_1 -z_2 - z_3 = 2(y_1y_2 + y_2y_3 + y_3y_1)
and after squaring again
x^4 - 2(z_1 + z_2 + z_3)x^2 + (z_1 + z_2 + z_3)^2 =
4(z_1z_2 + z_2z_3 + z_3z_1) +
8(y_1y_2^2y_3 + y_2y_3^2y_1 + y_3y_1^2y_2).
The expression in the last parentheses is may be written xy_1y_2y_3,
so we get the equation
x^4 - 2(z_1 + z_2 + z_3)x^2 -8(y_1y_2y_3)x + (z_1 + z_2 + z_3)^2
-4(z_1z_2 + z_2z_3 + z_3z_1) = 0.
Comparing this with the original (depressed) equation Euler sets
z_1 + z_2 + z_3 = -p/2
z_1z_2 + z_2z_3 + z_3z_1 = -(r - (z_1 + z_2 + z_3)^2)/4 = -r/4 + p^2/16
z_1z_2z_3 = (y_1y_2y_3)^2 = q^2/64,
which means that the z_i's are the roots of the resolvent qubic equation
z^3 + (p/2)z^2 + ((p^2 - 4r)/16)z - q^2/64 = 0.
All the steps are reversible except the one where y_1y_2y_3 is squared.
One has to choose the signs of the square roots y_i so that
y_1y_2y_3 = -q/8.
This leaves four possible combinations; the products of the remaining ones
are q/8, and leads to the opposites of the roots. In practice, this may be
taken care of by taking two of the y_i's, say y_1 and y_2, and setting
y_3 = -q/(8y_1y_2).
----
To explain why just one root of the resolvent qubic is sufficient for the
solution of the quartic equation, one may start by observing that knowing
two roots is essentially equivalent to knowing all three roots, since the
sum of roots is the coefficient -p/2 of z^2.
If we know one of the roots, say z_1, the equation may be divided by the
linear polynomial z - z_1 leaving a quadratic equation of the form
z^2 + az + b = 0
for the remaining two roots z_2 and z_3. (The coefficients a and b can
be computed explixitly, of course. However, they need not be in the
original coeffient field. In "_roots_quartic_euler" this is avoided by
demanding z_1 to be rational. So the solution only applies in a special
case.)
Now, this equation can be solved in the usual way to obtain z_2 and z_3
by means of square roots. So, knowing z_1 'almost' solves the whole resolvent
equation.
However, what we really want is y_2 + y_3 and y_2 - y_3 (and their opposites).
They can also be expressed as square roots of
(y_2 + y_3)^2 = z_2 + z_3 + 2y_1y_2 = -a + 2 sqrt(b)
and
(y_2 - y_3)^2 = -a - 2 sqrt(b).
Hence, instead of expressing the roots x_i as sums of three square roots y_i
we can write them as sums of two square roots, eg. y_1 and
sqrt(-a + 2 sqrt(b)). (In "_roots_quartic_euler" these are denoted by c1
and c2,3.)