Predator and Prey Model
The following was implemented in Maple by Marcus Davidsson (2008) davidsson_marcus@hotmail.com
Outline of Problem
Rabbits and foxes are living in a confined area.
Rabbits are eating grass which there are plentiful of.
Foxes are eating rabbits.
We can now set up a model which will enable us to model the number of rabbits and foxes at any given time.
We assume that:
the number of rabbits at time t is denoted by x(t) and the number of foxes at time t is denoted by y(t).
The equation of motion for the rabbit population is given by
dx/dt = x(t) ? x(t)*y(t)
The equation of motion for the fox population is given by
dy/dt = x(t)*y(t)  y(t)
The initial rabbit population is given by x(0) =1.5 and the initial fox population is given by y(0) =0.5
We can now visualize the dynamics of the number of rabbits and foxes over time
Rabbit Population Over Time

(1) 
Fox Population Over Time

(2) 
Rabbit and Fox Population Over Time

(3) 
Phase Diagram in a 2D Plane
Phase Diagram in a 3D Space
Our general function is given by

(4) 
The derivative with respect to time (chain rule) for the above funcion is given by

(5) 
We know that our two differential equations are given by
1) diff(x(t),t) = xx*y 2) diff(y(t),t) = x*yy
If we plug that into the previous equation we get:

(6) 
The solution to the above partial differential equations is given by:

(7) 
Note that only equations with closed form solutions is possible to solve with pdsolve
In order for F(x,y)= constant for example F(x,y)=1 then _F1 has to be equal to 1/(x*y*exp(yx))

(8) 
We now plot that function with its corresponding contour lines:
Legal Notice: The copyright for this application is owned by the authors. Neither Maplesoft nor the authors are responsible for any errors contained within and are not liable for any damages resulting from the use of this material.. This application is intended for noncommercial, nonprofit use only. Contact the authors for permission if you wish to use this application in forprofit activities.