Path: news.mathworks.com!not-for-mail
From: "carlos lopez" <clv2clv_00000000_@adinet.com.uy>
Newsgroups: comp.soft-sys.matlab
Subject: Re: nonlinear system of equations
Date: Sun, 9 Mar 2008 21:41:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <fr1lhg$acb$1@fred.mathworks.com>
References: <fquc16$r4u$1@fred.mathworks.com>
Reply-To: "carlos lopez" <clv2clv_00000000_@adinet.com.uy>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205098864 10635 172.30.248.38 (9 Mar 2008 21:41:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 9 Mar 2008 21:41:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 870136
Xref: news.mathworks.com comp.soft-sys.matlab:456232


"Dmitry Dmitry" <klio2003@list.ru> wrote in message 
...
> 2) The accuracy required is very high
> 
> FSOLVE function doesn't provide the accuracy I need (the 
> relative error between the known and found solutions is 
> >10%). 

Hello Dmitry:
There are two standard metrics for measuring "suitability"
for an approximate solution:
a) check how close to zero is the current solution
b) check how close to the exact one is the current solution

In order to have an estimate for b) you need to expand the
nonlinear vector function and truncate. Thus, you will need
the Jacobian, and indirectly its condition number will play
a role.

The other option does not provide any cue about how close
are you to the exact solution. In some cases (I have
suffered from that) requiring the "relative change" to be
below a prescribed, low level, is not a wise idea. 
The reason arises when (at least in my case) there exist
severe cancellation and shift out, thus precluding to
improve the results using double precision. To make things
worse, such pathology IS NOT related with the condition
number of anything, but with the deep limitations of the
number system.
In my case (which might serve for others) I managed to
recalculate the residual (i.e. option a)) using
higher-than-double precision. Despite tiny, the changes
close to the solution were significant enough to make again
valid all the math behind the algorithms.
Hope this helps
Regards
Carlos
PD: as a higher-than-double precision I can mention the
Multiple Precision Toolbox by Ben barrowes, available on the FEX