Which C++ library is prefect in solving non-linear set of equations with complex roots?

Hi
I am developing a small kinetic Monte Carlo code to study atomic evolutions in a material and need to solve several linear and non-linear equations with a high accuracy. My main issue is in finding complex roots of a non-linear equation. Which C++ library is perfect for solving a non-linear set of equations with complex roots? I am already using Eigen and Ceres in my codes, but it seems that they only can find "real" roots and not "complex" ones. All recommendations and ideas are appreciated in advance.

For example, Eigen provides a nonlinear optimization module, https://eigen.tuxfamily.org/dox/unsupported/group__NonLinearOptimization__Module.html which uses (1)Levenberg Marquardt algorithm and (2)Powell hybrid "dogleg" method to find roots and extremums of a nonlinear set of equations. As far as I know, these methods can't find complex roots if any.
Last edited on
You need to be considerably more specific to get a meaningful answer.

Are you trying to find roots or optimise? One equation or many? What have Monte-Carlo methods to do with root-finding?

Fundamentally, what equation are you trying to solve?
Hi,

I mentioned that my main goal is finding "roots" and not optimization. And also, I believe that a set of equations means more than 1 equation need to be solved at a time (n equations with n variables).

Example:

(x1^2+4)+(x^2+9) ---> x1=2i & -2i and x2=3i & -3 i;

UPDATE1:

I found a Newton-like method in the following paper,

http://en.kujss.com/index.php/archives/35-kujss-2010-vol-5-no-1/188-a-new-technique-to-compute-complex-roots

but as now, I have only been able to solve 1 equation with 1 variable and find its complex roots.
@koma113,
Your equations as written don't make sense. I would hazard a guess that they are actually the pair of equations
x1^2 + 4 = 0
x2^2 + 9 = 0

Now, first of all, these are completely decoupled equations, so you simply solve them independently. Secondly, they are just quadratics, which can be solved by formula (using a complex square root).

Thus, you don't need any fancy libraries to solve these.

So, please be more specific about the precise type of equations that you want to solve.
or you could take the =0 away and try to see if you can solve them to intersect?

Topic archived. No new replies allowed.