Math 331.1 •  Fall 2005

Rabbits and wolves

Copyright © 2005 Murray Eisenberg.  All rights reserved.

This notebook required use of a 3rd party proprietary package, ODE, so it is shown only with its cells evaluated.

<< ODE`ODE`

No interaction

\(ODE[{\(r'\)[t]\  == \ 0.2\ r[t], \ \(w'\)[t]\  == \ \(-0.1\)\ w[t], \ 	
        r[0]\  == \ 100, \ w[0]\  == \ 25}, \ {r[t], \ w[t]}, \ t, \ 
      PlotPhase\  -> \ {{t, \ 0, \ 5}}, \ 
      PlotRange\  -> \ {0, \ 50}]\)

Solve[{0.2 r  ==  0,  -0.1 w  ==  0},  {r,  w}]

Predator-prey interaction

Solve[{0.2 r  -  0.002 r w  ==  0,  
        -0.1 w  +  0.001 r w  ==  0},  {r,  w}]

\(solns\  = \ 
      ODE[{\(r'\)[t]\  == \ 0.2\ r[t]\  - \ 0.002\ r[t]\ w[t], \ 
          \(w'\)[t]\  == \ \(-0.1\)\ w[t]\  + \ 0.001\ r[t]\ w[t], 
		
          r[0]\  == \ 100, \ w[0]\  == \ 25}, \ {r[t], \ w[t]}, 
        \ {t, \ 0, \ 200}, \ Method\  -> \ NDSolve, \ 
        PlotPhase\  -> \ {{t, \ 0, \ 200}}, \ 
        PlotRange\  -> \ {{0, \ 400}, \ {0, \ 350}}, \ 
        AxesLabel\  -> \ {"r", \ "w"}]\)

Plot[Evaluate[{r[t],  w[t]}  /.  solns],  {t,  0,  200}, 
      PlotStyle  ->  {RGBColor[0, 0, 0],  RGBColor[1, 0, 0]},  
      AxesLabel  ->  {"t",  "r and w"}];

Solve[{0.2 r  -  0.002 r w  ==  0,  
        -0.1 w  +  0.001 r w  ==  0},  {r,  w}]

\(ODE[{\(r'\)[t]\  == \ 0.2\ r[t]\  - \ 0.002\ r[t]\ w[t], \ 
        \(w'\)[t]\  == \ \(-0.1\)\ w[t]\  + \ 0.001\ r[t]\ w[t], 
		
        r[0]\  == \ c, \ w[0]\  == \ c}, \ {r, \ w}, \ {t, \ 0, \ 200}, \ 
      Method\  -> \ NDSolve, \ 
      Parameters\  -> \ {{c, \ 250, \ 100, \ \(-25\)}}, \ 
      PlotPhase\  -> \ {{t, \ 0, \ 200}}, \ 
      PlotRange\  -> \ {{0, \ 400}, \ {0, \ 350}}, \ 
      AxesLabel\  -> \ {"r", \ "w"}]\)