Group Abstract Group Abstract

Message Boards Message Boards

Solve a system of ODE's with DSolve[ ]?

I'm new to Mathematica and would appreciate anyone with an experienced eye who would look at the following failed attempt to solve a system of ordinary differential equations and tell me what I'm doing wrong. The function is pasted below and a .nb file is attached.

I'm looking for general symbolic solution to a standard S,I,R (susceptible, infected, recovered) model. Then I'd like to learn how to play with parameters and plotting features. But first, I need a solution. This attached formulation has been running for a few hours without returning a result. What's wrong with its arguments? Is there a way to limit parameter intervals and independent variable interval?

Thanks.

eqns = {s'[t] == m (s0 + i0 + r0) - \[Beta] s[t] i[t] - m s[t], i'[t] == \[Beta] s[t] i[t] - m i[t] - g i[t], r'[t] == g i[t] - m r[t]}
sol = DSolve[eqns, {s, i, r}, t]
Attachments:
POSTED BY: Jay Gourley
4 Replies
POSTED BY: Robert Nachbar
POSTED BY: Robert Nachbar

Thanks, again Robert Nachbar.

POSTED BY: Jay Gourley

Thanks, Robert Nachbar for the explanation. And also thanks for including the plot. Is it possible to animate the plot with sliders for the parameters? Also, I'm new to applied math. Is a system of closed form solutions not possible, even in a case like this where S'+I'+R'=0 for all t?

Is there web tutorial on Mathematica syntax? I understand functions I write with my limited vocabulary. But understanding yours involves guesswork. Your functions work perfectly, but I cannot explain why.

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