Message Boards Message Boards

0
|
3998 Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Solve a system of non linear equations?

Posted 6 years ago

I want to Solve the following set of non linear differential equations. In this context, I want to have the expression of p1, p2,p3,p4 in the stationnary state (t-> Infinity) and I want to add the normalization p1[t]+ p2[t]+p3[t]+p4[t]=1.

DSolve[{D[p1[t], t] == a *Cos[t]* p2[t] - p1[t], 
  D[p2[t], t] == p1[t] + a *Cos[t]* p3[t] - p2[t], 
  D[p3[t], t] == a *Cos[t]*p4[t] - p3[t],
  D[p4[t], t] == (1 - a *Cos[t]) (p2[t] + p3[t] + p4[t]) - p4[t], 
  p1[t] + p2[t] + p3[t] + p4[t] == 1},
 {p1, p2, p3, p4}, t]

When I used the above instruction , the system does not provide me a solution. Please help me. Thank you in advance.

POSTED BY: marouane bouadi
4 Replies

Thank you very much for your valuable help. I really appreciate your fruitful discussion

POSTED BY: marouane bouadi

Somehow I got attributed for Mariusz ‘s post. Mine was far less complete and interesting than His post so I’ll take the credit anytime! Sorry Mariusz!

I posted that if you only care about steady state, you can set the derivatives all to zero and solve the resulting algebraic equations.

Regards

Neil

POSTED BY: Neil Singer

DSolve function can't find symbolic solution that means Mathematica doesn't know a closed-form solution, if it exists.

Using AsymptoticDSolveValue we can find a series solution in point $t=0$ of order 3:

  {P1, P2, P3, P4} = AsymptoticDSolveValue[{D[p1[t], t] == a Cos[t] p2[t] - p1[t], 
  D[p2[t], t] == p1[t] + a Cos[t] p3[t] - p2[t], D[p3[t], t] == a Cos[t] p4[t] - p3[t], 
  D[p4[t], t] == (1 - a*Cos[t])*(p2[t] + p3[t] + p4[t]) - p4[t]}, {p1[t], p2[t], p3[t], p4[t]}, {t, 0, 3}]

  Plot[Evaluate[{P1, P2, P3, P4} /. C[1] -> 1 /. C[2] -> 1 /. C[3] -> 1 /. C[4] -> 1 /. a -> 1], {t, 0, 1}, 
  PlotLegends -> {"p1[t]", "p2[t]", "p3[t]", "p4[t]"}]

enter image description here

POSTED BY: Neil Singer

DSolve function can't find symbolic solution that means Mathematica doesn't know a closed-form solution, if it exists.

Numeric solution:

         a = 1; {P1, P2, P3, P4} = 
         NDSolveValue[{D[p1[t], t] == a Cos[t] p2[t] - p1[t], 
         D[p2[t], t] == p1[t] + a Cos[t] p3[t] - p2[t], 
         D[p3[t], t] == a Cos[t] p4[t] - p3[t], 
         D[p4[t], t] == (1 - a*Cos[t])*(p2[t] + p3[t] + p4[t]) - p4[t], 
         p1[0] == 1, p2[0] == 1, p3[0] == 1, p4[0] == 1}, {p1, p2, p3, 
         p4}, {t, 0, 100}]


         Plot[Evaluate[{P1[t], P2[t], P3[t], P4[t]}], {t, 0, 100}, 
         PlotLegends -> {"p1[t]", "p2[t]", "p3[t]", "p4[t]"}]

enter image description here

EDITED 2.4.2018:

By suggestion Mr Neil's:

      sol = Solve[{0 == a Cos[t] p2[t] - p1[t], 
      0 == p1[t] + a Cos[t] p3[t] - p2[t], 0 == a Cos[t] p4[t] - p3[t], 
      0 == (1 - a*Cos[t]) (p2[t] + p3[t] + p4[t]) - p4[t], 
      p1[t] + p2[t] + p3[t] + p4[t] == 1}, {p1[t], p2[t], p3[t], p4[t]}]

     Plot[Evaluate[{p1[t], p2[t], p3[t], p4[t]} /. sol[[1]] /. a -> 1], {t,
        0, 100}, PlotLegends -> {"p1[t]", "p2[t]", "p3[t]", "p4[t]"}]

enter image description here

If the system is overdetermined then it had no solutions.

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

Group Abstract Group Abstract