MathGroup Archive 2001

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

Search the Archive

Re: Who can help me?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26802] Re: [mg26778] Who can help me?
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Wed, 24 Jan 2001 04:18:42 -0500 (EST)
  • References: <200101220810.DAA27479@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

First, I couldn't get a complex number, as you claim you do by simplifying
and then taking N[].
I copied your polynomial straight from your message and pasted it into my
notebook. I call it f[x]. Then the same for   x-> 2 + 2 Cos [2 [Pi] / 7]. My
computer didn't like the square brackets in [Pi] above, so I assumed that
was a misprint and got rid of them. Then

In[1]:=
N[Simplify[f[x]] /. x -> 2 + 2 Cos[2*Pi/7]]
Out[1]=
3.297766455913909`*^8

which is real and one order of magnitude larger than

In[2]:=
N[f[x] /. x -> 2 + 2 Cos[2*Pi/7]]
Out[2]=
3.2628184`*^7.

One might think that this has to do with approximation problems. But I give
you still crazier results. Watch this:

In[3]:=
f[x] /. x -> 2 + 2 Cos[2.0000000000000000*Pi/7]
Out[4]=
3.2628184`*^7

Notice that the factor 2 has 16 zeros after the decimal point. Now type one
more zero, so as to have 17 instead of 16:

In[5]:=
f[x] /. x -> 2 + 2 Cos[2.00000000000000000*Pi/7]
Out[5]=
0. * 10^8

The effect of inserting one more zero was to change from machine precision
numbers to arbitrary precision numbers, and apparently this created havoc
somewhere. So there is more to this than meets the eye. In fact, it is not a
problem of approximation. I took your polynomial and examined its behavior,
truncating one by one the terms with successively smaller exponents, and
evaluating each with and without Simplify. The results are startling:
everything behaves nicely until you get to the last term, i.e., to the
original polynomial, and it is only then that the difference pops out. You
can check this:

In[6]:=
a1 = Table[Coefficient[f[x], x^j], {j, 1, 32}];
In[7]:=
a2 = Table[x^j, {j, 1, 32}];
In[8]:=
f[x] == a1.a2
Out[8]=
True

Now take the dot products to obtain the truncated polynomials:

In[9]:=
Table[Take[a1, -j].Take[a2, -j] /. x -> 2 + 2 Cos[2.0*Pi/7], {j, 1, 32}]
Out[9]=
\!\({2.3299464415234008`*^16, \(-6.225166642017306`*^17\),
    8.095823791432835`*^18, \(-6.827018853514098`*^19\),
    4.195660897089886`*^20, \(-2.0024019788866655`*^21\),
    7.721985589213778`*^21, \(-2.4719651614064567`*^22\),
    6.696880503554032`*^22, \(-1.5575043190979624`*^23\),
    3.1434645609556606`*^23, \(-5.551191511538765`*^23\),
    8.630908489745314`*^23, \(-1.18679687228797`*^24\),
    1.447609719431064`*^24, \(-1.5688840125551723`*^24\),
    1.51129470844226`*^24, \(-1.2929086666244018`*^24\),
    9.804286814731637`*^23, \(-6.570867584057313`*^23\),
    3.8768688571383356`*^23, \(-2.0035257611223482`*^23\),
    9.01004052138053`*^22, \(-3.495373870315845`*^22\),
    1.1556808440293227`*^22, \(-3.200121970208588`*^21\),
    7.230361392464404`*^20, \(-1.2804361627651423`*^20\),
    1.664350897746699`*^19, \(-1.407456330327663`*^18\),
    5.782285160715823`*^16, 3.2628184`*^7}\)
In[10]:=
Table[Simplify[Take[a1, -j].Take[a2, -j]] /. x -> 2 + 2 Cos[2.0*Pi/7], {j,
1,
    32}]
Out[10]=
\!\({2.3299464415234008`*^16, \(-6.225166642017307`*^17\),
    8.095823791432834`*^18, \(-6.827018853514098`*^19\),
    4.1956608970898866`*^20, \(-2.0024019788866653`*^21\),
    7.721985589213777`*^21, \(-2.471965161406457`*^22\),
    6.6968805035540325`*^22, \(-1.557504319097963`*^23\),
    3.1434645609556626`*^23, \(-5.551191511538763`*^23\),
    8.630908489745317`*^23, \(-1.1867968722879702`*^24\),
    1.447609719431064`*^24, \(-1.5688840125551725`*^24\),
    1.5112947084422592`*^24, \(-1.2929086666244018`*^24\),
    9.804286814731632`*^23, \(-6.570867584057316`*^23\),
    3.876868857138329`*^23, \(-2.0035257611223496`*^23\),
    9.010040521380392`*^22, \(-3.495373870315801`*^22\),
    1.155680844029254`*^22, \(-3.20012197020816`*^21\),
    7.230361392454027`*^20, \(-1.2804361627534713`*^20\),
    1.6643508976590756`*^19, \(-1.4074563292969969`*^18\),
    5.782285067577335`*^16, 3.297766455913909`*^8}\)

The only term which is different on both lists is the last one! This means
that approximation is not the issue, since all the truncated polynomials
handle very large numbers all the time.
Now, if you really want to have a complete picture of madness, try
FullSimplify instead of Simplify:

In[11]:=
Simplify[f[x]] /. x -> 2 + 2 Cos[2.0*Pi/7]
Out[11]=
3.297766455913909`*^8
In[12]:=
FullSimplify[f[x]] /. x -> 2 + 2 Cos[2.0*Pi/7]
Out[12]=
-2.6508595821182593`*^6

The situation becomes worse every time, and my conclusion is that this
problem deserves close examination by some of the great gurus in this group.

Tomas Garza
Mexico City






----- Original Message -----
From: "Jacqueline Zizi" <jazi at club-internet.fr>
To: mathgroup at smc.vnet.net
Subject: [mg26802] [mg26778] Who can help me?


> I'm working on this polynomial linked to the truncated icosahedron:
>
>         -17808196677858180 x +
>         138982864440593250 x^2 - 527304830550920588 x^3 +
>         1301702220253454898 x^4 - 2358155595920193382 x^5 +
>         3347791850698681436 x^6 - 3878279506351645237 x^7 +
>         3764566420106299695 x^8 - 3117324712750504866 x^9 +
>         2229873533973727384 x^10 - 1390372935143028255 x^11 +
>         760794705528035032 x^12 - 367240961907017721 x^13 +
>         157018216115380477 x^14 - 59650776196609992 x^15 +
>         20179153653354540 x^16 - 6086251542996201 x^17 +
>         1637007669992780 x^18 - 392300104078670 x^19 +
>         83589038962550 x^20 - 15782712151030 x^21 +
>         2628070696678 x^22 - 383466859804 x^23 + 48618908986 x^24 -
>         5298021900 x^25 + 489095520 x^26 - 37516324 x^27 +
>         2327268 x^28 - 112200 x^29 + 3945 x^30 - 90 x^31 + x^32;
>
> I'm interested at its value for x-> 2 + 2 Cos [2 [Pi] / 7].
> Taking N [] gives  3.2628184 10^7
>
> But if I simplify  first and then take N[] it gives -0.0390625 +
> 0.0195313 [ImaginaryI]
>
> As it is a polynomial with integer coefficients, and 2 + 2 Cos [2 pi /
> 7] is real too, the result should be real.  So I prefer the 1st
> solution,  but for another reason, I'm not so sure of this result.
>
> A Plot between 3 and 3.5, does not help me  neither to check if the
> value 3.2628184  is good and If I do : polynomial /. x -> 3.2628184
> 10^7, it gives 2.7225238332205106`^240
>
> How could I check the result 3.2628184 10^7 ?
>
> Thanks
>
> Jacqueline
>
>
>



  • Prev by Date: Re: Re: Who can help me?
  • Next by Date: Re: Who can help me?
  • Previous by thread: Re: Re: Who can help me?
  • Next by thread: Re: Who can help me?