0
|
5230 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Ordering of solutions for quartics when using Root

Posted 10 years ago
 Hello all, There was a discussion recently regarding quartics and here I want to extend it a little bit with regards to Root objects: Root[#1^4 A1 + #1^3 A2 + #1^2 A3 + #1 A4 + A5 &, n_root]  The problem I have to solve is a quartic equation in which coefficients vary based on problem input - range for one of the model's parameters. The equation has 4 different roots (related to four different physical quantities) and again based on the input they vary throughout a range of model's parameter as follows: Four real roots two real Two complex roots Four complex roots. Each root is assigned to a separate variable and in order to solve the problem, roots have to be consistent with variables (certain physical quantities), so to say root #1 should be always in position #1 of Root no matter if it is complex or real. Root numbers solutions from smallest to biggest and that works fine until roots start to become complex, then Root changes its' positions and solution is not physical anymore. Can anyone advise on that?
2 Replies
Sort By:
Posted 10 years ago
 Yuriy,I'm not certain if you are looking for strictly symbolic solutions here or if you wish to explore numerical solutions. If you are satisfied with a numerical exploration then the Multivalues and CalculateMultivalues routines in my Presentations Application (which I sell through my web site for \$50) might be of use to you. It allows you to trace a path in 'parameter space' (say by moving sliders or moving a locator) and obtain a continuous movement of the roots. It does this by keeping track of the previous root set and using a linear programming 'assignment' algorithm to assign the identities of the new root set to the old root set by minimizing a 'distance' between them. The Mathematica routines have their own rules for ordering the roots and do not always maintain a continuity. Of course, when two roots collide then it is rather arbitrary how they are assigned to their subsequent paths. And the result of traveling between two parameter points can certainly be path dependent. But this does give you an exploration tool.
Posted 10 years ago
 You may need to reorder on the fly, when roots cross from one of your configurations to another. This happens only where pairs of roots coincide. This in turn happens only when the discriminant vanishes, and this is a polynomial in the parameters. In[156]:= poly = Array[a, 5, 0].x^Range[0, 4] (* Out[156]= a[0] + x a[1] + x^2 a[2] + x^3 a[3] + x^4 a[4] *) In[157]:= disc = Discriminant[poly, x] (* Out[157]= a[1]^2 a[2]^2 a[3]^2 - 4 a[0] a[2]^3 a[3]^2 - 4 a[1]^3 a[3]^3 + 18 a[0] a[1] a[2] a[3]^3 - 27 a[0]^2 a[3]^4 - 4 a[1]^2 a[2]^3 a[4] + 16 a[0] a[2]^4 a[4] + 18 a[1]^3 a[2] a[3] a[4] - 80 a[0] a[1] a[2]^2 a[3] a[4] - 6 a[0] a[1]^2 a[3]^2 a[4] + 144 a[0]^2 a[2] a[3]^2 a[4] - 27 a[1]^4 a[4]^2 + 144 a[0] a[1]^2 a[2] a[4]^2 - 128 a[0]^2 a[2]^2 a[4]^2 - 192 a[0]^2 a[1] a[3] a[4]^2 + 256 a[0]^3 a[4]^3 *) So the condition to check is disc==0. At such points (in parameter space) pairs of roots can coalesce and you may need to reorder the Root objects to suit your needs.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.