Alternatives if Algebra Solver fails to return root?


The implementation of the algebra_solver fails to return root values for a function I am investigating. I initially augment the algebra_solver with a bisection method, i.e. bisection method pre-solves the function, then uses the output as the initial value for the algebra solver… This seems to work better, but it is not a be-all-end-all, i.e. I am still getting wrong roots even if the bisection method hones into the approximate roots.

The function I am solving works well with bracketing methods-- I have tested other root solving routines on MATLAB such as regula falsi, secant and newton-raphson, but gradient based methods fail for some combination of the target function parameters-- I understand that the algebra_solver uses first-order derivatives as well.

What else should I consider for this problem?

You should probably figure out why something like Newton-Raphson doesn’t work, instead of looking for more methods. Maybe it isn’t differentiable or has vanishing gradient.

1 Like

Good point, I’ll see what I can do, thank you.

Sorry to hear you are having problems. It would be easier for us to help you if you provided the actual system you are trying to solve. One thing I have experience with is that algebra_solver can fail when the target is not defined over full \mathrm{R}^n (e.g. when there are some bounds on the allowed parameter values). In such cases it helps to reparametrize so that the variables you solve for are not bounded.