Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'use of piecewise variables w/ DSolve' topicStudent Support Forum > General > "use of piecewise variables w/ DSolve"

Next Comment >Help
Author Comment/Response
Basu
08/10/06 2:07pm

I am solving a series of ordinary differential equations, and would like some of the constants in those equations to vary w/ time using piecewise functions, yet can't seem to determine how to best code that w/ N/DSolve...

e.g., a[t_]:= Piecewise [ { {1, t < 5} , {2, 5≤ t < 10} , { 3, 10≤ t } ];
b=5;
c=10;

then i'm trying to solve a series of ODE's like
S'[t]=a[t]*S[t]-b*I[t]-c*R[t];
I'[t]=b*I[t];
R'[t]=c*R[t];

...what should the N/DSolve command look like, or is this not possible?

URL: ,

Thread 'use of piecewise variables w/ DSolve' is now CLOSED
Author Date Posted
use of piecewise variables w/ DSolve Basu 08/10/06 2:07pm
Re: use of piecewise variables w/ DSolve yehuda ben-s... 08/14/06 01:35am
Next Comment >Help