Question about solve function for system of non linear equations
06-04-2014, 09:37 PM (This post was last modified: 06-04-2014 10:18 PM by Rich.)
Post: #1
 Rich Junior Member Posts: 47 Joined: Jan 2014
Question about solve function for system of non linear equations
Hi,

Is there a better way to solve a system of equations on the Prime.

When entering:
solve([1=a*b 1=a*(-b^2+1)^.5], [a b])

I am getting an error:

"[b, SQRT(-b^2+1)] is not rational w.r.t. b Error Bad Argument Value" (the SQRT was an actual square root symbol)

I am able to do the example in the user manual without any issues but the above system of equations is giving me an error.

Of course doing it by hand i can get {[a = 0.7071067812, b= 1.414213562]}

Thanks...
06-04-2014, 09:39 PM (This post was last modified: 06-04-2014 09:42 PM by Rich.)
Post: #2
 Rich Junior Member Posts: 47 Joined: Jan 2014
RE: Question about solve function for system of non linear equations
... actually testing out and using fsolve instead of solve gave me the right answer. nSolve gave me the hour glass for a while...

: (

I keep on forgetting that fsolve is for numeric results, it would be nice to have that in the drop down list in the CAS menu for those of us who are absent minded : (
06-05-2014, 12:15 AM (This post was last modified: 06-05-2014 12:15 AM by CR Haeger.)
Post: #3
 CR Haeger Member Posts: 275 Joined: Dec 2013
RE: Question about solve function for system of non linear equations
(06-04-2014 09:39 PM)Rich Wrote:  ... actually testing out and using fsolve instead of solve gave me the right answer. nSolve gave me the hour glass for a while...

: (

I keep on forgetting that fsolve is for numeric results, it would be nice to have that in the drop down list in the CAS menu for those of us who are absent minded : (

Hmm can you show the fsolve() equation that worked? I get an hourglass then reboot with: fsolve([a*b=1,a*(1-b^2)^0.5=1],[a,b],[1,1])

I do use fsolve() often enough that I made it a USER key.
06-05-2014, 12:35 AM (This post was last modified: 06-05-2014 01:09 AM by Rich.)
Post: #4
 Rich Junior Member Posts: 47 Joined: Jan 2014
RE: Question about solve function for system of non linear equations
Oh sure, no problem,

fsolve([1=a*b 1=a*(-b^2+1)^.5], [a b])

Where [] indicates a matrix with separated elements by pressing , (comma), so the commas are not shown in my equation above. Image attached.

I want to setup user keys, but i really wish it was available to assign to "soft menu" keys like in the 50g, otherwise i might forget what key is what. This is probably one of my top request to have in the Prime, that an undo key, and maybe a better way to store equations.
06-05-2014, 05:44 AM
Post: #5
 parisse Senior Member Posts: 1,011 Joined: Dec 2013
RE: Question about solve function for system of non linear equations
This was implemented recently in giac (exact solving I mean, fsolve works), so you'll have to wait for an update on the Prime...
 « Next Oldest | Next Newest »

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