Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving systems of nonlinear ordinary equations in Mathematica.

  1. Sep 27, 2012 #1
    I'm trying to solve a system of five nonlinear equations (degree 7) in Mathematica:

    Code (Text):

    Solve[{q (a^2 +
           b^2 (3 q^2 + r^2 + 8 t^2)) ((e - q)^2 - R^2 - 4 T^2)^2 +
        q ((e - q)^2 + R^2 + 4 T^2) - 2 (e - q) (r R + 4 t T) == 0,
      R (a^2 + b^2 (3 R^2 + (e - q)^2 + 8 T^2)) ((e - q)^2 - R^2 -
            4 T^2)^2 + R (R (R - r) - (e - 3 q) (e - q) + 4 T (T - 2 T)) -
         r ((e - q)^2 + 4 T^2) == 0,
      r (a^2 + b^2 (3 r^2 + q^2 + 8 t^2)) ((e - q)^2 - R^2 - 4 T^2)^2 -
        r (R^2 + (e - q)^2 + 4 T ^2) + 2 R (q (e - q) - 4 t T) == 0,
      T (a^2 + 2 b^2 (2 T^2 + (e - q)^2 + R^2)) ((e - q)^2 - R^2 -
            4 T^2)^2 + T (4 T (T - t) - (e - 3 q) (e - q) + R (R - 2 r)) -
         t ((e - q)^2 + R^2) == 0,
      t (a^2 + 2 b^2 (2 t^2 + q^2 + r^2)) ((e - q)^2 - R^2 - 4 T^2)^2 -
        t (4 T^2 + (e - q)^2 - R ^2) + 2 T (q (e - q) - rR) == 0
      }, {q, r, t, R, T}]
     
    but the program is running for an hour...
    there is hope that it get to the end?

    How do I have to change it to hope to arrive at the conclusion?

    Thanks
     
  2. jcsd
  3. Sep 27, 2012 #2
    If it isn't just a simple scrape and paste error then this worries me

    ) - rR) == 0

    Perhaps you want a space between r and R there.

    Sometimes when you have very complicated expressions you can make a simplification that can speed things up. For example, you have dozens of (e-q) in your equations. If you could substitute emq for (e-q) everywhere, patch the few isolated remaining q with (e-emq) and see whether this resulted in enough simplification then it might help speed things up.

    I would also look for large common subexpressions and see whether you might be able to find a way to substantially simplify this before throwing it at Solve.

    In general I would expect throwing 5 seventh order complicated multivariate polynomials at Solve to never finish in an acceptable time or with an acceptable result.
     
  4. Sep 27, 2012 #3
    Assumptions may help as well.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Solving systems of nonlinear ordinary equations in Mathematica.
Loading...