Group Abstract Group Abstract

Message Boards Message Boards

Solving symbolically a system of 3 (complicated) equations

Hello, I am trying to solve the following system of three equations with three variables, pd, pf and lambda. When I impose the parameters a and cf, for instance (a=1/3 and cf=1), I can solve numerically the system with NSolve (very quickly). My problem is that I want to solve it symbolically (more specifically without imposing any a and cf) and in this case Mathematica runs for a very long time (I aborted the results after 14 hours). Any idea what I should do ?

f[x_]:=x^a
fl=f[lambda]
dfl=D[f[lambda ],lambda]
cd=12/10

pn=((pf*(1+fl))^(-2)+(pd^(-2)))^(-1/2)
sf=(pf*(1+fl)/pn)^(-2)
sd=(pd/pn)^(-2)

eqns={
  pd==(3*(1-sd)+6)/(3*(1-sd)+5)*cd, 
  pf==(3*(1-sf*(1+fl)^(-2))+2*sf*(1+fl)^(-2))/(3*(1-sf*(1+fl)^(-2))+2*sf*(1+fl)^(-2)-1)*cf,
  (1+fl)^3/dfl ==10*pn^3*pd^(-3)*(pd-cd)*pf^(-2)
  }

eqns1=FullSimplify[eqns]
sol = Solve[eqns1,{pd,pf,lambda}]
12 Replies

With these calculations you get lambda and cf as functions of a,pd,pf plus a compatibility condition between a,pd,pf:

(solLa = Solve[eqns1[[1 ;; 2]] /. lambda^a -> la, {la, cf}]) /. 
 la -> lambda^a
solLambda1 = 
 FullSimplify[
  Solve[Simplify[
    eqns1[[3]] /.
      { lambda^a -> la, 
       lambda^(1 - a) -> lambda/la} /. solLa[[1]]], lambda]]
solLambda2 = 
 FullSimplify[
  Solve[Simplify[
    eqns1[[3]] /.
      { lambda^a -> la, 
       lambda^(1 - a) -> lambda/la} /. solLa[[2]]], lambda]]
(la /. solLa[[1]]) == (lambda /. solLambda1)^a
(la /. solLa[[2]]) == (lambda /. solLambda2)^a

The compatibility condition a,pd,pf is not algebraic, because the variable a appears at the exponent. I doubt you can solve it explicitly.

POSTED BY: Gianluca Gorni

Thank you for your answer Gianluca! I have tried this way but Mathematica still doesn't solve for pd and pf (it has been running for a couple of days..) In a first time I have tried replacing lambda in equations 1 and 2 to solve, and then in equations 1 and 3. I will now try with equations 2 and 3 but I guess the problem remains too complicated...

Posted 4 years ago

Dear Hans, thank you very much for your message and work. What I am looking for is mainly to be able to compare pd and pf in function of a and cf (or their ranges). I admit this way seems very complicated... I have now solved for lambda using Gianluca's way, but Mathematica is still not able to solve for pd and pf the system made of the two first equations in a reasonable amount of time. I will let you know if I find some other easier way to do it...

POSTED BY: Updating Name
POSTED BY: Hans Dolhaine

Dear Olimipia, thanks for your answer.

But what exactly do you want? Look at the code below. Mma solved the 1st equation quite quickly for pd, but you get three (already complicated) solutions, and each should be inserted to the remaining equations to be solved further. The result is not really convenient.

Of couse one can solve the 1st equation for pf, giving only two solutions to be inserted in the rest, but is this easier? Not really.

f[x_] := x^a
fl = f[lambda];
dfl = D[f[lambda], lambda];
cd = 12/10;

pn = ((pf*(1 + fl))^(-2) + (pd^(-2)))^(-1/2);
sf = (pf*(1 + fl)/pn)^(-2);
sd = (pd/pn)^(-2);

eqns = {pd == (3*(1 - sd) + 6)/(3*(1 - sd) + 5)*cd, 
  pf == (3*(1 - sf*(1 + fl)^(-2)) + 
       2*sf*(1 + fl)^(-2))/(3*(1 - sf*(1 + fl)^(-2)) + 
       2*sf*(1 + fl)^(-2) - 1)*cf, (1 + fl)^3/dfl == 
   10*pn^3*pd^(-3)*(pd - cd)*pf^(-2)}


eq11 = eqns[[1]] // Simplify
solpd = Solve[eq11, pd]


solpf = Solve[eq11, pf]
POSTED BY: Hans Dolhaine

Once you have the value for lambda^a from the first equation and for lambda^(1-a) from the third, you can replace them into lambda^a*lambda^(1-a)=lambda and get the value of lambda.

POSTED BY: Gianluca Gorni

Dear Hans, thank you for your message. I have the hope that I will be able to interpret in some general ways the effect of the parameters. As I said, the model is easy to solve numerically (even in a much more complex version) but my choices of parameters remain very arbitrary...

Posted 4 years ago
POSTED BY: Updating Name

Hello Olimpia, why do you want to have a symbolic solution?

If it exists at all it will be terribly complicated ( I got intermediate expressions of third order and accordingly three solutions, some with complex terms) and I suppose you won't "see" anything with it.

POSTED BY: Hans Dolhaine

The first two equations can be solved in terms of lambda^a, then you can replace into the other equations:

sol1 = Solve[eqns[[1]] /. lambda^a -> la, la]
sol1 /. la -> lambda^a
Simplify[eqns[[2]] /. lambda^a -> la /. sol1] // Union
Simplify[eqns[[3]] /. lambda^a -> la /. sol1 /. 
   la -> lambda^a] // Simplify
POSTED BY: Gianluca Gorni

Thank you for your answer. I understand your argument, but if I try to declare a=2/3 and let cf unknown it shouldn't be the case anymore. The three (simplified) equations to solve become

eqns={
5 pd + 18/5 (-2 + 1/(8 + (5 (1 + lambda^(2/3))^2 pf^2)/pd^2)) == 0, 
 pf + cf (-(3/2) + 1/(-2 (1 + 4 lambda^(2/3) + 2 lambda^(4/3)) - (4 (1 + lambda^(2/3))^4 pf^2)/pd^2)) == 0, 
 3/2 (1 + lambda^(2/3))^3 lambda^(1/3) == (10 (-(6/5) + pd))/(pd^3 (1/pd^2 + 1/((1 + lambda^(2/3))^2 pf^2))^(3/2) pf^2)
} 

but still, it seems Mathematica keeps running without finding a solution...

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