Message Boards Message Boards

0
|
7129 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How does Mathematica order roots?

Posted 8 years ago

Hello!

Consider the quartic polynomial $$(48a^2+16b)x^4-(40a^3+168 ab)x^3+(-45 a^4+225a^2 b+ 72b^2)x^2+(27a^3 b - 162 ab^2)x+27b^3, \qquad (*)$$ where $a<0$. Consider

r1 = ToRadicals[Root[375 a^8 - 3600 a^6 # + 8088 a^4 #^2 - 6912 a^2 #^3 + 2048 #^4 &,1]]

and

r2 = ToRadicals[Root[375 a^8 - 3600 a^6 # + 8088 a^4 #^2 - 6912 a^2 #^3 + 2048 #^4 &,2]]
  • (1) I verified with Mathematica that this polynomial $(*)$ has 2 real roots and 2 complex roots if and only if

$$a<0, \quad r_1<b<a^2 \ \mbox{or} \ a^2 < b < r_2 $$

  • (2) This quartic polynomial has four real roots if and only if

$$a<0, \quad -3a^2<b<0 \ \mbox{or} \ 0<b<r_1$$. I'm not quite sure but I red that Mathematica orders the roots of polynomials as follows. If there are complex and real roots then the reals comes first followed by the complex. If there are four real roots then it orders the real roots from smallest to greatest? Therefore, in case (1) we have

q2 =  Root[(48 a^2 + 16 b) #^4 - (40 a^3 + 168 a b)#^3 + (-45 a^4 + 225 a^2 b + 72 b^2) #^2 + (27a^3 b - 162 a b^2) # + 27 b^3 &,2]

is the greatest real root (since there are only two).

In case (2)

q2 =  Root[(48 a^2 + 16 b) #^4 - (40 a^3 + 168 a b)#^3 + (-45 a^4 + 225 a^2 b + 72 b^2) #^2 + (27a^3 b - 162 a b^2) # + 27 b^3 &,2]

is the second smallest real root (since there are four now).

So whenever I decide to do work with $q_2$, for example, suppose I want to solve the inequality $q_2 < 0$. Should I then always additionally impose conditions on $b$ such that Mathematica knows if there are four real or 2 real and 2 complex roots? Because it makes a difference.

Hopefully, I made my question clear. Thanks in advance!

POSTED BY: Cédric Cavents

Root objects have a well-defined ordering (reals before complexes, smaller real parts before larger). However, radical expressions do not. So, if you want order, don't use radicals.

POSTED BY: John Doty
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract