Finding complex roots from set of non-linear equations in python
I have been testing an algorithm that has been published in literature that involves solving a set of 'm' non-linear equations in both Matlab and Python. The set of non-linear equations involves input variables that contain complex numbers, and therefore the resulting solutions should also be complex. As of now, I have been able to get pretty good results in Matlab by using the following lines of code: lambdas0 = ones(1,m)*1e-5; options = optimset('Algorithm','levenberg-marquardt',... 'MaxFunEvals',1000000,'MaxIter',10000,'TolX',1e-20,... 'TolFun',1e-20); Eq = @(lambda)maxentfun(lambda,m,h,g);