I am new to Mathematica, and I am currently trying to use it to solve a large symbolic system of non-linear equations. I began the code below about 30 hrs ago, and the Mathematica Kernal has been using between 4 and 7GB of RAM since that time.

Is there any chance (at this point) that a solution is still forthcoming? That is, should I continue to let this thing run?

If so, is there any time threshold beyond which a solution is unlikely?

There are currently 22 unknowns, and a bunch of other parameters. An alternative specification of the problem could drop this to 16 unknowns with 16 equations. Would Mathematica be significantly more likely to solve this formulation in a reasonable amount of time?

Here is my code:

Solve[{F1^γ1 L1^(-1 + α1)
  P1 R1^η1 S1^β1 T1^ζ1 α1 - λ - P1 r (S1 θ1 + F1 S1 ι1 + S1 TV1 κ1 + RV1 S1 μ1) == 0,
  -Cs + F1^γ1 L1^α1 P1 R1^η1 S1^(-1 + β1) T1^ζ1 β1 - 
    L1 P1 r (θ1 + F1 ι1 + TV1 κ1 + RV1 μ1) == 0,
  -Cf + F1^(-1 + γ1) L1^α1 P1 R1^η1 S1^β1 T1^ζ1 γ1 - L1 P1 r S1 ι1 == 0,
  F2^γ2 L2^(-1 + α2) P2 R2^η2 S2^β2 T2^ζ2 α2 - λ - 
    P2 r (S2 θ2 + F2 S2 ι2 + S2 TV2 κ2 + RV2 S2 μ2) == 0,
  -Cs + F2^γ2 L2^α2 P2 R2^η2 S2^(-1 + β2) T2^ζ2 β2 - 
  L2 P2 r (θ2 + F2 ι2 + TV2 κ2 + RV2 μ2) == 0,
  -Cf + F2^(-1 + γ2) L2^α2 P2 R2^η2 S2^β2 T2^ζ2 γ2 - L2 P2 r S2 ι2 == 0,
  F3^γ3 L3^(-1 + α3) P3 R3^η3 S3^β3 T3^ζ3 α3 - λ - 
    P3 r (S3 θ3 + F3 S3 ι3 + S3 TV3 κ3 + RV3 S3 μ3) == 0,
  -Cs + F3^γ3 L3^α3 P3 R3^η3 S3^(-1 + β3) T3^ζ3 β3 - 
    L3 P3 r (θ3 + F3 ι3 + TV3 κ3 + RV3 μ3) == 0,
  -Cf + F3^(-1 + γ3) L3^α3 P3 R3^η3 S3^β3 T3^ζ3 γ3 - L3 P3 r S3 ι3 == 0,
  F4^γ4 L4^(-1 + α4) P4 R4^η4 S4^β4 T4^ζ4 α4 - λ -
    P4 r (S4 θ4 + F4 S4 ι4 + S4 TV4 κ4 + RV4 S4 μ4) == 0,
  -Cs + F4^γ4 L4^α4 P4 R4^η4 S4^(-1 + β4) T4^ζ4 β4 - 
    L4 P4 r (θ4 + F4 ι4 + TV4 κ4 + RV4 μ4) == 0,
  -Cf + F4^(-1 + γ4) L4^α4 P4 R4^η4 S4^β4 T4^ζ4 γ4 - L4 P4 r S4 ι4 == 0,
  F5^γ5 L5^(-1 + α5) P5 R5^η5 S5^β5 T5^ζ5 α5 - λ - 
    P5 r (S5 θ5 + F5 S5 ι5 + S5 TV5 κ5 + RV5 S5 μ5) == 0,
  -Cs + F5^γ5 L5^α5 P5 R5^η5 S5^(-1 + β5) T5^ζ5 β5 - 
    L5 P5 r (θ5 + F5 ι5 + TV5 κ5 + RV5 μ5) == 0,
  -Cf + F5^(-1 + γ5) L5^α5 P5 R5^η5 S5^β5 T5^ζ5 γ5 - L5 P5 r S5 ι5 == 0,
  F6^γ6 L6^(-1 + α6) P6 R6^η6 S6^β6 T6^ζ6 α6 - λ -
    P6 r (S6 θ6 + F6 S6 ι6 + S6 TV6 κ6 + RV6 S6 μ6) == 0,
  -Cs + F6^γ6 L6^α6 P6 R6^η6 S6^(-1 + β6) T6^ζ6 β6 - 
    L6 P6 r (θ6 + F6 ι6 + TV6 κ6 + RV6 μ6) == 0,
  -Cf + F6^(-1 + γ6) L6^α6 P6 R6^η6 S6^β6 T6^ζ6 γ6 - L6 P6 r S6 ι6 == 0,
  F7^γ7 L7^(-1 + α7) P7 R7^η7 S7^β7 T7^ζ7 α7 - λ -
    P7 r (S7 θ7 + F7 S7 ι7 + S7 TV7 κ7 + RV7 S7 μ7) == 0,
  -Cs + F7^γ7 L7^α7 P7 R7^η7 S7^(-1 + β7) T7^ζ7 β7 - 
    L7 P7 r (θ7 + F7 ι7 + TV7 κ7 + RV7 μ7) == 0,
  -Cf + F7^(-1 + γ7) L7^α7 P7 R7^η7 S7^β7 T7^ζ7 γ7 - L7 P7 r S7 ι7 == 0,
  -L1 - L2 - L3 - L4 - L5 - L6 - L7 + ℒ == 0},
  {L1, L2, L3, L4, L5, L6, L7, S1, S2, S3, S4, S5, S6, S7, F1, F2, F3, F4, F5, F6, F7}]
  • $\begingroup$ I directly copied your posted code and pasted into a new Mathematica notebook. It has a syntax error: Syntax::sntxf: "F3^(-1+\[Gamma]3)L3^\[Alpha]3P3 R3^\[Eta]3S3^\[Beta]3T3^\[Zeta]3" cannot be followed by "\[Gamma]3 -L3P3 r S3 \[Iota]3". $\endgroup$
    – murray
    Apr 25, 2014 at 18:48
  • $\begingroup$ I had a bit of an issue pasting the code into the box, so I editted in the post. Perhaps I deleted something important, but the code is definitely running in Mathematica... at least the menu bar on the notebook window says "Running..." and it is taking up 25% of my CPU (I have a 4-core processor)and a variable but approximately 7GB section of my ram. $\endgroup$
    – Jamie
    Apr 26, 2014 at 5:41

