FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » num-analysis
Polynomial solving
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
jacob navia
science forum beginner


Joined: 06 Jul 2005
Posts: 30

PostPosted: Sun Jul 16, 2006 6:12 pm    Post subject: Polynomial solving Reply with quote

Given
x9 - 1000092x8 + 92003682x7 - 3682083720x6 + 83721182769x5 -
1182779630508x4 + 10630567354028x3 - 59354216204400x2 +
1.882046594592e14x - 2.594592e14 = 0

Using a solver using the Jenkings-Traub method (from the page of
the math wizard C. Bond: http://www.crbond.com/download/misc/rpoly.cpp)
I obtain
[ 1] Re: 8.0000000000000067400 Im: 0.0000000000000000000
[ 2] Re: 8.9999999999999727200 Im: 0.0000000000000000000
[ 3] Re: 9.9999999999999436200 Im: 0.0000000000000000000
[ 4] Re: 11.0000000000004890000 Im: 0.0000000000000000000
[ 5] Re: 11.9999999999989139000 Im: 0.0000000000000000000
[ 6] Re: 13.0000000000011665000 Im: 0.0000000000000000000
[ 7] Re: 13.9999999999993683000 Im: 0.0000000000000000000
[ 8] Re: 15.0000000000001392000 Im: 0.0000000000000000000
[ 9] Re: 999999.0000000000000000000 Im: 0.0000000000000000000

Using mathematica online at http://www.mathe-online.at I obtain
a result I can't figure out at all.
13 2
{{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
1]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
2]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
3]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
4]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
5]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
6]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
7]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
8]},


13 2
Quote:
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
Quote:
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
Quote:
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
9]}}



Anyone there tell me what I am doing wrong?

Thanks in advance

jacob
Back to top
Julian V. Noble
science forum Guru Wannabe


Joined: 03 May 2005
Posts: 148

PostPosted: Sun Jul 16, 2006 9:35 pm    Post subject: Re: Polynomial solving Reply with quote

jacob navia wrote:
Quote:
Given
x9 - 1000092x8 + 92003682x7 - 3682083720x6 + 83721182769x5 -
1182779630508x4 + 10630567354028x3 - 59354216204400x2 +
1.882046594592e14x - 2.594592e14 = 0

Using a solver using the Jenkings-Traub method (from the page of
the math wizard C. Bond: http://www.crbond.com/download/misc/rpoly.cpp)
I obtain
[ 1] Re: 8.0000000000000067400 Im: 0.0000000000000000000
[ 2] Re: 8.9999999999999727200 Im: 0.0000000000000000000
[ 3] Re: 9.9999999999999436200 Im: 0.0000000000000000000
[ 4] Re: 11.0000000000004890000 Im: 0.0000000000000000000
[ 5] Re: 11.9999999999989139000 Im: 0.0000000000000000000
[ 6] Re: 13.0000000000011665000 Im: 0.0000000000000000000
[ 7] Re: 13.9999999999993683000 Im: 0.0000000000000000000
[ 8] Re: 15.0000000000001392000 Im: 0.0000000000000000000
[ 9] Re: 999999.0000000000000000000 Im: 0.0000000000000000000


Using Laguerre's method with an initial guess of z = 50 + i0
I get (I set the output to 10 places)

1.500000000E1 + i 0.000000000E-1
1.400000000E1 + i 0.000000000E-1
1.300000000E1 + i 0.000000000E-1
1.200000000E1 + i 0.000000000E-1
1.099999999E1 + i 0.000000000E-1
1.000000001E1 + i 0.000000000E-1
8.999999998E0 + i 0.000000000E-1
1.000000000E6 + i 0.000000000E-1
8.000000000E0 + i 0.000000000E-1

Laguerre's method is discussed in F.S. Acton's book "Numerical
Methods that (Usually) Work".

Thanks for a nice, demanding test case.

--
Julian V. Noble
Professor Emeritus of Physics
University of Virginia
Back to top
Jean-Marc Gulliet
science forum beginner


Joined: 28 May 2005
Posts: 38

PostPosted: Sun Jul 16, 2006 9:39 pm    Post subject: Re: Polynomial solving Reply with quote

jacob navia wrote:
Quote:
Given
x9 - 1000092x8 + 92003682x7 - 3682083720x6 + 83721182769x5 -
1182779630508x4 + 10630567354028x3 - 59354216204400x2 +
1.882046594592e14x - 2.594592e14 = 0

Using a solver using the Jenkings-Traub method (from the page of
the math wizard C. Bond: http://www.crbond.com/download/misc/rpoly.cpp)
I obtain
[ 1] Re: 8.0000000000000067400 Im: 0.0000000000000000000
[ 2] Re: 8.9999999999999727200 Im: 0.0000000000000000000
[ 3] Re: 9.9999999999999436200 Im: 0.0000000000000000000
[ 4] Re: 11.0000000000004890000 Im: 0.0000000000000000000
[ 5] Re: 11.9999999999989139000 Im: 0.0000000000000000000
[ 6] Re: 13.0000000000011665000 Im: 0.0000000000000000000
[ 7] Re: 13.9999999999993683000 Im: 0.0000000000000000000
[ 8] Re: 15.0000000000001392000 Im: 0.0000000000000000000
[ 9] Re: 999999.0000000000000000000 Im: 0.0000000000000000000

Using mathematica online at http://www.mathe-online.at I obtain
a result I can't figure out at all.
13 2
{{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
1]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
2]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
3]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
4]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
5]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
6]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
7]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
8]},

