Reference no: EM132397115
CAAM 210 Introduction To Engineering Computation Assignment - MATLAB Math's Algebra Ordinary Differential Equation (ODE) Solver Task - Rice University, USA
Project - Population Models
Project Requirements -
Your first task will be to solve the predator-prey problem described in Section 3.1. Use k1 = 3; k2 = 3 x 10-3, k3 = 6 x 10-4, k4 = 0.5, R(0) = 1000, and F(0) = 500.
(a) Solve the system of ODE in (5) and (6) over the time interval [0, 15] using Euler's method with δ = 0.01 and solve it again with δ = 0.001.
(b) Solve the same system of ODE in (5) and (6) using ode45. Set the accuracy of the ode solver using the command options = odeset('RelTol', 1e-6).
(c) Create a figure containing the plots of your solutions for the rabbit and fox populations that you found in parts (a) and (b) plotted versus time. Make sure to include a title, label your axes, and include a legend. Comment on what you observe from this figure. Make comments on both how your solutions compare to the solutions using ode45 and on the overall patterns that you notice in the solution and what this tells you about the populations.
(d) Make a separate figure where you plot the two population solutions from part (b) using the rabbit population for your x-variable and the fox population for your y-variable. Comment on what you observe in this plot. How does this relate to the figure you produced in part (c)?
(e) Reproduce the movie LimitCircle.avi on canvas. (Read the MATLAB help files for VideoWriter, writeVideo, and getframe for more information about generating a movie.)
Your next task is to solve the system of ODE related to the Zombie Outbreak model. Let's assume that this is a more realistic zombie outbreak, meaning that the zombies are victims of some horrible virus and not reanimated corpses. This leads us to take a5 = 0 in our model. The implications of this are that people can only become zombies by being infected by zombies, and once a person is in the removed population, they stay there. Solve this new system with a1 = a2 = 0.01 and a3 = 0.005. For initial populations take S(0) = 500, Z(0) = 50, and R(0) = 0. Also suppose that we are only considering time between 0 and 20: 0 ≤ t ≤ 20. How quickly can humans defeat the zombies?
(a) Let us examine this potential situation for parameters a4 = 0.005, 0.006, 0.007, . . . , 0.016. Solve the problem using your own solver that implements Euler's method for this problem with δ small enough.
(b) Produce a figure similar to Figure 2 with results for all values of a4. Here, you need to use the Matlab function subplot to create a figure with multiple pictures. Use help subplot for more information about this function. Include titles, labels, and legends. Remember that we cannot have fractional members of a population so you need to figure out how to display the final number of members of a population as an integer.
(c) Based on your figure from part (b), answer the following questions. For which values of a4 do the humans win? For which values of a4 do the zombies win? If we let t go to infinity, then for which values of a4 will the humans win and for which values of a4 will the zombies win?
Your final set of tasks involve simulating a zombie outbreak where the zombies do indeed rise from the grave. For this simulation we will take a1 = a3 = 0.01 (birth and death rates are the same), a2 = 0.012 (we've made the zombies more aggressive), and a5 = 0.006 (this is related to the rate in which members of the removed population "reanimate" and become members of the zombie population. We will take the initial populations to be S(0) = 500, Z(0) = 0, and R(0) = 0. Taking Z(0) = 0 implies that our simulation starts before the outbreak occurs rather than in the midst of the outbreak. Since this is the case, we shall run the simulation for a longer time period, 0 ≤ t ≤ 40. Redo parts (a) and (b) above for this new situation. Write a few sentences about the differences that you observe. What does a4 need to be for the humans to "win" in this situation? Will the zombie population ever be exactly zero?
Attachment:- Engineering Computation Assignment File.rar