1 Answer 1


I agree with che that the chance of getting a symbolic solution is quite small.

If you can reduce to 16 you should certainly do that, some matrix algorithms go as N^3 where N is the number of elements and that you reduce your problem from (22X22)^3 to (16X16)^3. I'm sure Mathematica does something smarter than N^3 when it can, but this algebraic reduction will still make a big difference.

I've had to solve nonlinear equations in Mathematica and I've played around with FindRoot, it might work. However you have a pretty big parameter space, of 22 variables, and I don't know anything about your problem specifically so I will guess that you might not be able to come up with an initial guess for the solution, that is needed for FindRoot.

Therefore you might want to look into global-root finding methods like Conjugate-Gradient.

My final thought is this, even if you don't have a good guess for 16 variables, put in guess for as many variables as you can, and just pretend those are your equations. If you can get down to 8 or 4 Mathematica may be able to give you an analytical solution. Then you can iterate around you guesses and see if you can hit the correct root. Now that I've said it, I realize that this might be the basic idea behind things like Conjugate-Gradient.

  • $\begingroup$ So changing to using "FindRoot" rather than "Solve" would mean moving from an analytical (or symbolic) solution to a numerical one, right? If I moved toward the partial Conjugate-Gradient approach you're proposing, would it involve putting in numerical guesses for some variables, and then allowing Mathematica to try and solve for the remaining variables analytically? $\endgroup$
    – Jamie
    Apr 26, 2014 at 17:16
  • $\begingroup$ @Jamie, Sorry for the late reply. Yes, FindRoot is a numerical approach. And yes, the Conjugate-Gradient approach would work as you say. It's not the best resource but this wiki link, en.wikipedia.org/wiki/Conjugate_gradient_method, is a good place to start if you're thinking of going that route. $\endgroup$
    – tau1777
    May 4, 2014 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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