Howdy,

I am trying to create a mathmatical model that shows a predator-prey relationship along with seasonal variations (hibernation). I made two piecewise functions where one is "on" during the winter and the other is "off" during the winter and the model worked well for one unit of time.

My problem is that I would like the piecewise functions to apply over an arbitrary amount of time units periods without having to set the range within the function itself for 100 units of time. I was thinking that a for loop would work but i'm not sure how I would impliment that.

Thanks in advance!!

Edit:

Here's a little bit more info on the problem.

I have three O.D.E's in an array..

ode := {r'(t),h'(t),c'(t)}

which are dependent on a list of parameters..

constants := {a,b,...,s,w,c0,h0,r0};

where s and w are my piecewise functions.

I am able to solve the three odes using dsolve for one period of s and w.

Again, I'm really not sure where to start to make my model periodic.