[SciPy-Dev] Comments on optimize.newton function

Gökhan Sever gokhansever at gmail.com
Mon May 23 02:21:09 EDT 2011


On Sun, May 22, 2011 at 9:13 PM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
> I'm not so confidant about the rh >= 1 case, but I've attached an example
> for rh = .95, rd=1e-8. The light blue line is the lhs from above, the labled
> lines are for the rhs and different values of kappa. The heavy horizontal
> line is the rh and the bracket I was suggesting was between the zero of the
> rhs at x=rd and its crossing with the rh line. There are corner cases here
> depending on the parameter values, so this probably needs more exploration,
> there might be cases with two zeros.
>
> Also same thing with rd=1.5e-6. Note that the zero is very near the upper
> limit.
>
> I suspect there will none or two zeros in the supersaturated case.
>
> Chuck

Thanks for spending your time and producing those plots. Could you
please provide the code that you used to create the figures? This
might help me to better understand some of the points you have made in
your latest reply.

Your comment on having no or two zero worries me a bit. I can't easily
see how apart these two zeros from each if they ever exist. One of
them could be unrealistic to easily disregard, but yet to verify this
claim.

I went ahead and tested the secant and fsolve solvers to see if they
produce any significant differences in terms of the root they return.
I assume fsolve is a more robust solver. You can see this comparison
in the attached figure. I use a tolerance value of 1.e-20 for both
solvers. Again this comparison is based on the estimate of about 20k
different values. Most of the difference is zero. I focused in to a
more interesting part of the figure. Still the difference is about
1.e-17 which is quite insignificant.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: solver_comparison.png
Type: image/png
Size: 78615 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110523/0224ca5d/attachment.png>


More information about the SciPy-Dev mailing list