Post Reply 
Oddity with fsolve, nSolve, etc.
01-11-2014, 05:10 AM
Post: #12
RE: Oddity with fsolve, nSolve, etc.
Yes, there should be an "x" as the second argument; that is correct; however, you can write "x=single value" or x="range" as a shorthand.

And fsolve(x^3-3*x^2+4,x,-1.5..2.5) still gives the same incorrect result [-1 0. 2].

Do you believe me now that 2 is a double root? (Also called a degenerate root, by the way). And that multiple roots can be returned by fsolve and nSolve?

But thanks for pointing out that fsolve(eq, x) returns all three roots (even though 2 is not returned exactly, but since fsolve is a numerical command, that is close enough for me).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Oddity with fsolve, nSolve, etc. - Helge Gabert - 01-11-2014 05:10 AM



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