Group Abstract Group Abstract

Message Boards Message Boards

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

Posted 8 years ago
Attachments:
POSTED BY: Gennaro Arguzzi
7 Replies
POSTED BY: Neil Singer

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

POSTED BY: Gennaro Arguzzi
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

Hello @Neil Singer , the term (Qd Cd)'[x] means d(Qc Cd) /dx. I tried to correct the code, but maybe my syntax is wrong:

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

and with:

DSolve[{D[Qd[x] Cd[x], x] == kd (-Cd[x] + Ci[x]), 
  Derivative[1][Qd][x] == ko (Cd[x] - Ci[x]), 
  Qa Derivative[1][Ca][x] == ka Ca[x], 
  ka Ca[x] == kd (-Cd[x] + Ci[x])}, {Qd[x], Cd[x], Ca[x], Ci[x]}, x]

Thank you so much.

POSTED BY: Gennaro Arguzzi

Gennaro,

you have multiple issues going on here. You have 4 things that vary in x but only include 3 in the list of variables. I do not understand what this means (Qd Cd)'[x]. It cannot be correct. I would not put parens around (Ca)'[x] although syntactically its ok.

I changed your equations and this solves but I am not sure what your original equations should be:

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

I hope this helps.

Regards,

Neil

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