I'm trying to solve a system of nonlinear equations using scipy.optimize.root()
One of the equations contains a power like x[5]**epsilon
, where epsilon is a parameter. For epsilon=1
I manage to find the roots, but for any different epsilon around 1
, I cannot. I get NaN
somewhere along the process, which I presume comes from the solver trying out negative values and getting NaN
for that.
Is there any way to furthermore restrict the solver, as in telling him x[5] >= 0
or similar? I know that scipy's minimization tools can use these boundaries, but I fail to find anything like that in the documentation for root
.