MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

FindRoot accuracy/precision



Hallo!

I'm running Mathematica 3.0 on a PC (with Windows 95).

I'm trying to use FindRoot to solve the roots for *seven* nonlinear
equations with seven variables.  I use Random to generate seven
(positive real) initial starting points for FindRoot, and continuously
run FindRoot until seven candidate (positive real) roots are found. 

The basic text is as follows:

ok=0; While[ok==0,
ans=FindRoot[eq1==eq2,{x1,Random[Real,x1upper]},
{x2,Random[Real,x2upper]}, (etc.)]; If[Min[ans]>=0, ok=1; Print[ans]]]

In the above text, eq1 is a list of numerical values, and eq2 is a list
of symbolic equations. The problem is that when evaluated (i.e.
eq2/.ans), only *one* of my seven equations appears `close' in value;
this particular equation also yields the largest numerical value
(4*10^2), while the other values should get smaller (all the way down
to 10^-13).  (I know that this large spread in values is part of my
problem.)

So ... how can I get Mathematica to FindRoots more accurately?  My
$MachinePrecision is 16 (which cannot be changed, I believe). 
Precision of eq1 (my numerical values) only seems to be 16.  Is this my
problem (i.e. should this be infinity)?  I've tried changing
WorkingPrecision in FindRoots, but this doesn't seem to have any
effect! 

In essence, I'm trying to find out how the result of FindRoot can yield

eq1 (approximately=) eq2/.ans

Currently, this does *not* occur except for the first element of my
list.  The other elements are sometimes one+ order of magnitude off and
are decreasing in magnitude to order(10^-13).

I'd be grateful for any and all suggestions/advice concerning this
pressing problem of mine!

Thanks in advance!

Mike



  • Prev by Date: Re: New version of PowerSeries.m
  • Next by Date: Re: Efficient use of coefficient--Efficient simplification
  • Prev by thread: Re: New version of PowerSeries.m
  • Next by thread: Re: FindRoot accuracy/precision