13 2
{x -> Root[-2.59459 e14 + 1.88205 e14x - 5.93542 10 #1 +

13 3 12 4 10 5
1.06306 10 #1 - 1.18278 10 #1 + 8.37212 10 #1 -

9 6 7 7 6 8 9
3.68208 10 #1 + 9.20037 10 #1 - 1.00009 10 #1 + #1 & ,
9]}}


Anyone there tell me what I am doing wrong?

Thanks in advance

jacob

Hi Jacob,

I do not think you have done anything wrong since the solution returned
by Mathematica is valid: Root objects are an exact symbolic
representation of a solution (same thing as in Maple, see Axel Vogt
email), which are returned by the built-in function Solve.

However, the results returned by Mathematica 5.2 for Windows (on my
computer) are the correct numerical values. I tried to check the online
version you used but to no avail: I had been repeatedly unable to
connect to the server (time out error) before I gave up and wrote this
email.

Solve[x9 - 1000092*x8 + 92003682*x7 - 3682083720*x6 + 83721182769*x5 -
1182779630508*x4 + 10630567354028*x3 - 59354216204400*x2 +
1.882046594592*1014*x - 2.594592*1014 == 0, x]

returns

{{x -> 7.999999999973662}, {x -> 9.000000000257524}, {x ->
9.999999998875227}, {x -> 11.000000002819503}, {x -> 11.99999999566689},
{x -> 13.000000004035554}, {x -> 13.999999997912402}, {x ->
15.000000000459247}, {x -> 1.*^6}})

To get more info on Root objects in Mathematica, see
http://documents.wolfram.com/mathematica/functions/Root

HTH,
Jean-Marc
Back to top
Julian V. Noble
science forum Guru Wannabe


Joined: 03 May 2005
Posts: 148

PostPosted: Sun Jul 16, 2006 9:46 pm    Post subject: Re: Polynomial solving Reply with quote

Julian V. Noble wrote:
Quote:
jacob navia wrote:
Given
x9 - 1000092x8 + 92003682x7 - 3682083720x6 + 83721182769x5 -
1182779630508x4 + 10630567354028x3 - 59354216204400x2 +
1.882046594592e14x - 2.594592e14 = 0

