[SciPy-Dev] Comments on optimize.newton function

Charles R Harris charlesr.harris at gmail.com
Sun May 22 16:51:10 EDT 2011


On Sun, May 22, 2011 at 2:46 PM, Gökhan Sever <gokhansever at gmail.com> wrote:

> On Sun, May 22, 2011 at 12:00 PM, Charles R Harris <
> charlesr.harris at gmail.com>
> > cpdef double petters_solve_for_rw(double x, double rd, double rh):
> >    return rh*kappa*y**3 - (exp(y*kelvin/rd) - rh) * (1 - y**3)
>
> This last modification is converging faster than the original version,
> but readability of the function is reduced now.
>
> >
> >
> >
> > where x = rd/y. The last might allow you to bracket things fairly easily,
> > i.e., (exp(y*kelvin/rd) - rh) * (1 - y**3) has to be >0 if you expect y>0
>
> "rh" also plays role in determining the sign of the right portion of
> this equation. Throughout the model rh usually goes from 0.95 and pass
> beyond 1.0. This causes a sign change.
>
>
I think the zeros of this function can be bracketed by inspection. What sort
of values do rd, rh, and kappa have? What is kelvin?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20110522/136dfcfa/attachment.html>


More information about the SciPy-Dev mailing list