Group Abstract Group Abstract

Message Boards Message Boards

Analytically solving a large number of differential equations using DSolve?

2 Replies

Curiously, NDSolve does work for your equations. (Note that the e of eqn1 for the first line is outside your code block in the post).

POSTED BY: Frank Kampas
Posted 10 years ago

I think the product terms x[t] y[t] and z[t] a[t] are giving it trouble. DSolve can be hit or miss, though maybe someone else has a trick.

NDSolve can do it though. Note your solutions go to infinity rather quickly.

eqn1 = D[x[t], t] == x[t] + y[t] + z[t] a[t];
eqn2 = D[y[t], t] == 2 x[t] - y[t] + z[t];
eqn3 = D[z[t], t] == x[t] - z[t] + 2 y[t] + 2 a[t];
eqn4 = D[a[t], t] == x[t] y[t] + 2 z[t] - 3 a[t];
init1 = x[0] == 1;
init2 = y[0] == 1;
init3 = z[0] == 0;
init4 = a[0] == 1;
sol = NDSolve[{eqn1, eqn2, eqn3, eqn4, init1, init2, init3, 
    init4}, {x, y, z, a}, {t, 0, 1}];
Plot[{x[t], y[t], z[t], a[t]} /. sol, {t, 0, 1}]

enter image description here

Eric

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