Group Abstract Group Abstract

Message Boards Message Boards

Solve a system of equations and avoid calculations without response?

Posted 6 years ago

Hello. I am trying to solve a system of equations (actually, it seems to be solvable by hand, just a bit messy). Mathematica thinks for some time ("Running") and then just stops. With no answer. Has happened multiple times already with multiple systems. Is it common? Please find the system below:

Simplify[Solve[ 
  p1*a1*(-x0 + (e1b + e1l - x1)*a1)^(-2) + 
     p2*a2*((e1b + e1l - x1)*a2)^(-2) == (w0l + 
        x0*P00 - (e1b - x1)*P01)^(-2)*P01 && 
   p1*(-x0 + (e1b + e1l - x1)*a1)^(-2) == (w0l + 
        x0*P00 - (e1b - x1)*P01)^(-2)*P00, {x0, x1}]]

Is there any way to resolve it? Thank you very much in advance.

8 Replies
POSTED BY: Claudio Chaib
POSTED BY: Hans Dolhaine
Attachments:
POSTED BY: Ulrich Mutze

I just had a similar problem and also asked here for help. In my case it finally turned out that the processor got too hot. Running your code on my computer also heated up the processor considerably.

So, my suggestion is to monitor the processor temperature during your computation and compare it with computations that don't stop your computer. If it then looks like a temperature problem, you will find ways to solve it. I have no experience with the matter.

POSTED BY: Ulrich Mutze

Dear Hans,

Thank you for coding it! This is a nice and concise script, much better then what I usually do, so I learned something. It is strange that Mathematica did not go this way. Maybe it tries the solution that Claudio pointed out, which may lead to overload due to operations with quite messy objects... Anyways, thanks a lot once again!

Thank you!! I will keep it in mind!

Dear Ulrich,

Thank you very much for the comment! I think it is very possible. I was not aware of such a possibility. Actually, I sometimes leave the laptop overnight and it works fine, but sometimes (like in this case) it stops in some 15 minutes. Is it that some problems warm up the processor more then other?

Dear Claudio, I still think it is solvable.

 p1*a1*z1 + p2*a2*z2 == z3*P01 && p1*z1 == z3*P00

Above I denote the terms in brackets of the initial system as z1, z2 and z3 respectively. This linear system has a solution for z1/z3 and z2/z3, provided z3<>0. This solution will not contain x0 or x1 as arguments, they will be all inside z1/z3 and z2/z3. But then one can just invert the power (given that it is an integer and that the roots are non-negative). Then one can just solve the resulting system, which will be linear in x0 and x1, just a bit ugly.

The question is, why does Mathematica fail here. I do not think I am smarter then my computer after all...

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard