Message Boards Message Boards

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

How do i translate this equation to mathematica language?

Posted 10 years ago

enter image description here

i need the translation because i need to solve this equation.

POSTED BY: azade53
3 Replies
Posted 10 years ago

Thanks a lot for responses

POSTED BY: azade53
Posted 10 years ago

This will produce the solution. It of course includes 3 integration constants, C[1],C[2], C[3].

eqs = {r1'[t], r2'[t], 
    r3'[t]} == {{-k13, k21, 0}, {0, -k21, k32}, {k13, 0, -k32}}.{r1[
      t], r2[t], r3[t]};

sol = DSolve[eqs, {r1, r2, r3}, t] // First;

These could also be solved for by including them in the equation set.

sol2 = DSolve[{eqs, {r1[0] == 1, r2[0] == 1, r3[0] == 1}}, {r1, r2, 
     r3}, t] // First;
POSTED BY: David Keith

well, you can just write the 3 equations as is

eq1 = r1'[t] == -k13 r1[t] + k21 r2[t];
eq2 = r2'[t] == -k21 r2[t] + k32 r3[t];
eq3 = r3'[t] == k13 r1[t] - k32 r3[t];
DSolve[{eq1, eq2, eq3}, {r1[t], r2[t], r3[t]}, t]

or if you want little less typing

ClearAll["Global`*"]
state = {r1[t], r2[t], r3[t]};
mat = {{-k13, k21, 0}, {0, -k21, k32}, {k13, 0, -k32}}
eq = D[state, t] == mat. state;
DSolve[eq, state, t]

See DSolve, there are many examples there

POSTED BY: Nasser M. Abbasi
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