MATH 304 -- ODE

Problem Set 1, Solution for Extra Problem I.

A. The two differential equations

dP/dt = (0.4)P(1 - P/30) (for t <= 5)

dP/dt = (0.4)P(1 - P/30) - (0.25)P (for t >= 5)

both satisfy the hypotheses of the Existence and Uniqueness Theorem (separately),

since the slope functions are polynomials in P (and t). They and their derivatives

with respect to P are continuous on the whole (t,P) plane. Hence to get a continuous

solution of the problem we are interested in, we can start on the solution of the first

equation with initial condition P(0) = 25, and continue along that curve as far as t = 5.

Say P(5) on this solution equals b. Then we switch to the solution of the second equation

with initial condition P(5) = b. This produces a continuous curve, since the two pieces

"link up" correctly at t = 5.

B. In class we showed that the solution of any logistic equation dP/dt = kP(1 - P/M)

has the form P(t) = M/(1 + c [Maple Math] ) for some constant c. For the first equation above

(the one for t <= 5), this gives

[Maple Math]

The constant c is determined from the initial condition [Maple Math] : 25 = 30/(1 + c),

so c = 1/5 = .2. Here is the formula for the solution for t <= 5:

> P1:=t->30/(1+(0.2)*exp(-(0.4)*t));

[Maple Math]

> valueat5:=evalf(P1(5));

[Maple Math]

Now we want to solve the second equation with the initial condition [Maple Math] .

Rearranging algebraically,

dP/dt = (0.4) P (1 - P/30) - (0.25)P = (0.15) P 1 - (0.4)P/((30)(0.15)) = (0.15) P (1 - P/(45/4))

which is also a logistic equation (new k = 0.15, new M = 45/4 = 11.25)

> P2:=(t,k)->(45/4)/(1+k*exp(-(0.15)*t));

[Maple Math]

> kay:=solve(P2(5,k)=valueat5,k);

[Maple Math]

> P2actual:=t->P2(t,kay);

[Maple Math]

> soln:=piecewise(t<=5,P1(t),P2actual(t));

[Maple Math]

Here is the plot of our solution:

> ansol:=plot(soln,t=0..20,y=0..40,color=blue):

> with(plots):

> display(ansol);

The approximate method we used in the lab produces the following results:

> with(DEtools):

> f3:=(t,y) -> piecewise(t<5,0.4*y*(1-y/30),t>=5,0.4*y*(1-y/30)-0.25*y);

[Maple Math]

> eqn3:=diff(y(t),t) = f3(t,y(t));

[Maple Math]

> dplot:=DEplot(eqn3,y(t),t=0..20,y=0..40,[[y(0)=25]],arrows=SLIM,linecolor=magenta):

> display({ansol,dplot});

The agreement is almost exact!

C.. The effect of the introduction of the parasites is to lower the maximum sustainable

population level of insects from 30 to 11.25. The value of the rate constant

k also decreases from 0.4 to 0.15. (This controls the rate at which the solution

approaches the asymptote.)

>