janverschelde / PHCpack

The primary source code repository for PHCpack, a software package to solve polynomial systems with homotopy continuation methods.
http://www.phcpack.org
GNU General Public License v3.0
59 stars 21 forks source link

complex coefficients #16

Open berceanu opened 7 years ago

berceanu commented 7 years ago

Does PHCpy support solving systems of nonlinear equations with complex variables, or do I have to split them into real and imaginary parts before feeding them to the solver?

berceanu commented 7 years ago

I should perhaps also mentions that the variables sometimes appear as complex conjugate, ie. z1 * z2 *conj(z1) + 2 * |z2|^2 * z1 + ... = 0 .. more equations ..

janverschelde commented 7 years ago

Instead of separating real and imaginary parts, you could consider the polar representation of a complex number x as x = absxexp(iargx) = rxax. The complex conjugate of x is then written as absxexp(i(-argx) = rx(ax^(-1)). The advantage of this representation over the splitting in real and imaginary parts is that the polynomials will remain sparse. The software supports Laurent polynomials, which are polynomials with negative exponents.

berceanu commented 7 years ago

So if I understand correctly, you suggest to replace $x$ by $r a$ and $x^{\star}$ by $r a^{-1}$, where $r = |x|$ and $a = \exp(i \arg(x))$ and solve for $r$ and $a$ as independent variables? Wouldn't that result in the same number of equations for twice as many variables? Also, is there a way to impose the conditions that $r \geq 0$ and $|a|^2 = 1$?

berceanu commented 7 years ago

I think I don't understand the rxax notation, actually.