Math 56

September 20, 2007

Problem Set 1– SOLUTIONS(partial Thursday-morning version…)

1. (“Hard” exponential model)

a. Consider the discrete model

xk+1 = xk (1+R) for k = 0, 1, 2, …(1)

where x0 and R are parameters of the model (i.e., treat them

as if they are known constants).

Show that this model has the analytic solution

xk = x0 (1+R)k for every integer k ≥ 0.(2)

We will show that if (1) holds for all k ≥ 0, then (2) holds for all k ≥ 0. Intuitively:

x1 = x0 (1+R)(by (1) for k=0)

x2 = x1 (1+R)(by (1) for k=1)

= x0 (1+R)2(substituting x1 from above)

x3 = x2 (1+R)(by (1) for k=2)

= x0 (1+R)3(substituting x2 from above)

etc.

More formally, by induction: the base case x0=x0(1+R)0 is immediate, and if (2) holds for k, it holds for k+1 because

xk+1 = xk (1+R)(by (1))

= x0 (1+R)k(1+R)(by inductive assumption)

= x0 (1+R)k+1as required.

(This treatment is WAY more formal than required for the homework. If you just said that 1a is obvious, that might be good enough.)

BTW, what’s an “analytic solution” ? Here we have used it to mean a rule for computing xk that does not require computing the values x1, x2, … in sequence.

Also, what does it mean to say that a model “has an analytic solution” ? In this case we chose a strong interpretation, that the assumptions of the model force us to believe the analytical formulation (2). Later we’ll use the weaker interpretation, that if xk is given by the analytical formula, then xk satisfies the assumptions of the model. The weaker interpretation leaves open the possibility that some other, different analytical formula might also work --- although that doesn’t happen for any of the models in this homework.

b. Consider the continuous model

x’(t) = r x(t) for t ≥ t0(3)

x(t0) = x0

where t0 is given and x0 and r are parameters of the model.

Show that this model has the analytic solution

x(t) = x0 exp ( r(t-t0) )for all real t ≥ t0.(4)

[corrected 9/18 to insert “-t0”]

[ Note: “exp(z)” means ez but is easier to type. ]

In this case we’ll just show that the function x(t) given by (4) satisfies both parts of (3). (That is, we’re retreating to the “weaker interpretation”.)

It satisfies the system equation (the first line of (3)) because differentiating (4) gives

x’(t) = x0 exp ( r(t-t0) ) (r)

= r x(t) as required.

It satisfies the initial condition (the second line of (3)) because

x(t0) = x0 exp ( r(t0-t0) ) = x0.

c. Reconcile these two models. Show that these models agree exactly if

t0, t1, t2, … are evenly spaced times with

increment t = tk+1 - tk

xk means x(tk)

and if r and R are related by

exp ( r t ) = 1 + R.(5)

The discrete model specifies a relation between xk+1 and xk. Interpreting these as usual to mean x(tk+1) and x(tk), the relation is

x(tk+1) = x(tk) (1+R).(5a)

According to the continuous model,

x(tk+1) = x0 exp ( r(tk+1-t0) ) and

x(tk) = x0 exp ( r(tk-t0) ).

These are compatible if substituting them into (5a) gives a correct equation. Well, try it:

x0 exp ( r(tk+1-t0) ) = x0 exp ( r(tk-t0) ) (1+R).

This is true precisely when

1+R = exp ( r(tk+1-t0) ) / exp ( r(tk-t0) ) = exp ( r (tk+1 – tk ))

= exp ( r t ) as required.

So the continuous and discrete model are essentially the same, but the parameters are described differently. Of course, choosing R (in the discrete model) is equivalent to choosing r (in the continuous model); they just aren’t the same number.

2. (“Soft” exponential model)

Note that the discrete model

xk+1 = xk (1 + Rk)(6)

(where x0 is a parameter but Rk can vary with k)

has the (useless) analytic solution

xk = x0 ( 1+R0 ) ( 1+R1 ) … ( 1 + Rk-1 ).(7)

a. Consider the continuous model

x’(t) = r(t) x(t)(8)

x(t0) = x0

(where r(t) can vary with time).

Show that this model has the analytic solution

x(t) = x0 exp ( )(9)

for all real t ≥ t0.

We’ll show that the function x(t) in (9) satisfies both parts of (8).

It satisfies the system equation because differentiating (9) gives

x’(t) = x0 exp ( ) [ r(t) ]

= r(t) x(t) as required.

(The derivative of that integral wrt t is r(t) by the fundamental theorem of calculus. In fact, this integral can reasonably be defined as “whatever function has derivative r(t) and is zero at t0”.)

