unit03.mws

ORDINARY DIFFERENTIAL EQUATIONS POWERTOOL

Unit 3 -- Application: Exponential and Logistic Growth

Prof. Douglas B. Meade

Industrial Mathematics Institute

Department of Mathematics

University of South Carolina

Columbia, SC 29208

URL: http://www.math.sc.edu/~meade/

E-mail: meade@math.sc.edu

Copyright © 2001 by Douglas B. Meade

All rights reserved

-------------------------------------------------------------------

>

Outline for Unit 3

>

Initialization

> restart;

> with( DEtools ):

> with( plots ):

> with( linalg ):

Warning, the name changecoords has been redefined

Warning, the name adjoint has been redefined

Warning, the protected names norm and trace have been redefined and unprotected

>

3.A Exponential Growth and Decay

3.A-1 General Solution

The general model for exponential growth and decay with "growth" constant k , is

> ode := diff( x(t), t ) = k * x(t);

ode := diff(x(t),t) = k*x(t)

>

and initial condition

> ic := x(0) = A;

ic := x(0) = A

>

This equation is seen to be separable, and Maple agrees with this classification

> odeadvisor( ode, [separable] );

[_separable]

>

To find the general solution from first principles,

> impl_soln := subs( _t=t, map( int, ode/x(t), t=0.._t ) );

impl_soln := ln(x(t))-ln(x(0)) = k*t

> impl_part_soln := subs( ic, impl_soln );

impl_part_soln := ln(x(t))-ln(A) = k*t

> expl_part_soln := op(solve( impl_part_soln, {x(t)} ));

expl_part_soln := x(t) = exp(k*t)*A

>

Of course, the same result could be obtained from

> infolevel[dsolve] := 3:

> soln2 := dsolve( {ode, ic}, x(t), [separable] );

> infolevel[dsolve] := 0:

Classification methods on request

Methods to be used are:   [separable]

Trying to isolate the derivative dx/dt...

Successful isolation of dx/dt

----------------------------

* Tackling ODE using method:   separable

   -> Trying classification methods

   trying separable

   separable successful

soln2 := x(t) = exp(ln(A)+k*t)

> simplify( soln2 );

x(t) = exp(k*t)*A

>

3.A-2 Doubling Time

The doubling time for a process growing exponentially is the time needed for the quantity to double from its original size. That is, the time t[d] such that x(t[d]) = 2*x(0) .

> double_eqn := subs( t=t[d], x(t[d])=2*x(0), ic, expl_part_soln );

double_eqn := 2*A = exp(k*t[d])*A

> double_time := solve( double_eqn, {t[d]} );

double_time := {t[d] = ln(2)/k}

>

One of the important characteristics of the doubling time is that not only is it the time needed for the initial size to double, it is the time needed for the size to double at any point in an exponential process.

> q1 := x(T+t[d])/x(T)

> = subs( t=T+t[d],

> rhs(expl_part_soln) ) / subs( t=T, rhs(expl_part_soln) );

q1 := x(T+t[d])/x(T) = exp(k*(T+t[d]))/exp(k*T)

> q1;

> `` = simplify(eval( rhs(q1), double_time ));

x(T+t[d])/x(T) = exp(k*(T+t[d]))/exp(k*T)

`` = 2

>

3.A-3 Half-Life

The half-life for a quantity that is decaying according to an exponential model is the time after which exactly half the original amount remains.

> half_eqn := subs( t=t[h], x(t[h])=1/2*x(0), ic, expl_part_soln );

half_eqn := 1/2*A = exp(k*t[h])*A

> half_time := solve( half_eqn, {t[h]} );

half_time := {t[h] = -ln(2)/k}

>

Note that k <0 for a decaying process. Thus, the half-life for an exponential model with "growth" rate -k is the same as the doubling time for an exponential model with growth rate k .

>

3.B Logistic Equation

3.B-1 General Solution

The general logistic equation is a modification of the exponential model in which the growth is tempered by the factor ( K-x(t) ).

> logistic_ode := diff( x(t), t ) = A * x(t) * ( K - x(t) );

logistic_ode := diff(x(t),t) = A*x(t)*(K-x(t))

>

with initial condition

> logistic_ic := x(0)=X[0];

logistic_ic := x(0) = X[0]

