[Date Index]
[Thread Index]
[Author Index]
Re: [Q] FindRoot & large system of eqns
*To*: mathgroup at smc.vnet.net
*Subject*: [mg5099] Re: [mg5070] [Q] FindRoot & large system of eqns
*From*: "Paul R. Wellin" <wellin>
*Date*: Wed, 30 Oct 1996 22:03:48 -0500
*Sender*: owner-wri-mathgroup at wolfram.com
> I am a new user of the student edition of mathematica. I am trying to use
> it to solve a large system of non-linear 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, straight-forward example for FindRoot applied to
> a large non-linear system? If so, please e-mail 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: 217-398-0700
fax: 217-398-0747
email: wellin at wolfram.com
Prev by Date:
**Re: Integration..Constants**
Next by Date:
**Re: Solve results**
Previous by thread:
**Re: [Q] FindRoot & large system of eqns**
Next by thread:
**tick labels in 2-D plots**
| |