Also, x(t) satisfies the initial condition because the integral is zero for t = t0, so

x(t0) = x0 exp (0) = x0.

b. Show that these models (equations 6-7 and equations 8-9) agree if

1 + Rk = exp ( ) for each k.(10)

[corrected 9/18; l.h.s. was just “Rk”]

(Cut-and-paste from 2c, with alterations…)

The discrete model specifies a relation between xk+1 and xk. Interpreting these as usual to mean x(tk+1) and x(tk), the relation is

x(tk+1) = x(tk) (1+R).(5a)

According to the continuous model,

x(tk+1) = x0 exp ( ) and

x(tk) = x0 exp ( ) ).

These are compatible if substituting them into (5a) gives a correct equation. Well, try it:

x0 exp ( ) = x0 exp ( ) (1+R).

This is true precisely when

1+R = exp ( ) / exp ( )

= exp ( -)

= exp ( ) as required.

3. (Rate changing linearly)

a. Consider the continuous model

x’(t) = r(t) x(t)

x(t0) = x0

(as before)

with the additional equation

r(t) = r0 – a(t-t0) [corrected, t-t0 for t](11)

where r0 and a (and x0) are parameters of the model. That is,

the growth rate decreases linearly.

Show that this model has the analytic solution

x(t) = x0 exp ( r0(t-t0) – a (t – t0)2) /2 ).(12)

[corrected]

As before, just differentiate (12) to get

x’(t) = x0 exp (whatever) [ r0 – a(t-t0) ]

= x(t) r(t) as required.

So x(t) satisfies the system equation. As before, it satisfies the initial condition because when t = t0, that big exponent is zero.

b. Suppose that x0, r0, and a are all positive. Show that x(t) is an increasing

function of t when t is slightly larger than t0, but that then it decreases.

What is the limit (as t -> infinity) of x(t) ?

First: x(t) is always positive for all t ≥ t0, because from (12), x(t) is x0 (which is positive) times exp (something) (which is always positive).

It follows from the system equation (x’(t)=r(t)x(t)) that x’(t) always has the same sign as r(t).