>

This ODE is easily separated,

> sep_log_ode := logistic_ode / (x(t)*(K-x(t)));

sep_log_ode := diff(x(t),t)/(x(t)*(K-x(t))) = A

>

integrated from the initial time, 0, to any other time t,

> part_log_soln := subs( _t=t, logistic_ic, map(int,sep_log_ode,t=0.._t) );

part_log_soln := (ln(x(t))-ln(K-x(t))-ln(X[0])+ln(K...

>

and solved for x(t) to obtain the explicit solution

> part_expl_soln := collect(op( solve( part_log_soln, {x(t)} ) ),exp);

part_expl_soln := x(t) = X[0]*K*exp(A*t*K)/(K-X[0]+...

A quick check that this is, in fact, a solution to the original ODE shows

> odetest( part_expl_soln, logistic_ode );

0

>

and, for the initial condition,

> eval( part_expl_soln, t=0 );

x(0) = X[0]

>

3.B-2 Carrying Capacity

Before discussing the generic properties of the logistic model, it is instructive to use graphical methods to examine a specific example. Let

> param := { A = 1/2, K=3 };

param := {A = 1/2, K = 3}

> l_ode := subs(param,logistic_ode);

l_ode := diff(x(t),t) = 1/2*x(t)*(3-x(t))

>

Then, the direction field for this model is

> DEplot( l_ode, x(t), t=0..10, x=0..10, arrows=SMALL );

[Maple Plot]

>

The equilibrium solution at x = 3 is obvious in the graph (and the equation); the equilibrium at x = 0 is obvious from the equation. Initial conditions that will produce the equilibrium solutions are

> equil_ic := [ [x(0)=0], [x(0)=3] ];

equil_ic := [[x(0) = 0], [x(0) = 3]]

> equil_plot := DEplot( l_ode, x(t), t=0..5, equil_ic, x=0..10,

> arrows=SMALL, linecolor=CYAN ):

> equil_plot;

[Maple Plot]

>

A sample of solutions with initial conditions between the two equilibria

> ic1 := [ [x(0)=i/2] $ i=1..5 ]:

> soln_plot1 := DEplot( l_ode, x(t), t=0..5, ic1, x=0..10, arrows=SMALL,

> linecolor=GREEN ):

> soln_plot1;

[Maple Plot]

>

Note that all of these solutions are increasing and appear to approach x = 3 as t continues to increase.

Next, a sample of solutions with initial conditions above the positive equilibrium

> ic2 := [ [x(0)=2*i] $ i=2..5 ]:

> soln_plot2 := DEplot( l_ode, x(t), t=0..5, ic2, x=0..10, arrows=SMALL,

> linecolor=BLUE, stepsize=0.1 ):

> soln_plot2;

[Maple Plot]

>

These solutions are all decreasing and also appear to approach the x = 3 as t increases.

The composite plot is

> display( [equil_plot, soln_plot1, soln_plot2] );

[Maple Plot]

>

To investigate some of the general properties of solutions to the logistic equation, note that the equilibrium solutions are

> equil_sol := solve( rhs(logistic_ode)=0, {x(t)} );

equil_sol := {x(t) = 0}, {x(t) = K}

>

A quick inspection of the ODE shows that diff(x(t),t) > 0 when 0 < x(t) < K and diff(x(t),t) < 0 when x(t) > K . The long-term behavior of the solutions can be determined from the explicit solution to the IVP

> limit_size := Limit( part_expl_soln, t=infinity );

limit_size := Limit(x(t) = X[0]*K*exp(A*t*K)/(K-X[0...

> value( limit_size );

limit(x(t),t = infinity) = limit(X[0]*K*exp(A*t*K)/...

>

Maple is unable to evaluate this limit because it is unable to decide if exp(A*K*t) tends to 0 or infinity (or does not exist). However, under the physical assumptions,

> assume( A>=0, K>0 );

>

the limiting size is found to be

> value( limit_size );

limit(x(t),t = infinity) = K

>

Because all solutions with x(0) > K decrease to x = K and all solutions with 0 < x(0) < K increase to x = K , the parameter K is known as the carrying capacity of the logistic equation.

> unassign('A','K');

>

[Back to ODE Powertool Table of Contents]

>