Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: [mg5070] [Q] FindRoot & large system of eqns
Posted:
Oct 30, 1996 12:18 AM


> I am a new user of the student edition of mathematica. I am trying to use > it to solve a large system of nonlinear equations using FindRoot in the > form of: > > FindRoot[{eqn1==something,eqn2==somethingelse,...},{x1,0},{x2,0}] > > I have 16 equations and 16 unknowns, as is required, but it seems no matter > how many of the system variables that I provide initial guesses for, > mathematica always seems to state that my system is somehow not properly > defined, guessed for...etc. > > Does someone have a good, straightforward example for FindRoot applied to > a large nonlinear system? If so, please email it to me at
The function you should use is Solve.
In[1]:= ?Solve Solve[eqns, vars] attempts to solve an equation or set of equations for the variables vars. Solve[eqns, vars, elims] attempts to solve the equations for vars, eliminating the variables elims.
Here is a nonlinear example of its use:
In[2]:= Solve[{x^2  2y == 0, 3y^2 + x  1 == 2}, {x,y}]
(The output of this is rather lengthy, so I am not including it here.) This will give you a solution in the form of a rule (x > something). So if you need those solutions to manipulate later, you should do something like this (with a simpler example):
In[9]:= Solve[{x + y == 1, x  y == 3}, {x,y}]
Out[9]= {{x > 2, y > 1}}
In[10]:= {x, y} /. %
Out[10]= {{2,1}}
FindRoot is used for searching for a numerical solution to a single equation. It uses a variant of Newton's method and hence requires some initial guesses to get it started. It will use a secant method if you provide two initial guesses.
Hope this helps.
 Paul Wellin Academic/Business Liaison Wolfram Research, Inc. 100 Trade Center Drive Champaign, IL 61820
phone: 2173980700 fax: 2173980747 email: wellin@wolfram.com



