Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*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 2001

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

Search the Archive

Re: Who can help me?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26874] Re: [mg26778] Who can help me?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 26 Jan 2001 01:27:21 -0500 (EST)
  • References: <94ohkl$eeu@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Andrzej,
We can avoid PolynomialReduce, but it is good general technique; and we do
ultimately rely on Mathematica's N function, so I would use high precision
arithmetic to get a result guaranteed -- modulo the correctness of Mathematica.

In[1]:=
poly = -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;

In[2]:=
rp = RootReduce[poly /. x -> RootReduce[FunctionExpand[2 +
2*Cos[(2*Pi)/7]]]]

Out[2]=
Root[37704366780464883611909 - 34893334509208677195505431*
     #1 + 724196462952652*#1^2 + #1^3 & , 2]

In[3]:=
N[rp, 20]

Out[3]=
0.0010805607234388904362


--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Andrzej Kozlowski" <andrzej at tuins.ac.jp> wrote in message
news:94ohkl$eeu at smc.vnet.net...
> Here is one other possible approach to this problem besides the ones
> suggested so far. I think it is more expensive in terms of time, but
because
> it makes no use of high precision arithmetic I thought it worth
mentioning.
> Bacically, the idea is to use Mathematica's powerful algebra functions to
> simplify the expression as much as posible before applying N:
>
> poly = -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;
>
> In[2]:=
> p = First[RootReduce[FunctionExpand[2 + 2*Cos[(2*Pi)/7]]]][x]
>
> Out[2]=
>               2    3
> -1 + 6 x - 5 x  + x
>
> In[3]:=
> q = PolynomialReduce[poly, p][[2]]
>
> Out[3]=
>                                                         2
> -883889576185949 + 840711507944414 x - 175083482624375 x
>
> In[4]:=
> N[q /. x -> 2 + 2 Cos[2Pi/7] // FunctionExpand // RootReduce]
>
> Out[4]=
> 0.00108056
>
> --
> Andrzej Kozlowski
> Toyama International University
> JAPAN
>
> http://platon.c.u-tokyo.ac.jp/andrzej/
> http://sigma.tuins.ac.jp/
>
> on 1/22/01 5:10 PM, Jacqueline Zizi at jazi at club-internet.fr wrote:
>
> > 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:
  • Next by Date: Re: Who can help me? (Instabilty of Evaluation)
  • Previous by thread: Re: Who can help me?
  • Next by thread: fraction possible for axes label