Message Boards Message Boards

Speeding up Solve or NSolve?

GROUPS:

I have a system of equations which I am trying to solve.

ms=500;ma=980;v=92;m=5.5;M=364;m5=0;mp=139;
Eq1 = ms^2 == -2 (M^2 - 
      6 (k1 + k2) (Sqrt[(c + M^2 + 2 m5^2)/(2 (k1 + k2))] + 
         m b/(2 (c + M^2 + 2 m5^2)))^2 + c + 2 m5^2);
Eq2 = ma^2 == -2 (M^2 - 
      2 (3 k1 + k2) (Sqrt[(c + M^2 + 2 m5^2)/(2 (k1 + k2))] + 
         m b/(2 (c + M^2 + 2 m5^2)))^2 - c + 2 m5^2);
Eq3 = mp^2 == (
   2 b m)/((b m)/(2 (c + M^2 + 2 m5^2)) + Sqrt[(c + M^2 + 2 m5^2)/(
    2 (k1 + k2))]);
Eq4 = v == (b m)/(2 (c + M^2 + 2 m5^2)) + Sqrt[(c + M^2 + 2 m5^2)/(
    2 (k1 + k2))];
NSolve[{Eq1, Eq2, Eq3, Eq4}, {k1, k2, c, b}]

But wolfram was trying to solve it more than 4 hours. Could you tell me what I'm doing wrong?

EDIT: croos-post link to StackExchange

POSTED BY: Alex Yakubovich
Answer
10 months ago

If you have some idea of what the solution is, FindRoot could be a better approach. Also, it's not a good idea to use capital letters as variables, as Mathematica uses capital letters for constants.

POSTED BY: Frank Kampas
Answer
10 months ago

Please provide the croos-post link to StackExchange so there is less likelihood of replication of effort.

POSTED BY: Daniel Lichtblau
Answer
10 months ago

it's done.

POSTED BY: Alex Yakubovich
Answer
10 months ago

Actually this link: http://mathematica.stackexchange.com/questions/139574/speeding-up-solve-or-nsolve The one you used is to Stack Overflow (I had not known about that cross-post).

POSTED BY: Daniel Lichtblau
Answer
10 months ago

Group Abstract Group Abstract