Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5:...

12
Math 442 - Mathematical Modeling Glenn Lahodny Jr. Spring 2015 1 Growth and Decay, Dynamical Systems 1.1 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 dt [x(t) · V ] = 0 - rx(t) dx dt = - r V x. If r is constant, the solution of this differential equation is x(t)= x 0 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) = 0.05x 0 x 0 e -rt/V = 0.05x 0 e -rt/V = 0.05 -rt/V = ln(0.05) t = - V r ln(0.05) t 0.05 = V r ln(20) days. 1

Transcript of Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5:...

Page 1: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

Math 442 - Mathematical Modeling

Glenn Lahodny Jr.

Spring 2015

1 Growth and Decay, Dynamical Systems

1.1 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 almostuniform. Let x(t) denote the concentration of contaminant (in grams per cubic meter ofwater) at time t ≥ 0. Let r > 0 denote the rate at which water flows out of the lake (incubic meters per day). Since the lake has a fixed volume, r is also the rate at which waterflows into the lake. This may correspond to a balance between rainfall and evaporation. Ifall input suddenly ceases, how much time will lapse before the level of pollution is reducedto 5% of its initial level?

The following ordinary differential equation represents the rate of change of pollution

Rate of Change = Rate In− Rate Outd

dt[x(t) · V ] = 0− rx(t)

dx

dt= − r

Vx.

If r is constant, the solution of this differential equation is

x(t) = x0e−rt/V .

To determine the time it takes for the level of pollution to be reduced to 5% of its initiallevel, let

x(t) = 0.05x0

x0e−rt/V = 0.05x0

e−rt/V = 0.05

−rt/V = ln(0.05)

t = −Vr

ln(0.05)

t0.05 =V

rln(20) days.

1

Page 2: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

Table 1.1: Volumes and average daily inflow/outflow rates for the Great Lakes.Lake Volume Inflow/Outflow Rate

Lake Erie 458× 109 479,582,208Lake Michigan 4871× 109 433,092,096Lake Superior 12, 221× 109 178,619,904

We can apply this result to the Great Lakes. The volumes and average daily inflow/outflowrates 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 havet0.05 ≈ 33, 693 days or 92 years for Lake Michigan, and t0.05 ≈ 204, 965 days or 562 years forLake Superior. These values must, of course, be interpreted in terms of the initial pollutionlevel x0.

This model has many assumptions. We have assumed that r is a constant, but it mayvary seasonally. However, it can be shown that seasonal variations do not significantly affectthe estimate for t0.05. Additionally, we have assumed that the lake is well mixed so that xdoes 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 RadioactiveDecay states that the rate at which a radioactive isotope decays is proportional to its mass.That is,

dx

dt= −λx.

The solution of this differential equation is

x(t) = x0e−λt.

To compute the half-life of an isotope, let

x(t) = 0.5x0

x0e−λt = 0.5x0

e−λt = 0.5

−λt = ln(0.5)

t = − ln(0.5)

λ

t0.5 =ln(2)

λ.

2

Page 3: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

1.3 Plant Growth

Consider a plant which feeds off a fixed amount of a single substrate. Let x(t) denote thedry weight of the plant at time t ≥ 0 and let S(t) denote the weight of the substrate thatremains 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 isproportional to the amount of substrate. Therefore, a simple model for plant growth is

dx

dt= kSx.

Assuming no material is lost when S is converted to x, it follows that S = xf − x, where xfis the value of x corresponding to S = 0. It follows that

dx

dt= k(xf − x)x.

The solution of this differential equation is

x(t) =x0xf

x0 + (xf − x0)e−kxf t.

A graph of this solution for various initial conditions is given in Figure 1.1. Note that thegraph 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 typeof growth is known as logistic growth.

Time

0 1 2 3 4 5 6 7

Pla

nt

We

igh

t

0

1

2

3

4

5

6

7

8

9

10Logistic Plant Growth

Figure 1.1: Plant growth over time.

3

Page 4: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

1.4 A Simple Ecosystem (Predator-Prey)

1.4.1 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

dt= µ1(x, y, t)x,

dy

dt= µ2(x, y, t)y,

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) theherbivore population will grow exponentially: µ1 = a1, where a1 > 0 is the difference betweenthe average birth and death rates for herbivores. Since carnivores are present, the growthrate of herbivores is decreased. Assuming this decrease is proportional to the number ofcarnivores, we have µ1 = a1 − b1y, where b1 > 0 is an interaction parameter. Therefore,

dx

dt= (a1 − b1y)x.

Similarly, in the absence of herbivores (x(t) = 0) the carnivore population will decreaseexponentially: µ2 = −a2, where a2 > 0 is constant. Since herbivores are present, the growthrate of carnivores is increased. Assuming this increase is proportional to the number ofherbivores, we have µ2 = −a2 + b2x, where b2 > 0 is an interaction parameter. Therefore,

dy

dt= (−a2 + b2x)y.

The following system of ordinary differential equations models the growth and decay ofthese two species:

dx

dt= (a1 − b1y)x,

dy

dt= (−a2 + b2x)y.

These equations are known as the Lotka-Volterra predator-prey equations. These equationscannot 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 forthese parameter values is plotted in Figure 1.2. Note that the graphs of x and y are periodicwith period 2.4. Pairs of values (x(t), y(t)) representing the solution are plotted in the xy-plane 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

Page 5: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

Time

0 1 2 3 4 5 6

Popula

tion (

in thousands)

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

5.5Time Series

Prey

Predator

