Re: Beware of NSolve - nastier example
- To: mathgroup at smc.vnet.net
- Subject: [mg50414] Re: Beware of NSolve - nastier example
- From: carlos at colorado.edu (Carlos Felippa)
- Date: Thu, 2 Sep 2004 04:34:54 -0400 (EDT)
- References: <200408200858.EAA12533@smc.vnet.net> <email@example.com> <200408280837.EAA19074@smc.vnet.net> <200408311028.GAA18653@smc.vnet.net> <firstname.lastname@example.org> <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
DrBob <drbob at bigfoot.com> wrote in message news:<ch3olv$33$1 at smc.vnet.net>...
> Oops, in my last paragraph I claimed convergence for a wider range of starting values than I actually get. (I had a typo when doing some of the tests.) 0.003`n to 0.04`n looks fine. At least it converges for SOME input, which is more than the raw Newton iteration can do.
> Of course, I used Solve to get the h function--the same Solve routine that solved the original problem already!
No problem whatsoever for conventional NR in 16-digits
(double precision) if you are sufficiently near a root. Just run this
NR iteration, which is at the level of the homeworks I assign to
Print[N[Solve[f==0,x]]//InputForm]; (* gives 3 correct roots *)
xn=0.0100529100415; (* the slippery root *)
n=10; (* actually n=3 is enough to get limit accuracy *)
For [i=1,i<=n,i++, r=N[f/.x->xn]; fp=N[fprime/.x->xn];
The derivative f' is large, O(10^13) whereas the residual goes down to
O(10^(-4)). The interval where NR converges to that root is tiny, of
O(10^(-10), but finite. If one tries single precision (~ 6-7 digits)
NR fails, as noted by Daniel Lichtblau, since the convergence
interval falls in the noise.
What is a bit surprising to me is that NSolve applied directly to f,
(not as N[Solve][..]]) needs 128-digit working precision to resolve
Prev by Date:
Sorting (again!), but with multiple columns
Next by Date:
Martix reconstruction by tensors of nonlinearity in an interger sequence
Previous by thread:
Re: Re: Re: Beware of NSolve - nastier example
Next by thread:
Re: Re: Beware of NSolve - nastier example