Unformatted text preview:

2R 1 2RF dR dt dF dt F 0 9 RF MATH 282 MATLAB Assignment 4 First Order Systems Example1 The predator prey model predicts cyclic population behavior for both the predator population described by F t and the prey population described by R t Equilibrium Solutions The solutions of the system 2 R 1 2 RF 0 F 0 9 RF 0 are pairs of constant functions called equilibrium solutions to the system We can use the solve command to find the equilibrium points of the above system by typing 3 That is the equilibrium solutions are R F 0 0 and R F 10 R t and F t graphs If we specify the initial conditions R0 1 and F 0 0 5 we can use the MATLAB function ode45 to obtain approximate solutions to the system Let P R t F t we think of P as a vector whose components are R t and F t For MATLAB R t is P 1 and F t is P 2 With this in mind we begin by defining an anonymous function f whose components are the right hand side of the system 5 9 Let us denote by Sap the approximate solution to the IVP that is Sap R t F t is an approximation to the actual solution of the system with the indicated initial conditions If we wish to plot the first component of Sap i e R t over the interval 0 t 15 then Similarly we can plot the component F t for 0 t 15 We can plot the two solutions on the same graph as follows Phase Portrait The plot of a solution F t R t as a function of t would be a curve in the t F R space The projection of this curve into the F R plane is called a trajectory or a solution curve A trajectory is an example of a parameterized curve and is drawn by plotting F t R t as t varies A plot of a family of trajectories is called a phase portrait of the system The solution curve for the predator prey system 2R 1 2RF dR dt dF dt F 0 9 RF corresponding to the initial condition R0 F0 1 0 5 is Making a phase portrait requires some planning The best approach is to start by plotting the equilibrium solutions Next use a loop to add extra curves Remark The above phase portrait corresponds to the curves where R 0 F 0 a b for several values of a and b Moreover we solved forwards from t 0 to t 6 If we change the initial conditions to R 2 F 2 a b then it is necessary that we plot forwards and backwards otherwise we do not obtain complete curves Exercise Consider the predator prey system dR a Use solve to find all the equilibrium solutions b Plot the solution curve corresponding to the initial conditions R 1 1 F 1 3 7 over the interval 0 t 30 For axis use 0 2 0 6 c Describe the fate of the prey and predator populations based on the solution curve d Display graphs of the solutions R t and F t corresponding to the initial conditions R 1 1 F 1 3 7 over the interval 0 t 30 Compare with part c 2 F 4 RF 3 R RF 2 1 R dF dt dt


View Full Document

MC MATH 282 - MATLAB Assignment 4

Documents in this Course
Load more
Download MATLAB Assignment 4
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MATLAB Assignment 4 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MATLAB Assignment 4 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?