Post Reply 
Oddity with fsolve, nSolve, etc.
01-11-2014, 04:00 AM (This post was last modified: 01-11-2014 04:46 AM by Michael de Estrada.)
Post: #9
RE: Oddity with fsolve, nSolve, etc.
(01-11-2014 03:05 AM)Helge Gabert Wrote:  for nSolve, look in the XCAS documentation.

Chapter 4.4, p.359 of the XCAS manual "solve equations with fsolve nSolve". Clearly fsolve and nSolve use the same syntax and argument structure.

But, is XCAS fully implemented in the Prime ? IIRC, CAS in the Prime is not quite the same animal as full blown XCAS.

BTW, your syntax for fSolve is incorrect. It should be fSolve(Expr,Var,[Guess],[Method]), where the second parameter is the variable and the third is the optional guess or range. So:

fsolve(x^3-3*x^2+4=0,x), which yields the correct result [-1.000 1.998 2.002]

Also:

solve(x^3-3*x^2+4=0,x) yields the same correct result {-1.000 1.998 2.002}

Now, this was with Exact unchecked in CAS Settings, but if I check Exact, then I get {-1,2} for solve, but still get [-1.000 1.998 2.002] for fsolve, so solve is affected by Exact but fsolve is not.

So, if you want to see all the roots, including double roots, then you just need uncheck Exact in CAS Settings.
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 04:00 AM



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