Using a solver using the Jenkings-Traub method (from the page of
the math wizard C. Bond: http://www.crbond.com/download/misc/rpoly.cpp)
I obtain
[ 1] Re: 8.0000000000000067400 Im: 0.0000000000000000000
[ 2] Re: 8.9999999999999727200 Im: 0.0000000000000000000
[ 3] Re: 9.9999999999999436200 Im: 0.0000000000000000000
[ 4] Re: 11.0000000000004890000 Im: 0.0000000000000000000
[ 5] Re: 11.9999999999989139000 Im: 0.0000000000000000000
[ 6] Re: 13.0000000000011665000 Im: 0.0000000000000000000
[ 7] Re: 13.9999999999993683000 Im: 0.0000000000000000000
[ 8] Re: 15.0000000000001392000 Im: 0.0000000000000000000
[ 9] Re: 999999.0000000000000000000 Im: 0.0000000000000000000


Using Laguerre's method with an initial guess of z = 50 + i0
I get (I set the output to 10 places)

1.500000000E1 + i 0.000000000E-1
1.400000000E1 + i 0.000000000E-1
1.300000000E1 + i 0.000000000E-1
1.200000000E1 + i 0.000000000E-1
1.099999999E1 + i 0.000000000E-1
1.000000001E1 + i 0.000000000E-1
8.999999998E0 + i 0.000000000E-1
1.000000000E6 + i 0.000000000E-1
8.000000000E0 + i 0.000000000E-1

Laguerre's method is discussed in F.S. Acton's book "Numerical
Methods that (Usually) Work".

Thanks for a nice, demanding test case.


I should have mentioned that my Forth program for Laguerre's method
is much shorter than Bond's C program, 206 vs 739 lines.

It was also very fast.

--
Julian V. Noble
Professor Emeritus of Physics
University of Virginia
Back to top
Paul Abbott
science forum addict


Joined: 19 May 2005
Posts: 99

PostPosted: Mon Jul 17, 2006 9:33 am    Post subject: Re: Polynomial solving Reply with quote

In article <44ba8176$0$865$ba4acef3@news.orange.fr>,
jacob navia <jacob@jacob.remcomp.fr> wrote:

Quote:
Given
x9 - 1000092x8 + 92003682x7 - 3682083720x6 + 83721182769x5 -
1182779630508x4 + 10630567354028x3 - 59354216204400x2 +
1.882046594592e14x - 2.594592e14 = 0

Using a solver using the Jenkings-Traub method (from the page of
the math wizard C. Bond: http://www.crbond.com/download/misc/rpoly.cpp)
I obtain
[ 1] Re: 8.0000000000000067400 Im: 0.0000000000000000000
[ 2] Re: 8.9999999999999727200 Im: 0.0000000000000000000
[ 3] Re: 9.9999999999999436200 Im: 0.0000000000000000000
[ 4] Re: 11.0000000000004890000 Im: 0.0000000000000000000
[ 5] Re: 11.9999999999989139000 Im: 0.0000000000000000000
[ 6] Re: 13.0000000000011665000 Im: 0.0000000000000000000
[ 7] Re: 13.9999999999993683000 Im: 0.0000000000000000000
[ 8] Re: 15.0000000000001392000 Im: 0.0000000000000000000
[ 9] Re: 999999.0000000000000000000 Im: 0.0000000000000000000

Using mathematica online at http://www.mathe-online.at I obtain
a result I can't figure out at all.

GIGO. Converting xn to x^n and en to multiplication by 10^n, and using

Solve[x^9 - 1000092 x^8 + 92003682 x^7 - 3682083720 x^6 +
83721182769 x^5 - 1182779630508 x^4 + 10630567354028 x^3 -
59354216204400 x^2 + 1.882046594592 10^14 x - 2.594592 10^14 == 0]

one obtains

{{x -> 7.999999999973662}, {x -> 9.000000000257524},
{x -> 9.999999998875227}, {x -> 11.000000002818322},
{x -> 11.999999995670619}, {x -> 13.000000004031348},
{x -> 13.999999997914518}, {x -> 15.000000000458785},
{x -> 1.*^6}}

Alternatively, Factor the "exact" polynomial

Factor[ x^9 - 1000092 x^8 + 92003682 x^7 - 3682083720 x^6 +
83721182769 x^5 - 1182779630508 x^4 + 10630567354028 x^3 -
59354216204400 x^2 + 188204659459200 x -259459200000000 ]

to obtain

(-1000000 + x)*(-15 + x)*(-14 + x)*(-13 + x)*(-12 + x)*(-11 + x)*
(-10 + x)*(-9 + x)*(-8 + x)

Cheers,
Paul

_______________________________________________________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Thu Aug 17, 2017 3:59 am | All times are GMT
Forum index » Science and Technology » Math » num-analysis
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Entire functions, polynomial bounds david petry Math 2 Thu Jul 20, 2006 11:09 pm
No new posts inverting a cubic polynomial as a series pluton Math 6 Tue Jul 18, 2006 4:54 am
No new posts Solving exponential inequality: a^x + b = c^x ??? Angelina.Paris@gmail.com1 Math 7 Mon Jul 17, 2006 3:51 am
No new posts Solving a polynomial jacob navia Symbolic 6 Sun Jul 16, 2006 5:51 pm
No new posts Constructing a (GF(2^m)) polynomial from its roots using ... jaco.versfeld@gmail.com Math 2 Mon Jul 10, 2006 9:10 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0908s ][ Queries: 16 (0.0172s) ][ GZIP on - Debug on ]