Figure 1.2: Solution of the Lotka-Volterra predator-prey model with the parameter valuesa1 = 3, a2 = 2.5, b1 = 2, b2 = 1 and initial conditions x(0) = y(0) = 1.

Prey x(t)

0 1 2 3 4 5 6

Pre

dato

r y(t

)

0.5

1

1.5

2

2.5

3

3.5Phase Portrait

Figure 1.3: Phase-plane diagram for the Lotka-Volterra predator-prey model with the pa-rameter values a1 = 3, a2 = 2.5, b1 = 2, and b2 = 1.

5

Page 6: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

1.5 A Second Simply Ecosystem (Competition)

1.5.1 Model Development

Consider two species that compete for the same food supply. For example, two herbivorescompeting over grass. Let x(t) and y(t) denote the populations (in thousands) of the twospecies at time t ≥ 0.

A general model for the two populations is

dx

dt= µ1(x, y, t)x,

dy

dt= µ2(x, y, t)y,

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 growthrate. Assuming that the decrease for one population is proportional to the size of the otherpopulation, we have µ1 = a1 − b1y and µ2 = a2 − b2x, where a1, a2 > 0 are growth rates andb1, b2 > 0 are interaction (crowding) parameters. Therefore, the growth and decay of thesetwo species is is described by the following system of ordinary differential equations:

dx

dt= (a1 − b1y)x,

dy

dt= (a2 − b2x)y.

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 systemfor these parameter values is plotted in Figure 1.4. Note that species X survives while speciesY eventually becomes extinct.

A phase-plane diagram illustrating solution trajectories for these parameter values andvarious initial conditions is plotted in Figure 1.5. Notice that, regardless of the initialconditions, only one species survives. The initial conditions, however, do affect which speciessurvives. This illustrates the biological principle of competitive exclusion which states thatif two species are competing for a common resource, only one species can survive in the longrun.

6

Page 7: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

Time

0 2 4 6 8 10

Popula

tion (

in thousands)

0

1

2

3

4

5

6

7

8Time Series

Species 1

Species 2

Figure 1.4: Solution of the Lotka-Volterra competition model with the parameter valuesa1 = 3, a2 = 2.5, b1 = 2, b2 = 1 and initial conditions x(0) = 2 and y(0) = 1.

x

0 1 2 3 4 5 6

y

0

1

2

3

4

5

6Phase Portrait

Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parametervalues a1 = 3, a2 = 2.5, b1 = 2, and b2 = 1. The direction field is plotted in red, solutiontrajectories in blue, and the separatrix in black.

7

Page 8: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

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 inTable 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.311810 2 7.24 2.17 0.31820 3 9.64 2.81 0.291830 4 12.87 3.72 0.291840 5 17.07 5.16 0.31850 6 23.19 - -

Notice that population increases with time. The simplest model that explains this is

dx

dt= c,

where c > 0 is a constant. However, if we compute

D(t) =1

2[x(t+ 1)− x(t− 1)],

we find that D(t) is also increasing with time. Provided that dx3/dt3 is small (the concavityof 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 modelof the form

1

x

dx

dt= 0.3

dx

dt= 0.3x.

The solution of this differential equation is

x(t) = x0e0.3t = 3.93e0.3t. (1)

This equation yields good predictions for 1790–1850.

8

Page 9: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 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.311860 7 31.4 32 7.68 0.241870 8 38.6 43 9.36 0.241880 9 50.2 58 12.2 0.241890 10 62.95 78 12.9 0.21900 11 75.96 110 14.5 0.191910 12 91.97 140 14.9 0.16

Can the same model predict the population in later years? The number (in millions) inthe 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

x(t) =

{3.93e0.3t, 0 ≤ t < 731.4e0.24(t−7), t ≥ 7.

This equation yields good predictions for 1790–1890. However, it significantly overestimatesthe population in more recent years.

To develop a better model from the empirical data, the values of D/x are plotted againstthose for x in Figure 1.6.

Notice that the points corresponding to the years 1800–1940 are clustered around thedashed line. This is the best fit line for the data from 1800–1940. The outlying pointscorresponding to 1950 and 1960 are not included in the best fit analysis. The best fit lineintercepts the vertical axis at about 0.31 and the horizontal axis at about 198. Hence, thedata suggests the improved model

1

x

dx

dt= 0.31

(1− x

198

)dx

dt= 0.31x

(1− x

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. (2)

This equation yields good predictions for 1790–1950. In fact the percentage error

100×(

1− Predicted Value

Observed Value

)%

is less than 2.5% throughout this entire period.

9

Page 10: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

x

0 50 100 150 200

D/x

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Figure 1.6: U.S. population (horizontal axis) plotted against the specific growth rate (verticalaxis) for the years 1800–1960. The unit of time is one decade and population is measured inmillions.

The model that we derived empirically from the data could also have been conceptuallyderived from the following argument. Consider a general population model of the form

dx

dt= µ(t, x)x,

where µ is the specific growth rate. Assume that there is a maximum population (carryingcapacity) 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 thecarrying 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

dt= rx

(1− x

K

).

For the U.S. population, we estimated that r = 0.31 and K = 198. This implies thatthe carrying capacity of the U.S. population is 198 million people. However, there arean estimated 302 million people in the U.S. today. Does this mean that the empiricalmodel is useless or can we improve it to resolve the discrepancy between the predictions andobservations?

10

Page 11: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

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 theLotka-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

Page 12: Math 442 - Mathematical Modelingglahodny/Math442/Chapter 1.pdf · Phase Portrait Figure 1.5: Phase-plane diagram for the Lotka-Volterra competition model with parameter values a 1

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