MathGroup Archive 1995

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

Search the Archive

Re: numerical roots of a polynomial

  • To: mathgroup at
  • Subject: [mg1204] Re: numerical roots of a polynomial
  • From: danl (Daniel Lichtblau)
  • Date: Tue, 23 May 1995 02:57:37 -0400
  • Organization: Wolfram Research, Inc.

In article <3pjkiu$7h0 at>  
Sigurd.Schelstraete at (Sigurd Schelstraete) writes:
> hello,
> does anyone know if there exists a package/function that allows one to  
> (numerically) all n roots of a polynomial of degree n, whether they are 
> real or not? Since NSolve seems to be equivalent to N[Solve], it can not 
> be used for generic polynomials of fifth degree or higher. Also the 
> function FindRoot only allows one to find a single root near a given 
> starting value (which can be complex though).
> What I would like, is a function that returns the numerical values of  
> n roots as a list of substitution rules, as does Solve or NSolve. 
> I guess it could be done by successively dividing out a single root  
> with FindRoot, but I'd rather first hear if anyone out there already has 
> a clear-cut solution to this problem. 
> All answers are appreciated.
> Greetings,
> Sigurd Schelstraete
> University of Gent
> Belgium 

  NSolve will indeed do this in versions 2.0 and later. For example,

In[2]:= NSolve[x^5+x+3==0, x]

Out[2]= {{x -> -1.133}, {x -> -0.475381 - 1.1297 I}, 
>    {x -> -0.475381 + 1.1297 I}, {x -> 1.04188 - 0.82287 I}, 
>    {x -> 1.04188 + 0.82287 I}}

For higher precision, use
NSolve[..., WorkingPrecision->...]

  Daniel Lichtblau, WRI

  • Prev by Date: Declaring Variables as Real?
  • Next by Date: Re: Graphic Bugs
  • Previous by thread: Re: numerical roots of a polynomial
  • Next by thread: Re: BackGround Job