Quartic formula

88 views
Skip to first unread message

tuom....@gmail.com

unread,
Feb 26, 2014, 7:26:21 PM2/26/14
to sy...@googlegroups.com
Hi!

I'm trying to understand how the root finding of quartic polynomials works but I came to a dead end.

The method discovered by Euler is described here:

To quote the relevant parts:

z3 + (e/2) z2 + ((e2-4 g)/16) z - f2/64 = 0 (*)
r = -f/(8 p q)
x = p + q + r - a/4
x = p - q - r - a/4
x = -p + q - r - a/4
x = -p - q + r - a/4

But "_roots_quartic_euler" function from SymPy which claims to use the Descartes-Euler solution contains (very) different procedure:

64*R**3 + 32*p*R**2 + (4*p**2 - 16*r)*R - q**2 = 0 (this is the same as above)  (*)
but:
p = -2*(R + A); q = -4*B*R; r = (R - A)**2 - B**2*R
x1 = sqrt(R) - sqrt(A + B*sqrt(R))
x2 = -sqrt(R) - sqrt(A - B*sqrt(R))
x3 = -sqrt(R) + sqrt(A - B*sqrt(R))
x4 = sqrt(R) + sqrt(A + B*sqrt(R))

and later:
c1 = sqrt(R)
c2 = sqrt(A + B)
c3 = sqrt(A - B)

Please, could someone explain a few things to me?

Where do all the definitions of x1, x2, x3, x4 come from? Is there somewhere a paper which derives them? And how was "p" derived?

In particular, what I'm trying to understand is how to go from using two roots of (*) to using just one (c1)? I.e., the description of Euler's method says, that one has to pick two roots of (*) - how is it possible to pick just one and still be able to calculate x1...x4?

Thanks in advance!

Tuom Larsen

Ondřej Čertík

unread,
Feb 26, 2014, 7:34:41 PM2/26/14
to sympy, smichr
Hi Tuom,
Great questions. Chris Smith is the expert here, I CCed him.

Once you understand it,
it would be a big help if you could send us PRs, documenting the code more,
possibly adding a nice documentation page about this into our Sphinx, with
equations etc. That would be a great resource about quartic equations.

Ondrej

>
> Thanks in advance!
>
> Tuom Larsen
>
> --
> 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 sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> 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/9546da96-f0a7-4a1f-abf2-f41069e17d25%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Kalevi Suominen

unread,
Mar 1, 2014, 8:20:13 AM3/1/14
to sy...@googlegroups.com
Hi, Tuom

I'm trying to attach a file answering your questions.

I hope it arrives.

Kalevi
quartic.txt

tuom....@gmail.com

unread,
Mar 3, 2014, 10:33:45 AM3/3/14
to sy...@googlegroups.com
Hi Kalevi,

you are awesome! It helps a lot, thank you!

Ondřej Čertík

unread,
Mar 3, 2014, 2:02:20 PM3/3/14
to sympy
Hi Kalevi,

Awesome writeup, thanks a lot!

Ondrej
> --
> 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 sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> 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/47fe011f-4815-4b01-b94f-a9814786513a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages