Non-negative roots in Newton Raphson Method

1.4k Views Asked by At

I am trying to numerically find the roots of a multivariate function using Newton-Raphson method. The function is such that it does not admit negative values of one of the parameter, the function cannot be evaluate to real values at such points. As I run the algorithm the code runs into problem because whenever I get a negative value of the parameter as the root, from some initial guess, the model cannot be evaluated and hence the iteration cannot continue.

The model is the Weibull Distribution, $f(v)=(k/\lambda)(x/\lambda )^{(k-1)} (e^{(x/\lambda)})^{k}$. Here, $k$ & $\lambda$ are required to be greater than or equal to zero.

So my question is: As the algorithm for NewtonRaphson method runs, how do I stop the algorithm to avoid negative roots in successive iterations? I figured simply taking their modulus is probably not the right way to do it.

One possible way that I figured was to start with a another guess but that does not seem like a viable solution and it might possibly be time consuming.