I don't think that you should rely on the fact that the names are the same. I see from your other question that you are specifying that Matlab's fsolve
use the 'levenberg-marquardt'
algorithm rather than the default. Python's scipy.optimize.fsolve
uses MINPACK's hybrd
algorithms. Levenberg-Marquardt finds roots approximately by minimizing the sum of squares of the function and is quite robust. It is not a true root-finding method like the default 'trust-region-dogleg'
algorithm. I don't know how the hybrd
schemes work, but they claim to be a modification of Powell's method.
If you want something similar to what you're doing in Matlab, I'd look for an optimization scheme that implements Levenberg-Marquardt, such as scipy.optimize.root
, which you were also using in your previous question. Is there a reason why you're not using that?