MathGroup Archive 2003

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

Search the Archive

Re: Emergent Help: NSolve Problems!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39770] Re: Emergent Help: NSolve Problems!
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 7 Mar 2003 03:30:05 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b46tqk$91h$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

when I plug in all solutions with

In[]:=temp[s_] = s^10 + 10 s^9 + 10 s^8 + 10 s^7 + 10 s^6 + 10 s^5 + 10
s^4 + 1;
sol = NSolve[temp[s] == 0, s];
temp[s] /. sol

Out[]={-9.5367431640625*^-7, 1.6653345369377348*^-14, 
 -6.661338147750939*^-16 - 2.4424906541753444*^-15*I, 
 -6.661338147750939*^-16 + 2.4424906541753444*^-15*I, 
 1.1015494072452725*^-16 - 2.0816681711721685*^-17*I, 
 1.1015494072452725*^-16 + 2.0816681711721685*^-17*I, 
 1.240327285323417*^-16 - 2.1521413123837263*^-16*I, 
 1.240327285323417*^-16 + 2.1521413123837263*^-16*I, 
 -4.9960036108132044*^-15 + 6.8833827526759706*^-15*I, 
 -4.9960036108132044*^-15 - 6.8833827526759706*^-15*I}

Mathematica print less digits than it use and you can't/should not
retype the output 

Regards
  Jens


Chengzhou Wang wrote:
> 
> Hi, guys
> 
> I have some complicated polynomials, and I want to calculate its roots.
> HOwever, when I use NSolve, it creates some problems. Say a simple
> example:
> 
> temp[s_]=s^10+10 s^9+ 10 s^8 +10 s^7 +10 s^6+ 10 s^5 +10 s^4 +1;
> NSolve[temp[s]==0, s]
> 
> It will give:
> 
> Out[4]= {{s -> -8.99998}, {s -> -1.06539}, {s -> -0.468828 - 0.886239 I},
> 
> >    {s -> -0.468828 + 0.886239 I}, {s -> -0.409684 - 0.469948 I},
> 
> >    {s -> -0.409684 + 0.469948 I}, {s -> 0.401048 - 0.312597 I},
> 
> >    {s -> 0.401048 + 0.312597 I}, {s -> 0.51015 - 0.878693 I},
> 
> >    {s -> 0.51015 + 0.878693 I}}
> 
> But when I plug in the first number, which is "-8.99998", it should give a
> value close to zero. However, it gives:
> 
> In[5]:= temp[-8.99998]
> Out[5]= -411.473
> 
> The other roots seems OK. Does anyone know why? This is just a simple
> example. I have some more complicated polynomials to deal with.
> 
> Thanks in advance!
> 
> PS: Please reply (cc) to my email. I did not subscribe my email to the
> this email group!
> 
> --
> Chengzhou


  • Prev by Date: Re: Emergent Help: NSolve Problems!
  • Next by Date: RE: Emergent Help: NSolve Problems!
  • Previous by thread: Re: Emergent Help: NSolve Problems!
  • Next by thread: RE: Emergent Help: NSolve Problems!