
Dynamics
582
Example
The value of an investment portfolio, y(t), varies over an 8-year period according to
= y(1 − y) (0 ≤ t ≤ 8)
where y is measured in millions of dollars and t is measured in years. Find expressions for the solution of
this equation in the case when the initial investment is
(a) $100 000 (b) $2 million
Plot the graphs of these solutions on the same diagram and comment on the stability of the system.
Solution
Before we solve this equation using Maple, there are two special cases worthy of note. If, at some time, t, the
value of the portfolio drops to zero, so that y = 0, then the right-hand side of the differential equation will
also be zero. The differential equation then reads
= 0
It follows that y is constant for all subsequent times. In other words, once the investment falls to zero, it
remains at this level.
The other special case is when y(t) = 1. Again the right-hand side, y(1 − y), reduces to zero and again the
differential equation becomes just
= 0
We deduce that once the value of the investment reaches 1 million, it remains at this level from that moment
onwards.
(a) To obtain the general solution using Maple we need to type in, and name, both the differential equation
and the initial condition. Unfortunately you cannot just write dy/dt and hope that Maple will recognize
this as a derivative. Instead we make use of the command diff which we used in Chapters 4 and 5. The
first-order derivative of y with respect to t is written as diff(y(t),t) and the differential equation
itself is specified by typing
>eq:=diff(y(t),t)=y(t)*(1-y(t));
Maple displays this as
eq:= y(t) = y(t)(1 − y(t))
The initial condition, y(0) = 0.1, is entered, and named init by typing
>init:=y(0)=0.1;
We are now in a position to obtain the solution using
>dsolve({eq,init},{y(t)});
which gives
y(t) =
(b) The initial condition, y(0) = 2, is easily input by editing the line defining init to give
>init:=y(0)=2;
The problem can then be re-solved by moving the cursor to the end of each line of instructions and
pressing the Enter key. The new solution is
1
1 + 9e
(−t)
∂
∂t
dy
dt
dy
dt
dy
dt
MAPLE
MFE_C09b.qxd 16/12/2005 10:49 Page 582