Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Re: FindInstance what inspite ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84002] Re: [mg83907] Re: [mg83861] FindInstance what inspite ?
  • From: DrMajorBob <drmajorbob at bigfoot.com>
  • Date: Thu, 6 Dec 2007 03:13:08 -0500 (EST)
  • References: <fire9m$roc$1@smc.vnet.net> <200712020914.EAA07009@smc.vnet.net> <200712031039.FAA18775@smc.vnet.net> <13196714.1196783150798.JavaMail.root@m35>
  • Reply-to: drmajorbob at bigfoot.com

Help for Root (version 6.0.1) says:

Root[poly,x,k]
gives the k\[Null]^th root of the polynomial poly in x.

and later it says:

The setting of ExactRootIsolation is reflected in third argument of a Root  
object:

a = Root[#^40 - 15 #^17 - 21 #^3 + 11 &, 20, ExactRootIsolation -> False];
b = Root[#^40 - 15 #^17 - 21 #^3 + 11 &, 20, ExactRootIsolation -> True];

{a, b} // InputForm

{Root[11 - 21*#1^3 - 15*#1^17 + #1^40 & , 20, 0],
  Root[11 - 21*#1^3 - 15*#1^17 + #1^40 & , 20, 1]}

The two descriptions seem, at first glance, incompatible, but the problem  
is only that the second usage isn't included in the top-section summary of  
calling patterns.

Here are EIGHT ways of specifying the same number (unless exact root  
isolation is actually necessary, as I gather it should never be):

Root[1 + 2 #1 + #1^5 &, 1] ==
  Root[1 + 2 #1 + #1^5 &, 1, ExactRootIsolation -> False] ==
  Root[1 + 2 #1 + #1^5 &, 1, ExactRootIsolation -> True] ==
  Root[1 + 2 #1 + #1^5 &, 1, 0] == Root[1 + 2 #1 + #1^5 &, 1, 1] ==
  Root[1 + 2 x + x^5, x, 1] ==
  Root[1 + 2 x + x^5, x, 1, ExactRootIsolation -> False] ==
  Root[1 + 2 x + x^5, x, 1, ExactRootIsolation -> True]

True

Bobby

On Tue, 04 Dec 2007 03:23:18 -0600, Daniel Lichtblau <danl at wolfram.com> 
wrote:

> Artur wrote:
>> Who have idea what function uses inspite FindInstance in procedure?
>> \!\(FindInstance[Chop[N[Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 + #1\^ 5
>> &, 2] \
>> + Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 + #1\^5 &, 3], 500]] == a + b\
>>                 Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 + #1\^5 &,
>>                      1] + c\ Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 +
>> #1\^5 \
>> &, 1]^2 + d\
>>             Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 + #1\^5 &, 1]^3 + e\
>>                     Root[\(-1\) - 2\ #1 - 2\ #1\^2 - #1\^3 + #1\^5 &,
>>                    1]^4 && a != 0, {a, b, c, d, e}, Integers]\)
>> And anser is empty set {}
>> Good answer  is {a,b,c,d,e}={-2,-3,-2,-1,2}
>> Who know how I can realize that procedure in Mathematica ?
>>
>> Best wishes
>> Artur
>
> One can attempt such problems directly using lattice reduction. The idea
> is to form a vector consisting of your target value and "basis" values
> (the zeroeth through fourth powers of a certain algebraic number, in
> your example). Multiply by a power of 10 raised to the precision you
> have in mind, and round off to get integers. Augment on the right with
> an identity matrix. Reduce this lattice, look for a small vector with
> element in the column corresponding to the input value equal to +-1 (so
> we know we obtained the value itself, and not a nontrivial multiple
> thereof). This last can be relaxed if you are willing to allow rationals
> (with small denominators, say) as coefficients.
>
> So here is code to do all this.
>
> minimalPolynomialInRoot[val_Real, alg_Root, deg_Integer] := Module[
>    {vec, prec=Floor[Precision[val]], lat, redlat, mults},
>    vec = Round[10^prec*Append[alg^Range[0,deg],-val]];
>    lat = Transpose[Prepend[IdentityMatrix[deg+2],vec]];
>    redlat = LatticeReduce[lat];
>    mults = First[redlat];
>    If [Abs[Last[mults]]==1,
>      Take[mults,{2,-2}] / Last[mults],
>      $Failed]
>    ]
>
> Your example:
>
> val = Re[N[Root[-1 - 2*#1 - 2*#1^2 - #1^3 + #1^5 & , 2, 0] +
>       Root[-1 - 2*#1 - 2*#1^2 - #1^3 + #1^5 & , 3, 0], 500]];
> alg = Root[-1 - 2*#1 - 2*#1^2 - #1^3 + #1^5 & , 1];
>
> In[65]:= multipliers = minimalPolynomialInRoot[val, alg, 4]
> Out[65]= {2, 2, 2, 1, -2}
>
> Check:
>
> In[66]:= multipliers.alg^Range[0,deg] - val
>                -500
> Out[66]= 0. 10
>
>
> Daniel Lichtblau
> WOlfram Research
>
>
>
>
>
>



-- 

DrMajorBob at bigfoot.com


  • Prev by Date: Re: Slider[] and Dynamic[] implementation details
  • Next by Date: Re: Exporting Sound
  • Previous by thread: Re: FindInstance what inspite ?
  • Next by thread: Re: Re: FindInstance what inspite ?