Question: I need help with writing the MATLAB code for this problem, I dont have polymath to use and the code I tried for MATLAB didnt
P1-6. This problem focuses on using Polymath, an ordinary differential equation (ODE) solver, and also a nonlinear equation (NLE) solver. These equation solvers will be used extensively in later chapters. Infor- mation on how to obtain and load the Polymath Software is given in Appendix D and on the CRE Web site. (a) There are initially 500 rabbits (x) and 200 foxes (y) on Farmer Oat's property near Ria, Jofostan. Use Polymath or MATLAB to plot the concentration of foxes and rabbits as a function of time for a period of up to 500 days. The predator-prey relationships are given by the following set of cou- pled ordinary differential equations: dx = kjs-kxy a = ksx-y-key Constant for growth of rabbits k, = 0.02 day! Constant for death of rabbits kz = 0.00004/(day x no. of foxes) Constant for growth of foxes after eating rabbits ks = 0.0004/(day x no. of rabbits) Constant for death of foxes ks = 0.04 day! What do your results look like for the case of kz = 0.00004/(day x no. of rabbits) and final = 800 days? Also, plot the number of foxes versus the number of rabbits. Explain why the curves look the way they do. (b) Use Polymath or MATLAB to solve the following set of nonlinear algebraic equations xy-4y2+3x = 1 6y2-9xy = 5 with inital guesses of x=2, y = 2. Try to become familiar with the edit keys in Polymath and MATLAB. See the CRE Web site for instructions Screen shots on how to run Polymath are shown at the end of Summary Notes for Chapter 1 or on the CRE Web site, www.umich.edu/-elements/5e/software/polymath-tuto- rial.html
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
