Group Abstract Group Abstract

Message Boards Message Boards

[?] Solve symbolic system of differential and algebric equations?

Posted 9 years ago

Hello everyone, I tried to solve a symbolic system of differential and algebric equations between (0,x) with the following code:

DSolve[{(Qd Cd)'[x] == kd (Ci[x] - Cd[x]), (Qd)'[x] == 
   ko (Cd[x] - Ci[x]), Qa (Ca)'[x] == ka Ca[x], 
  ka Ca[x] == kd (Ci[x] - Cd[x])}, {Qd, Cd, Ca}, x]

where Qa, ko, ka, kd are positive constants. The code does not work. I expect the solution:

enter image description here

Thank you very much for your time.

Attachments:
POSTED BY: Gennaro Arguzzi
7 Replies

Very good, Gianluca --

As I said, Gennaro, they are DAE's and needed manipulation... :)

POSTED BY: Neil Singer

@Neil Singer see the attachment please. There is the step-by-step solution.

POSTED BY: Gennaro Arguzzi

The last syntax seems Ok. My code posted with Derivative[1][Ca][x] but you can use the prime notation (Ca'[x]). I suppose that WMA does not know how to solve this DAE. You may want to verify your equation source or try to dive in and see why by examining the equations or manipulating them. You can also verify them numerically by doing an NDSolve and compare the results to what you know about your problem.

POSTED BY: Neil Singer

Your last equation is algebraic, not differential. You can solve it for Cd[x] and replace in the other equations:

eq0 = {D[Qd[x]*Cd[x], x] == kd (-Cd[x] + Ci[x]), 
   Qd'[x] == ko (Cd[x] - Ci[x]), Qa Ca'[x] == ka Ca[x], 
   ka Ca[x] == kd (-Cd[x] + Ci[x])};
eq1 = Most[eq0] /. Solve[Last[eq0], Cd[x]][[1]];
eq3 = Solve[eq1, D[{Qd[x], Ca[x], Cd[x]}, x]][[1]] /. Rule -> Equal;
DSolve[eq3, {Qd[x], Ca[x], Cd[x]}, x]
POSTED BY: Gianluca Gorni
POSTED BY: Gennaro Arguzzi
POSTED BY: Neil Singer
POSTED BY: Gennaro Arguzzi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard