Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a system of 6 non-linear (quadratic) coupled equations with 6 complex unknowns

\begin{align*} |x_1|^2 + |x_2|^2 + |x_3|^2 &= a\\ x_1 x_4^* + x_3 x_5^* &= b + c i\\ x_1 x_6^* &= d + e i\\ |x_4|^2 + |x_5|^2 &= f\\ x_4 x_6^* &= g + h i\\ |x_6|^2 &= k \end{align*}

{Abs[x1]^2 + Abs[x2]^2 + Abs[x3]^2 == a,
 x1 Conjugate[x4] + x3 Conjugate[x5] == b + c I,
 x1 Conjugate[x6] == d + e I,
 Abs[x4]^2 + Abs[x5]^2 == f,
 x4 Conjugate[x6] == g + h I,
 Abs[x6]^2 == k}

where $x_1$ etc. are complex variables, $x_1^*$ is Conjugate[x1], $|x|$ is Abs[x], and a etc. are real constants. The equations are probably underdetermined - if you break them into real and imaginary parts, there are only 9 equations for 12 real unknowns. Physically (since these equations solves for parameters in a model) I expect some phases in the $x_i$ are not physical (i.e. some $x_i$ are actually real numbers instead of complex), but I don't know a good way to parametrize the phases away.

NSolve[{eqns}, {vars}, Complexes] has been running for more than 10 minutes (and still running!). I've never encountered numerical equation solving with coupled non-linear equations before, so I don't know what to expect. Is there anything I can do to optimize the process? What other numerical solving functions can I try?

Also, probably off-topic here: I am under the impression that numerics is not Mathematica's strong suit; should I seek out other programs to solve this problem? Recommendations?

share|improve this question
    
Your impression is wrong, Mathematica numerics is very strong. Since you haven't included your equations I doubt you'll find any help besides adequate links e.g. reference.wolfram.com/mathematica/tutorial/… –  Artes Nov 18 '12 at 2:49
1  
You haven't even said if your equations are algebraic or transcendental, so there's really nothing much that can be said by us... –  J. M. Nov 18 '12 at 3:24
    
I did say quadratic equations. I'll post the actual equations. –  polyglot Nov 18 '12 at 3:32
2  
NSolve cannot run with symbolic parameters. But you did not give any numerical values to a, b, c, etc. Why not to split them in 9 real equations and solve symbolically for 9 real variables in terms of 3 variables and parameters? Then you can research symbolically domains of possible solutions. –  Vitaliy Kaurov Nov 18 '12 at 6:01

1 Answer 1

Also, probably off-topic here: I am under the impression that numerics is not Mathematica's strong suit; should I seek out other programs to solve this problem? Recommendations?

My experience is that Mathematica can solve a set of numerical equations with 10.000 and more equations in about 0.5-1 sec. These are huge but linear equations. I use this feature in my software, TIMO Structural, based on Mathematica. I do not know of any other universal system that is so powerful. (I worked with Maple for many years and I know what I'm talking about).

Please explain what is the reason for using the Abs[arg] function in the expression:

Abs[x1]^2 + Abs[x2]^2 + Abs[x3]^2 == a
share|improve this answer
    
Well, linear equations are a very different matter. Still, interesting to hear about your experience with Maple... serious users of both that and Mathematica seem to be few and far between. –  Oleksandr R. Nov 26 '12 at 9:59
    
Thanks for offer, Oleksandr. It is true I was happy to work with M & M :). The best idea is combine the advantages of each into Tools for solving engineering (science) tasks of industrial level real problems (not one time - three equations research task in mode by hand). Globally in short, Maple is symbolic system, Mathematica - universal. If it is interesting I can to participate in post M vs M or something like this. –  Siarhei A Arlou Nov 28 '12 at 22:45
    
That might be good for a blog post. We're going to have a MATLAB vs. Mathematica comparison/tutorial post at some point, so it would make sense to go the other way and have something about Maple as well. –  Oleksandr R. Nov 29 '12 at 3:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.