Mathematics 345 Homework Assignment 1 Due Tuesday 19 January 2016 Reading assignment Read Chapters 1-3 of the textbook. Download and install the software XPPAUT on your computer. One Dimensional Flows For this first assignment you will use the nonlinear dynamics software package XPPAUT to help you explore the dynamics of a simple logistic population growth model with harvesting. Only a small tiny portion of XPPAUT will be needed for this assignment. Before you start, make a pre-defined folder for each one of your assignments at an appropriate location. This is because each time you run the program, it will generate a number of data files containing almost all details of the result. You do not want them to be scattered all over your computer and later try to figure out what they are. Also, the results that you want to keep or the graphs that you want to save should all be saved in the same folder so that you can easily find them in the future. These instructions assume you have XPPAUT installed on your own computer. When you lunch it on your computer, it will open a window asking you to select an ODE file (another accompanying X-terminal will be open on which some intermediate results will be displayed as the program runs) . As the first example, I have provided the file m345 hw1.ode together with this assignment. First, get the file from the course web page. In the future, you will be able to generate your own .ode file. The file has to be saved as a simple text file (a Word file or files in other formats will not be accepted). You have to go to the appropriate location where you saved the file m345 hw1.ode , and then select it. This starts the program and a window (XPP Ver 7.0 >> m345 hw1.ode) will appear. We refer to this as the Main Window. Commands are given by clicking on menu items with the mouse, or else by using keyboard shortcuts. The Main Window is set up to give plots of N on the vertical axis versus t on the horizontal axis. In what follows, use the left mouse button to click. This file corresponds to the differential equation dN = N [ a − b(N − c)2 ], dt 0 ≤ N < ∞, (1) where a, b and c are real constants, called parameters. N (t) is the unknown function of t that XPPAUT will solve (numerically). Notice the equation parameters have been set as a = 0.144, b = 1 × 10−7 , c = 1000. A line beginning with a @ indicates XPPAUT internal parameters that are changed from their default values. The internal parameter total is the total integration time, dt is the time step used by the numerical approximation method, xlo and xhi are the left and right boundaries of the plot display, while ylo and yhi are the lower and upper boundaries. The internal parameter bound is the maximum absolute value of any dependent variable (here it is N ) that is allowed. Specify an initial condition: select Initialconds from the menu, or type the keyboard shortcut I. Now the Integrate menu appears. Select (N)ew. Above the menu and plot region, the command line shows a value for the initial value N0 . Backspace to get rid of the 0, then type 1500 <Return>. In the graphics window, a plot of the numerical solution with N (0) = N0 = 1500 appears. To save the curve for a hardcopy plot later, you must freeze it: select Graphic stuff from the XPP main menu and a new Curves menu appears. Select (F)reeze, which brings up the Freeze menu, select (F)reeze from this new menu and an Edit Freeze window pops up. You can select a different color if you want (any single digit from 0 to 9), but the printer in the lab is black-and-white only. Click the Ok button, which saves the computed curve into a buffer (a temporary file). You must follow this procedure for every curve you want to see printed (keyboard shortcut G F F then click Ok with mouse). Otherwise the curve will not be printed, even if you see it on the screen! If you don’t want to bother with freezing every curve, then turn on the automatic freeze by selecting Graphic stuff (F)reeze (O)n freeze but this will freeze all your mistakes too, if you make any. Turn the automatic freeze off by selecting Graphic stuff (F)reeze (O)ff freeze. Repeat the Initialconds (N)ew procedure (keyboard shortcut I N), choosing several different initial conditions. If you haven’t turned on the automatic freeze, remember to freeze each curve that you want to show up on the hardcopy plot later. If a curve goes out of bounds just click on the Ok button in the warning box. If you choose the wrong menu item by mistake, get rid of it by pressing the Esc key on the keyboard. To add labels to the picture, select Text,etc (T)ext. Then in the command line type a text label like a = 0.144, b = 1e-7, c = 1000, then <Return> <Return> gets you a window that says Place text with mouse. Put the mouse cursor in the black plot region where you want the label to begin, and click. Repeat this procedure to put appropriate labels on the axes, etc. Copy the buffer, containing the frozen curves, to a Postscript file so you can print it. Select Graphic stuff (P)ostscript. Click Ok in the first box that appears to accept the defaults for now, then in the next box that appears edit the filename. You could, for example, call the file hw1a144.ps to remind yourself a = 0.144 for this picture. Take some care in choosing names, since when you create a file, it will overwrite any existing file in the same directory with the same name. The extension .ps on the filename identifies it on a Unix system as a Postscript file. The parameter can be changed for another plot. First erase the buffer containing the frozen curves from the previous plot by selecting Graphic stuff (F)reeze (R)emove all. Select Erase to erase the curves in the Main Window. Then delete or edit the text labels by selecting Text,etc and then either (D)elete all or (E)dit. In the edit case, follow the prompts which appear. To change the equation parameters a, b, c in the computation, click on the Param button near the top edge of the Main Window, and edit the parameter values in the small Parameter Window that appears. 2 To quit XPPAUT select File Quit YES. This is the assignment: The equation (1), where b > 0 and c > 0, describes a population whose per capita growth rate Ṅ /N is highest at some positive value of the population size N (rather than at N = 0 as in the logistic equation). This is called the Allee effect, and can model such effects as greater ease in finding mates, finding food or evading predators when the population grows to a certain size. 1. For each of the three values i) a = 0.144, ii) a = 0.025, and iii) a = −0.015 of the parameter a, with the remaining parameters fixed at b = 10−7 , c = 1000: Find the fixed points, and determine the linearized stability of each fixed point (consider only 0 ≤ N < ∞). Plot Ṅ versus N by hand for the three values of a, and sketch the phase portraits in each case. Also in each case sketch the graphs of typical solutions, N (on the vertical axis) versus t (on the horizontal axis). 2. Use XPPAUT to compute and plot a number of solution curves N versus t with different well-chosen initial conditions N (0) = N0 , for each of the three values a = 0.144, a = 0.025 and a = −0.015. The initial conditions should be chosen to display all the qualitatively different types of behaviour possible. For example, all equilibrium solutions should be represented, and other solutions should illustrate the stability or instability of the equilibrium solutions. Keep the other parameter values as b = 10−7 , c = 1000. Print the three plots and hand them in with this assignment. Comment on the correspondence between your XPPAUT plots and your hand drawn plots from the previous question. 3. Show that (1) can be written in dimensionless form as dx = x[ r − (x − 1)2 ], dτ 0 ≤ x < ∞. (2) for suitably defined dimensionless quantities x, τ , r. Assume that the unit of time for (1) is a year. Give the expressions that define x, τ , r in terms of N , t, a, b, c. 4. Show that a saddle-node bifurcation for (2) occurs at x = x∗ = 1, r = rc1 = 0, by verifying that the conditions that imply the existence of a saddle-node bifurcation are all satisfied. 5. Show that another bifurcation for (2) occurs at r = rc2 , where rc2 6= rc1 . Find rc2 , and classify the bifurcation as saddle-node, transcritical or pitchfork. 6. What critical value of a does r = rc2 correspond to in the original equation (1)? Comment on how your XPPAUT plots are consistent (or not) with this critical value of a. 7. The parameter b in (1) measures how strongly the population level affects the per capita growth rate of the population. Give interpretations of the parameters a and c. Interpret your results from the previous questions biologically, with regard to how the value of a affects the possibility of extinction. 3