Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Root's third argument?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66237] Re: [mg66220] Root's third argument?
  • From: Adam Strzebonski <adams at wolfram.com>
  • Date: Fri, 5 May 2006 05:02:24 -0400 (EDT)
  • References: <200605040921.FAA09564@smc.vnet.net> <65034E2F-09AA-4A3B-B58F-1DC578AC1F24@mimuw.edu.pl> <05F73634-6905-47F8-A07A-08A1EDE4D777@mimuw.edu.pl>
  • Reply-to: adams at wolfram.com
  • Sender: owner-wri-mathgroup at wolfram.com

Andrzej Kozlowski wrote:
> 
> On 4 May 2006, at 21:45, Andrzej Kozlowski wrote:
> 
>>
>> On 4 May 2006, at 18:21, bradc355113 at yahoo.com wrote:
>>
>>> The Root function seems to have an undocumented third argument--does
>>> anyone know what it represents?
>>>
>>> I ran into it while trying to use some replacement rules to replace
>>> Root objects in an expression, and none of my "Root[f_,k_]" patterns
>>> were matching, because Root has an invisible third argument that
>>> doesn't show up in output.
>>>
>>> I have a workaround, but I'm still curious.
>>>
>>> Thanks,
>>> Brad
>>>
>>
>> Yes, there is indeed a third, hidden argument. I think it  represents 
>> (or at least it used to represent)  what is called "the  isolating 
>> set" of the algebraic number, that is, a subset of the  complex plane 
>> in which the root object is the only root of the  minimal polynomial. 
>> This is necessary in order for the roots of the  polynomial to be 
>> ordered, so that you can speak of the "first  roots", "second root" etc.
>>
>> Mathematica uses two approaches to root isolation: numerical and  
>> exact one. Which one is used depends on the value of the option  
>> ExactRootIsolation of Root. One can check that the invisible third  
>> argument is different (you can extract it with Part). However, it  
>> seems to me that the actual form of the third argument was changed  
>> (without my noticing it until today ;-)) in some version of  
>> Mathematica between 3 and 5. Mathematica used to return an  
>> approximate value of the root with the ExactRootIsolation set to  
>> False and the corners of the isolating rectangle in the complex  plane 
>> with  ExactRootIsolation set to True. However, now it seems  just to 
>> return 0 and 1, which I find impossible to interpret. I am  sure, 
>> however, that the same information is still stored somewhere...
>>
>> Andrzej Kozlowski
>>
>>
> 
> On second thoughts I think that the most likely explanation is this.  
> Originally the third argument in Root was indeed the information  about 
> the isolating set that I described above. Then, at some point,  it was 
> decided not to include this information any more. However,  probably for 
> the sake of backward compatibility of code, three  argument form of Root 
> was retained, but the third argument was  changed to 0 or 1 depending on 
> whether ExactRootIsolation is set to  False or True.

This is exactly what it is. The third argument of Root indicates
the root isolation method to be used to determine the ordering of roots.
Specifying the root ordering is necessary to give a precise meaning to
the definition of Root[f, k] as "the k-th root of f".

In the root ordering chosen in Mathematica the real roots always
come first, and they are ordered by the increasing values.
Hence, for real roots, the root ordering is well defined without
a reference to root isolation methods used, and therefore the value
of the third argument of Root is irrelevant.

For roots that are not real the situation is different. They always
come after the real roots, and the complex conjugates are always
adjacent, but the relative ordering of pairs of conjugate roots
is determined by sorting the isolating sets of the roots with
negative imaginary parts (using Mathematica Sort function).
Hence, to make the ordering of non-real roots well defined we need
to indicate which method should be used to obtain the isolating sets.
In particular, it may happen that Root[f, k, 0] != Root[f, k, 1]
(but only if f has less than k real roots).

Best Regards,

Adam Strzebonski
Wolfram Research

> 
> I am just guessing, of course, and, as always, take no responsibility  
> for whatever might happen to your Mathematica  code if you believe  me 
> ...;-)
> 
> Andrzej Kozlowski
> 
> Tokyo, Japan
> 


  • Prev by Date: Re: Re: Apparent accuracy error in least squares fit
  • Next by Date: Re: Re: Apparent accuracy error in least squares fit
  • Previous by thread: Re: Root's third argument?
  • Next by thread: NMinimize with numerically evaluated constraints