Non-linear system of eqtns
01-27-2015, 08:16 PM
Post: #1
 Offroad Junior Member Posts: 25 Joined: Jan 2015
Non-linear system of eqtns
Dear friends,

WOuld you be kind enough as to teach me how to solve systems of equations like this one and larger using the Prime?

z*y - x^2 + y = -53
x^2 + y^2 - z = 47
x*y - x + z = -11

initial guess would be {x,y,z}={1,5,0}

Thank you
01-27-2015, 08:57 PM (This post was last modified: 01-27-2015 09:03 PM by Han.)
Post: #2
 Han Senior Member Posts: 1,882 Joined: Dec 2013
RE: Non-linear system of eqtns
purge(x,y,z);
eq1:=z*y - x^2 + y = -53;
eq2:=x^2 + y^2 - z = 47;
eq3:=x*y - x + z = -11;
soln:=fsolve([eq1,eq2,eq3],[x,y,z]=[1,5,0]);

subst(eq1,[x,y,z]=soln);
subst(eq2,[x,y,z]=soln);
subst(eq3,[x,y,z]=soln);

In each of these three cases, the left hand side should equal the right hand side (or be very close).

Finally, delete the variable 'soln' and the three equations (if you no longer need them):

purge(soln,eq1,eq2,eq3);

EDIT: forgot to mention this should be done in CAS view.

Graph 3D | QPI | SolveSys
01-27-2015, 09:04 PM
Post: #3
 Maro Member Posts: 67 Joined: May 2014
RE: Non-linear system of eqtns
or simply use the Solve App ...
01-27-2015, 09:08 PM
Post: #4
 Han Senior Member Posts: 1,882 Joined: Dec 2013
RE: Non-linear system of eqtns
(01-27-2015 09:04 PM)Maro Wrote:  or simply use the Solve App ...

The solve app works just as well. Do keep in mind that it requires you to restrict your variables to either the built-in global variables, or variables which you have created yourself prior to running the app. It also limits you to 10 equations.

If your system is simple, use the solve app. If you have more than 10 equations, then use fsolve in the CAS view.

Graph 3D | QPI | SolveSys
01-27-2015, 09:48 PM
Post: #5
 Offroad Junior Member Posts: 25 Joined: Jan 2015
RE: Non-linear system of eqtns
So simple. Thank you very much. I just ordered mine online.
 « Next Oldest | Next Newest »

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