From (11), r(t) is positive when t is close to t0 (since r0 is positive) but negative for larger t (since a is positive, and for large t, the second term of (11) dominates the first.) [More precisely: r(t) is positive when t > t0 + r0//a, negative when t < t0 + r0 /a. ]

Therefore x(t) increases for t near t0, and then decreases for large t.

To see that the limit of x(t) (for t -> infinity) is zero, note that the exponent in (12) approaches minus infinity for large t. (The term with t2 in it dominates.) That makes the exponential part of (12) approach 0, so x(t) -> 0 also.

c. Show that if we turn this model into a discrete model by observing x(t)

only when t = t0, t1, …, and if we define Rk as in the previous problem

then Rk is NOT LINEAR as a function of k. (Computing three values of

Rk in an example might be enough to show this.)

Since this model is a special case of the model in problem 2, we already have a formula for Rk:

1 + Rk = exp ( ) for each k.

In problem 3, we have a formula for r(s) so we can compute the integral explicitly. It is:

=

Y – Ztk

where Y and Z are monstrous expressions that are independent of k.

So,

Rk = exp ( Y – Ztk ) – 1.(12a)

The exponent varies linearly with k. To first approximation, that means that Rk also varies linearly---but only to first approximation. If you computed an example with almost any values for the parameters, you saw that Rk isn’t exactly linear in k, and that it becomes very badly nonlinear when Rk gets close to -1 (an unimportant extreme case).

Lesson: In this case we are forced to choose between the obvious discrete model (Rk linear) that we tested during the first week, and the obvious continuous model (r(t) linear). They aren’t quite the same model. Since the results of the obvious discrete model depend on the choice of the time step and are crazy in the extreme case when Rk is near -1, I prefer the continuous model.

We can still build a discrete model, with whatever timestep we like, based on (12a). Rk isn’t quite linear, but it still predictable.Then all the models are consistent.

4. (Discrete logistic model)

a. Consider the discrete logistic model

xk+1 = xk (1 + Rk)(13)

with

Rk = R* ( (M – xk ) / M ).(14)

Here R* and M are parameters of the model.

Show that this implies that

xk+1 = (1+R*) xk (1 – Z xk )(15)

where Z is some combination of R* and M.

Substituting (14) into (13) gives

xk+1 = xk ( 1 + R* ((M – xk) / M )

= xk ( (1 + R*) – (R*/M) xk )

= xk( ( 1 + R* ) - ( 1 + R* ) ( R*/(M(1+R*))) xk )

= xk (1 + R* ) ( 1 - ( R*/(M(1+R*))) xk ) (15a)

which is equivalent to (15) with Z = ( R*/(M(1+R*))).

b. Suppose that 0 < x0 < M and that 1 + R* = 1.02. Show that xk increases

as a function of k, from x0, and that it approaches a limit of M as

t approaches infinity.

One way to approach this problem is to look for different ways to write xk+1 in terms of xk, until we find one that provides the necessary insight. Here is one way, which follows with a little bit of algebra from (15a):

xk+1 = (1+R*) xk – (R*/M) xk2.(15b)

The right side is a quadratic function of xk. We know a lot about quadratic functions. The graph of this function is a parabola, and it is concave down because the quadratic term is negative. Furthermore, the graph has to go through the points (0, 0) and (M, M) because

(1+R*) xk – (R*/M) xk2 = 0 when xk = 0, and

M when xk = M.

So the graph of the right side of 15b looks like one of these pictures:

If the left picture is correct, then we have these conclusions:

(a) If xk is between 0 and M, then so is xk+1.

(b) If xk is between 0 and M, then xk+1 > xk.

If these conclusions hold, then we are almost done with problem 4b --- by induction, all of the xk’s are between 0 and M and the sequence is increasing.

But if the right picture is correct, none of these conclusions hold and we just have a mess. So, which picture is correct? One way to tell is from the derivative of the function (right side of 15b) at xk = M. If it is positive, then the left picture is correct. Well, the derivative is

(1+R*) – 2 (R*/M) xk

and when xk = M that is

(1 + R*) – 2R*

which is (finally using the fact that 1+R* = 1.02)

0.98,

which is definitely positive. So, when 1+R* = 1.02, the left picture is correct.

We still have to show that the limit of the xk sequence is M. (The sequence stays in the range from 0 to M, and increases, but that doesn’t imply that its limit is M.) Suppose that the limit is L; we will try to show that L = M. If the limit is L, then (15b) must hold when both xk+1 and xk are arbitrarily close to L, so it must hold when both are equal to L. Then

L = (1+R*) L – (R*/M) L2.(15c)

which holds only when L = M.

c. Suppose that x0 = 1 million, M = 2 million, and 1 + R* = 3.5. Show

that xk DOES NOT increase as a function of k (at least, not for all k)

and that xk DOES NOT approach a limit as t -> infinity.

(A computational illustration is enough, if it is convincing.)

The trouble here is that when 1+R* = 3.5, the right picture (above) is correct, and all bets are off. Since all the parameters are given, you were able to compute as many terms as you wanted of the sequence of xk’s, and you saw that they did not stay below M, did not necessarily increase at teach step, and did not follow any other respectable pattern.

If you think that 3.5 is a reasonable value of 1+R*, then your time step is way too large!

5. (Continuous logistic model)

a. Consider the continuous model

x’(t) = r(t) x(t)

x(t0) = x0

with

r(t) = r* ( (M – x(t) ) / M ).(16)

(Now r* and M are parameters of the model.)

Show that this model is equivalent to the equation

x’(t) = r* x(t) – (r*/M) x(t)2.(17)

Just substitute the value of r(t) from (16) into the system equation x’(t) = r(t)x(t); the result is (17).

b. Show that this model has the analytic solution

x(t) = (18)

for all real t ≥ t0.

We must show that x(t) satisfies the system equation---really, the equivalent version (17). Alas, it is necessary to differentiate (18). It’s easier than it looks, since the variable t actually only appears once on the right side of (18). Write D(t) for the denominator of (18); that is,

D(t) = x0 + (M-x0) exp (-r* (t-t0) ).

Then

x’(t) = [ – (Mx0)/D(t)2 ] times D’(t)

= [ – (Mx0)/D(t)2 ] (M-x0) exp (-r*(t-t0) ) (-r*)(18a)

and the right side of (17) is

r* x(t) – (r*/M) x(t)2 = r* Mx0 / D(t) - (r*/M) (Mx0)2 / D(t)2

= [ r*Mx0 D(t) - (r*/M) (Mx0)2 ] / D(t)2

= [ - ( Mx0)/D(t)2 ] [ r*D(t) – r*x0 ]

= [ - ( Mx0)/D(t)2 ] (M-x0) exp (-r*(t-t0) ) (-r*)(18b)

which agrees with (18a), so this function x(t) does satisfy (17).

To see that x(t) satisfies the initial condition, just compute: from (18),

x(t0) = x0 as required.

c. Show that if 0 < x(t) < M and r* is positive, then x(t) increases

as a function of t and has limit M as t approaches infinity,

regardless of the exact value of r*.

To be done in class.

(end)

1