Math 442 - Mathematical Modeling Glenn Lahodny Jr. Spring 2015 1 1.1 Growth and Decay, Dynamical Systems Lake Purification Consider a population of particles that contaminate a lake of fixed volume V cubic meters. Assume that the lake is well mixed so that the concentration throughout will be almost uniform. Let x(t) denote the concentration of contaminant (in grams per cubic meter of water) at time t ≥ 0. Let r > 0 denote the rate at which water flows out of the lake (in cubic meters per day). Since the lake has a fixed volume, r is also the rate at which water flows into the lake. This may correspond to a balance between rainfall and evaporation. If all input suddenly ceases, how much time will lapse before the level of pollution is reduced to 5% of its initial level? The following ordinary differential equation represents the rate of change of pollution Rate of Change = Rate In − Rate Out d [x(t) · V ] = 0 − rx(t) dt r dx = − x. dt V If r is constant, the solution of this differential equation is x(t) = x0 e−rt/V . To determine the time it takes for the level of pollution to be reduced to 5% of its initial level, let x(t) = x0 e = −rt/V e = −rt/V = 0.05x0 0.05x0 0.05 ln(0.05) V t = − ln(0.05) r V t0.05 = ln(20) days. r −rt/V 1 Table 1.1: Volumes and average daily inflow/outflow rates for the Great Lakes. Lake Volume Inflow/Outflow Rate 9 Lake Erie 458 × 10 479,582,208 9 Lake Michigan 4871 × 10 433,092,096 9 Lake Superior 12, 221 × 10 178,619,904 We can apply this result to the Great Lakes. The volumes and average daily inflow/outflow rates for Lake Erie, Lake Michigan, and Lake Superior are given in Table 1.1. Therefore, for Lake Erie, we have t0.05 ≈ 2871 days or 7.8 years. Similarly, we have t0.05 ≈ 33, 693 days or 92 years for Lake Michigan, and t0.05 ≈ 204, 965 days or 562 years for Lake Superior. These values must, of course, be interpreted in terms of the initial pollution level x0 . This model has many assumptions. We have assumed that r is a constant, but it may vary seasonally. However, it can be shown that seasonal variations do not significantly affect the estimate for t0.05 . Additionally, we have assumed that the lake is well mixed so that x does not vary across the lake. Poor mixing would likely prolong the cleaning and therefore, our estimate for t0.05 would represent a lower bound (the most optimistic cleaning time). 1.2 Radioactive Decay Let x(t) denote the mass of a radioactive isotope at time t ≥ 0. The Law of Radioactive Decay states that the rate at which a radioactive isotope decays is proportional to its mass. That is, dx = −λx. dt The solution of this differential equation is x(t) = x0 e−λt . To compute the half-life of an isotope, let x(t) x0 e−λt e−λt −λt = = = = 0.5x0 0.5x0 0.5 ln(0.5) ln(0.5) t = − λ ln(2) t0.5 = . λ 2 1.3 Plant Growth Consider a plant which feeds off a fixed amount of a single substrate. Let x(t) denote the dry weight of the plant at time t ≥ 0 and let S(t) denote the weight of the substrate that remains at time t ≥ 0. The more substrate there is, the greater the growth rate of the plant; the less substrate, the slower the growth. That is, the specific growth rate of the plant is proportional to the amount of substrate. Therefore, a simple model for plant growth is dx = kSx. dt Assuming no material is lost when S is converted to x, it follows that S = xf − x, where xf is the value of x corresponding to S = 0. It follows that dx = k(xf − x)x. dt The solution of this differential equation is x(t) = x0 xf . x0 + (xf − x0 )e−kxf t A graph of this solution for various initial conditions is given in Figure 1.1. Note that the graph is slightly S-shaped. It bends upward toward an inflection point, where x(t) = 0.5xf , and then bends downward, approaching the horizontal asymptote xf as t → ∞. This type of growth is known as logistic growth. Logistic Plant Growth 10 9 8 Plant Weight 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 Time Figure 1.1: Plant growth over time. 3 7 1.4 1.4.1 A Simple Ecosystem (Predator-Prey) Model Development Consider a two-species population model with carnivores and herbivores. Let x(t) and y(t) denote the population (in thousands) of herbivores and carnivores at time t ≥ 0, respectively. The carnivores eat herbivores and the herbivores eat grass. A general model for the two populations is dx = µ1 (x, y, t)x, dt dy = µ2 (x, y, t)y, dt where µ1 and µ2 are the specific growth rates for herbivores and carnivores, respectively. Populations tend to grow exponentially until some other factor (e.g. crowding, disease, predation) interferes with that growth. Hence, in the absence of carnivores (y(t) = 0) the herbivore population will grow exponentially: µ1 = a1 , where a1 > 0 is the difference between the average birth and death rates for herbivores. Since carnivores are present, the growth rate of herbivores is decreased. Assuming this decrease is proportional to the number of carnivores, we have µ1 = a1 − b1 y, where b1 > 0 is an interaction parameter. Therefore, dx = (a1 − b1 y)x. dt Similarly, in the absence of herbivores (x(t) = 0) the carnivore population will decrease exponentially: µ2 = −a2 , where a2 > 0 is constant. Since herbivores are present, the growth rate of carnivores is increased. Assuming this increase is proportional to the number of herbivores, we have µ2 = −a2 + b2 x, where b2 > 0 is an interaction parameter. Therefore, dy = (−a2 + b2 x)y. dt The following system of ordinary differential equations models the growth and decay of these two species: dx = (a1 − b1 y)x, dt dy = (−a2 + b2 x)y. dt These equations are known as the Lotka-Volterra predator-prey equations. These equations cannot be solved analytically. However, they can be solved numerically in MATLAB. 1.4.2 Numerical Analysis Consider the Lotka-Volterra predator-prey model with the parameter values a1 = 3, a2 = 2.5, b1 = 2, and b2 = 1 and initial conditions x(0) = y(0) = 1. The solution of the system for these parameter values is plotted in Figure 1.2. Note that the graphs of x and y are periodic with period 2.4. Pairs of values (x(t), y(t)) representing the solution are plotted in the xyplane for different initial conditions to construct a phase-plane diagram (see Figure 1.3). The MATLAB code used to generate these figures can be found in Appendix A. 4 Time Series 5.5 Prey Predator 5 Population (in thousands) 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 1 2 3 4 5 6 Time Figure 1.2: Solution of the Lotka-Volterra predator-prey model with the parameter values a1 = 3, a2 = 2.5, b1 = 2, b2 = 1 and initial conditions x(0) = y(0) = 1. Phase Portrait 3.5 3 Predator y(t) 2.5 2 1.5 1 0.5 0 1 2 3 4 5 6 Prey x(t) Figure 1.3: Phase-plane diagram for the Lotka-Volterra predator-prey model with the parameter values a1 = 3, a2 = 2.5, b1 = 2, and b2 = 1. 5 1.5 1.5.1 A Second Simply Ecosystem (Competition) Model Development Consider two species that compete for the same food supply. For example, two herbivores competing over grass. Let x(t) and y(t) denote the populations (in thousands) of the two species at time t ≥ 0. A general model for the two populations is dx = µ1 (x, y, t)x, dt dy = µ2 (x, y, t)y, dt where µ1 and µ2 are the specific growth rates for species X and Y , respectively. Each species would grow exponentially in the absence of the other; whereas, each species would have a restraining effect on the food supply of the other, decreasing the growth rate. Assuming that the decrease for one population is proportional to the size of the other population, we have µ1 = a1 − b1 y and µ2 = a2 − b2 x, where a1 , a2 > 0 are growth rates and b1 , b2 > 0 are interaction (crowding) parameters. Therefore, the growth and decay of these two species is is described by the following system of ordinary differential equations: dx = (a1 − b1 y)x, dt dy = (a2 − b2 x)y. dt These equations are known as the Lotka-Volterra competition equations or Gause’s equations. Again, these equations can only be solved by numerical methods. 1.5.2 Numerical Analysis Consider the Lotka-Volterra competition model with the parameter values a1 = 3, a2 = 2.5, b1 = 2, and b1 = 1 and initial conditions x(0) = 2 and y(0) = 1. The solution of the system for these parameter values is plotted in Figure 1.4. Note that species X survives while species Y eventually becomes extinct. A phase-plane diagram illustrating solution trajectories for these parameter values and various initial conditions is plotted in Figure 1.5. Notice that, regardless of the initial conditions, only one species survives. The initial conditions, however, do affect which species survives. This illustrates the biological principle of competitive exclusion which states that if two species are competing for a common resource, only one species can survive in the long run. 6 Time Series 8 Species 1 Species 2 7 Population (in thousands) 6 5 4 3 2 1 0 0 2 4 6 8 10 Time Figure 1.4: Solution of the Lotka-Volterra competition model with the parameter values a1 = 3, a2 = 2.5, b1 = 2, b2 = 1 and initial conditions x(0) = 2 and y(0) = 1. Phase Portrait 6 5 y 4 3 2 1 0 0 1 2 3 4 5 6 x Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a1 = 3, a2 = 2.5, b1 = 2, and b2 = 1. The direction field is plotted in red, solution trajectories in blue, and the separatrix in black. 7 1.6 Economic Growth 1.7 Metered Growth/Decay Models 1.8 Salmon Dynamics 1.9 A Model of U.S. Population Growth The number (in millions) in the United States (U.S.) population from 1790–1850 is given in Table 1.2. The unit of time is a decade, and x(t) denotes the population size at time t ≥ 0. Table 1.2: U.S. Population data for 1790–1850. Taken from the U.S. census. Year Time, t Population, x(t) D(t) D(t)/x(t) 1790 0 3.93 1800 1 5.31 1.66 0.31 1810 2 7.24 2.17 0.3 1820 3 9.64 2.81 0.29 1830 4 12.87 3.72 0.29 1840 5 17.07 5.16 0.3 1850 6 23.19 - Notice that population increases with time. The simplest model that explains this is dx = c, dt where c > 0 is a constant. However, if we compute 1 D(t) = [x(t + 1) − x(t − 1)], 2 we find that D(t) is also increasing with time. Provided that dx3 /dt3 is small (the concavity of dx/dt does not change rapidly), then D(t) is a good approximation of dx/dt. Since D(t) is increasing with time, we reject the hypothesis that dx/dt is a constant. On the other hand, D(t)/x(t) is almost constant for 1790–1850. This suggests a model of the form 1 dx = 0.3 x dt dx = 0.3x. dt The solution of this differential equation is x(t) = x0 e0.3t = 3.93e0.3t . This equation yields good predictions for 1790–1850. 8 (1) Table 1.3: U.S. Population data for 1850–1970. Taken from the U.S. census. Year Time, t Population, x(t) Equation (1) D(t) D(t)/x(t) 1850 6 23.2 24 7.19 0.31 1860 7 31.4 32 7.68 0.24 1870 8 38.6 43 9.36 0.24 1880 9 50.2 58 12.2 0.24 1890 10 62.95 78 12.9 0.2 1900 11 75.96 110 14.5 0.19 1910 12 91.97 140 14.9 0.16 Can the same model predict the population in later years? The number (in millions) in the U.S. population from 1850–1970 is given in Table 1.3 Clearly the model in Equation (1) yields overestimates in later years. On the other hand, D(t)/x(t) ≈ 0.24 for the years 1860–1880. This suggests the improved model 3.93e0.3t , 0≤t<7 x(t) = 0.24(t−7) 31.4e , t ≥ 7. This equation yields good predictions for 1790–1890. However, it significantly overestimates the population in more recent years. To develop a better model from the empirical data, the values of D/x are plotted against those for x in Figure 1.6. Notice that the points corresponding to the years 1800–1940 are clustered around the dashed line. This is the best fit line for the data from 1800–1940. The outlying points corresponding to 1950 and 1960 are not included in the best fit analysis. The best fit line intercepts the vertical axis at about 0.31 and the horizontal axis at about 198. Hence, the data suggests the improved model x 1 dx = 0.31 1 − x dt 198 dx x = 0.31x 1 − . dt 198 The solution of this differential equation subject to the initial condition x(0) = 3.93 is x(t) = 198 . 1 + 49.4e−0.31t This equation yields good predictions for 1790–1950. In fact the percentage error Predicted Value 100 × 1 − % Observed Value is less than 2.5% throughout this entire period. 9 (2) 0.35 0.3 0.25 D/x 0.2 0.15 0.1 0.05 0 0 50 100 150 200 x Figure 1.6: U.S. population (horizontal axis) plotted against the specific growth rate (vertical axis) for the years 1800–1960. The unit of time is one decade and population is measured in millions. The model that we derived empirically from the data could also have been conceptually derived from the following argument. Consider a general population model of the form dx = µ(t, x)x, dt where µ is the specific growth rate. Assume that there is a maximum population (carrying capacity) K > 0 that the environment can sustain. When the population size is small, x ≈ 0, the population grows exponentially, µ = r > 0 and when the population reaches the carrying capacity, x = K, there is no further growth µ = 0. There are several choices for µ that would satisfy this assumption, but the simplest such choice is the line that connects (0, r) and (K, 0). That is, dx x = rx 1 − . dt K For the U.S. population, we estimated that r = 0.31 and K = 198. This implies that the carrying capacity of the U.S. population is 198 million people. However, there are an estimated 302 million people in the U.S. today. Does this mean that the empirical model is useless or can we improve it to resolve the discrepancy between the predictions and observations? 10 References [1] M. Mesterton-Gibbons, A Concrete Approach to Mathematical Modelling, Wiley, 2007. Appendix A: MATLAB Files The following function M-file defines the Lotka-Volterra predator-prey model: % Glenn Lahodny Jr. % Math 442 - Mathematical Modeling % This function defines the Lotka-Volterra predator-prey model. function dx=LotVolt1(t,x) % Parameters a1=3; a2=2.5; b1=2; b2=1; % ODEs (Here, x1=x and x2=y) dx=zeros(2,1); dx(1)=(a1-b1*x(2))*x(1); dx(2)=(-a2+b2*x(1))*x(2); The following script M-file uses the built-in MATLAB ODE solver ode45 to solve the Lotka-Volterra predator-prey model. % Glenn Lahodny Jr. % Math 442 - Mathematical Modeling % This program solves the Lotka-Volterra predator-prey model defined by % the function LotVolt1.m using the ODE solver ode45 and plots the % solutions over time as well as a phase portrait. clear % Maximum Time tmax=6; % Time Span tspan=[0 tmax]; % Initial Conditions 11 x0=1; y0=1; Init=[x0,y0]; % Solves ODEs [t,x]=ode45(’LotVolt1’,tspan,Init); % Plot Information figure(1) plot(t,x(:,1),’b-’,t,x(:,2),’r--’,’linewidth’,1.5) title(’Time Series’) xlabel(’Time’) ylabel(’Population (in thousands)’) legend(’Prey’,’Predator’) figure(2) plot(x(:,1),x(:,2),’k-’,’linewidth’,1.5) title(’Phase Portrait’) xlabel(’Prey x(t)’) ylabel(’Predator y(t)’) 12