Post Reply 
Oddity with fsolve, nSolve, etc.
01-11-2014, 02:31 AM
Post: #2
RE: Oddity with fsolve, nSolve, etc.
(01-11-2014 01:06 AM)Helge Gabert Wrote:  In CAS view,

there appears to be a problem with displaying the zeros of functions with multiple roots, e.g., I ran into this oddity recently:

fsolve(x^3-3*x^2+4=0, x=-1.5..2.5)

nSolve(x^3-3*x^2+4=0, x=-1.5..2.5)

both return [-1 0. 2.] Here the solution 0. is clearly incorrect.

I don't think nSolve is meant to return multiple solutions, but only a single solution based on a guess that is closest to that root. So,

nSolve(x^3-3*x^2+4=0, x=0) returns the single value -1.000

and

nSolve(x^3-3*x^2+4=0, x=0.5) returns the single value 2.000

both assuming Number Format is Fixed 3.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Oddity with fsolve, nSolve, etc. - Michael de Estrada - 01-11-2014 02:31 AM



User(s) browsing this thread: 2 Guest(s)