[SciPy-user] Solving an equation using scipy.optimize.newton

dmitrey openopt@ukr....
Wed Sep 5 10:41:53 CDT 2007


one of possible solutions - try to minimize f(x)^2, subjected to 
constraints lb, ub, via solver lbfgsb or tnc
D


fdu.xiaojf@gmail.com wrote:
> Hi all,
>
> I'm trying to solve an equation f(x) = 0 with scipy.optimize.newton.
>
> However the problem isn't so simple. There are bound constraints for my 
> equation: the equation cannot be evaluated when x is out of [Min, Max], but 
> the root is always in the interval of [Min, Max]
>
> When newton() iterates to find a root, it sometimes try to evaluate the 
> equation with a x out of [Min, Max], and then error occurs.
>
> How to solve this problem ?
>
> I couldn't easily find two points with different signs every time, so methods 
> like brentq don't work here.
>
> Thanks a lot!
>
> Regards
>
>
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
>
>   



More information about the SciPy-user mailing list