# Solve a group of 3 differential equations?

Posted 3 months ago
657 Views
|
6 Replies
|
0 Total Likes
|
 This is my 1st or 2nd time using Mathematica actually. As a synthetic chemistry major PhD, I really don't have many equations to solve so I have very little experience in this. I tried to expand someone else's code about solving a group of 2 differential equations to a group of 3. The original code run well but mine seems to always fail with the following error:DSolve::nolist: "List encountered within ...... There should be no lists on either side of the equations."The documentation suggests deleting some braces in the code but I don't know which ones to delete. Deeply appreciate if someone could help. a = {{k2, 0, 0}, {-k2, 0, 0}, {0, 0, k2}} b = {{-k1*c}, {0}, {-k3*c}} c = 0.01 DSolve[{{Derivative[y1][t], Derivative[y2][t], Derivative[y3][t]} == a.{y1[t], y2[t], y3[t]} + b, y1 == 0, y2 == 0, y3 == 0}, {y1[t], y2[t], y3[t]}, {t}] Answer
6 Replies
Sort By:
Posted 3 months ago
 You have to change the expression for b: b = {-k1*c, 0, -k3*c} Answer
Posted 3 months ago
 Thanks a lot. Answer
Posted 3 months ago
 That is an interesting problem. I assume you want to describe the kinetics of a reacting system.But your solutions seem to tend to Infinity, which is not realistic. Would you mind to describe your reactions? Answer
Posted 3 months ago
 Hi,They are 1st order kinetics equations for a series of reactions. I have just found out I don't have enough experimental data to get an answer to this problem so I just decide to give up on it. Answer
Posted 3 months ago
 Ok.But I think if you want to describe a series of 1st order reactions a -> b -> c you should reformulate your equations. sol = DSolve[{ D[fa[t], t] == - k1 fa[t], D[fb[t], t] == -k2 fb[t] + k1 fa[t], D[fc[t], t] == k2 fb[t], fa == 1, fb == 0, fc == 0 }, {fa, fb, fc}, t] // Flatten fff[t_, k1_, k2_] := Evaluate[{fa[t], fb[t], fc[t]} /. sol] Manipulate[ Plot[ Evaluate[fff[t, k1, k2]], {t, .00001, 10}, PlotStyle -> {Red, Blue, Black}], {k1, 0, 3}, {k2, .00002, 3}] Answer
Posted 3 months ago
 Thanks for your answer. Answer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments