Math 340 ยท University of San Francisco

Assignment 3

Due Tuesday, September 22

1Using a solution we know

Suppose ๐‘”(๐‘ก,๐‘ฆ) and its partial derivative ๐‘”๐‘ฆ(๐‘ก,๐‘ฆ) are continuous everywhere, and consider the differential equation

๐‘ฆโ€ฒ=(๐‘ฆโˆ’2๐‘ก)๐‘”(๐‘ก,๐‘ฆ)+2.
(a)

Verify that ๐‘ฆ(๐‘ก) =2๐‘ก is a solution, regardless of the choice of ๐‘”.

Solution

The derivative is ๐‘ฆโ€ฒ =2. Substituting ๐‘ฆ =2๐‘ก into the right-hand side gives

(2๐‘กโˆ’2๐‘ก)๐‘”(๐‘ก,2๐‘ก)+2=2,

so the equation holds for every ๐‘ก, whatever ๐‘” is.

(b)

Check that the hypotheses of the local existence-and-uniqueness theorem hold at every point.

Solution

Write ๐น(๐‘ก,๐‘ฆ) =(๐‘ฆ โˆ’2๐‘ก)๐‘”(๐‘ก,๐‘ฆ) +2. By the product rule,

๐น๐‘ฆ(๐‘ก,๐‘ฆ)=๐‘”(๐‘ก,๐‘ฆ)+(๐‘ฆโˆ’2๐‘ก)๐‘”๐‘ฆ(๐‘ก,๐‘ฆ).

Both ๐น and ๐น๐‘ฆ are continuous everywhere by the assumptions on ๐‘”. Thus there is a unique local solution through every point.

(c)

Let ๐‘ฆ(๐‘ก) be the solution with ๐‘ฆ(0) =1. Suppose this solution is defined at ๐‘ก =10. Show that ๐‘ฆ(10) >20.

Solution

At ๐‘ก =0, our solution starts above the known solution 2๐‘ก, since 1 >0. Uniqueness prevents these two solutions from touching: if they met, they would have to agree throughout their common interval, including at ๐‘ก =0. Their order is therefore preserved while both exist:

๐‘ฆ(๐‘ก)>2๐‘ก.

Since our solution is defined at ๐‘ก =10, this gives ๐‘ฆ(10) >20. We do not need to know ๐‘” or find a formula for ๐‘ฆ!

2Waiting before leaving

Consider the initial-value problem

๐‘ฆโ€ฒ=2โˆš|๐‘ฆ|,๐‘ฆ(0)=0.
(a)

Verify that ๐‘ฆ(๐‘ก) =0 solves this initial-value problem.

Solution

The constant function has derivative 0, and the equation prescribes 2โˆš|0| =0. It also has the required initial value ๐‘ฆ(0) =0.

(b)

For any ๐‘Ž โ‰ฅ0, define

๐‘ฆ๐‘Ž(๐‘ก)={0,๐‘กโ‰ค๐‘Ž,(๐‘กโˆ’๐‘Ž)2,๐‘ก>๐‘Ž.

Show that ๐‘ฆ๐‘Ž also solves the initial-value problem. Be sure to check differentiability and the differential equation at ๐‘ก =๐‘Ž.

Solution

For ๐‘ก <๐‘Ž, both ๐‘ฆโ€ฒ๐‘Ž and 2โˆš|๐‘ฆ๐‘Ž| are zero. For ๐‘ก >๐‘Ž,

๐‘ฆโ€ฒ๐‘Ž(๐‘ก)=2(๐‘กโˆ’๐‘Ž)=2โˆš(๐‘กโˆ’๐‘Ž)2=2โˆš|๐‘ฆ๐‘Ž(๐‘ก)|,

where we used ๐‘ก โˆ’๐‘Ž >0.

At the joining time, ๐‘ฆ๐‘Ž(๐‘Ž) =0 and both pieces approach zero, so the function is continuous. The derivative formula on the left is 0, and the derivative formula on the right is 2(๐‘ก โˆ’๐‘Ž). As we approach the join,

lim๐‘กโ†’๐‘Žโˆ’๐‘ฆโ€ฒ๐‘Ž(๐‘ก)=0,lim๐‘กโ†’๐‘Ž+๐‘ฆโ€ฒ๐‘Ž(๐‘ก)=lim๐‘กโ†’๐‘Ž+2(๐‘กโˆ’๐‘Ž)=0.

The two limits agree, so the pieces join differentiably with derivative zero. Thus ๐‘ฆโ€ฒ๐‘Ž(๐‘Ž) =0 =2โˆš|๐‘ฆ๐‘Ž(๐‘Ž)|, so the equation holds at the join too. Finally, ๐‘Ž โ‰ฅ0 puts the initial time in the zero piece, giving ๐‘ฆ๐‘Ž(0) =0. Each ๐‘ฆ๐‘Ž solves the IVP on all of โ„.

(c)

These solutions agree for a while and then separate. Why does this not contradict the existence-and-uniqueness theorem? Identify precisely which hypothesis fails.

Solution

The right-hand side ๐น(๐‘ก,๐‘ฆ) =2โˆš|๐‘ฆ| is continuous everywhere, but its derivative with respect to ๐‘ฆ is

๐น๐‘ฆ(๐‘ก,๐‘ฆ)={โˆ’1/โˆšโˆ’๐‘ฆ,๐‘ฆ<0,1/โˆš๐‘ฆ,๐‘ฆ>0.

This derivative does not exist at ๐‘ฆ =0 and is unbounded near it. Thus the hypothesis that ๐น๐‘ฆ be continuous near the initial point fails, as it also does at every departure point (๐‘Ž,0). The theorem does not promise uniqueness there, so the different waiting times cause no contradiction.

3How long does the solution exist?

Consider the two initial-value problems

๐‘ฆโ€ฒ=๐‘ฆ2๐‘’๐‘ก,๐‘ฆ(0)=1,

and

๐‘ฆโ€ฒ=๐‘ก๐‘ฆ2,๐‘ฆ(0)=1.
(a)

For each equation, check the hypotheses of the local existence-and-uniqueness theorem. What does it guarantee about these initial-value problems?

Solution

For the first equation,

๐น(๐‘ก,๐‘ฆ)=๐‘’โˆ’๐‘ก๐‘ฆ2,๐น๐‘ฆ(๐‘ก,๐‘ฆ)=2๐‘’โˆ’๐‘ก๐‘ฆ,

and for the second,

๐น(๐‘ก,๐‘ฆ)=๐‘ก๐‘ฆ2,๐น๐‘ฆ(๐‘ก,๐‘ฆ)=2๐‘ก๐‘ฆ.

All four functions are continuous everywhere. Each IVP therefore has a unique solution on some open interval containing 0. This is a local guarantee: it does not say that either solution exists for all time.

(b)

Solve both problems by separating variables, and find the largest interval containing 0 on which each solution exists.

Solution

Both equations have the equilibrium ๐‘ฆ =0. Our initial value is 1, so uniqueness keeps the solution positive and allows us to divide by ๐‘ฆ2.

For the first equation, separation gives

๐‘‘๐‘ฆ๐‘ฆ2=๐‘’โˆ’๐‘ก๐‘‘๐‘กโŸนโˆ’1๐‘ฆ=โˆ’๐‘’โˆ’๐‘ก+๐ถ.

At ๐‘ก =0, ๐‘ฆ =1, so ๐ถ =0 and ๐‘ฆ =๐‘’๐‘ก. This solution exists on ( โˆ’โˆž,โˆž). It grows without bound, but only as ๐‘ก โ†’โˆž.

For the second equation,

๐‘‘๐‘ฆ๐‘ฆ2=๐‘ก๐‘‘๐‘กโŸนโˆ’1๐‘ฆ=๐‘ก22+๐ถ.

The initial condition gives ๐ถ = โˆ’1, so

๐‘ฆ=11โˆ’๐‘ก2/2.

The denominator first vanishes at ๐‘ก = ยฑโˆš2. The solution tends to +โˆž as either endpoint is approached from inside, so its largest interval containing 0 is ( โˆ’โˆš2,โˆš2).

(c)

Now suppose ๐‘Ž(๐‘ก) is continuous for all real ๐‘ก, and ๐‘› โ‰ฅ2 is an integer. Solve

๐‘ฆโ€ฒ=๐‘Ž(๐‘ก)๐‘ฆ๐‘›,๐‘ฆ(0)=1.

Your answer may involve

๐ด(๐‘ก)=โˆซ๐‘ก0๐‘Ž(๐‘ )๐‘‘๐‘ ,

and that is okay! Describe the largest interval containing 0 on which your solution exists, in terms of ๐ด(๐‘ก). Explain why the solution must remain positive throughout that interval.

Solution

Here ๐น(๐‘ก,๐‘ฆ) =๐‘Ž(๐‘ก)๐‘ฆ๐‘› and ๐น๐‘ฆ(๐‘ก,๐‘ฆ) =๐‘›๐‘Ž(๐‘ก)๐‘ฆ๐‘›โˆ’1 are continuous everywhere. The constant solution ๐‘ฆ =0 is therefore a barrier: a solution starting at 1 cannot touch it, and cannot become negative without passing through it. Thus ๐‘ฆ stays positive while it exists.

Separating and using the initial value to write definite integrals,

โˆซ๐‘ฆ(๐‘ก)1๐‘ขโˆ’๐‘›๐‘‘๐‘ข=โˆซ๐‘ก0๐‘Ž(๐‘ )๐‘‘๐‘ =๐ด(๐‘ก).

Since ๐‘› โ‰ฅ2, this gives

๐‘ฆ(๐‘ก)1โˆ’๐‘›โˆ’11โˆ’๐‘›=๐ด(๐‘ก)โŸน๐‘ฆ(๐‘ก)=[1โˆ’(๐‘›โˆ’1)๐ด(๐‘ก)]โˆ’1/(๐‘›โˆ’1).

We take the positive root, as required by ๐‘ฆ(0) =1. The largest interval is the open interval containing 0 on which

1โˆ’(๐‘›โˆ’1)๐ด(๐‘ก)>0,or equivalently๐ด(๐‘ก)<1๐‘›โˆ’1.

In each time direction, continue until the first time ๐ด(๐‘ก) reaches 1/(๐‘› โˆ’1); if it never does, the interval extends infinitely in that direction. At any finite endpoint the bracket tends to zero from above, so ๐‘ฆ(๐‘ก) โ†’ +โˆž and no continuation through that endpoint is possible. Later intervals on which the bracket is positive cannot be joined to the solution through ๐‘ก =0.

4Should we preheat the oven?

In this problem, use Newton's law of heating to compare two ways of heating an object. The measurements and oven temperature history below are illustrative.

(a)

An object initially at 20โˆ˜C is placed in an oven maintained at 200โˆ˜C. After 10 minutes, its temperature is 110โˆ˜C. Assuming Newton's law of heating, determine the constant ๐‘˜. How long after entering the oven will the object reach the target temperature of 155โˆ˜C?

Solution

With ๐‘ก in minutes, Newton's law gives

๐‘‡โ€ฒ=๐‘˜(200โˆ’๐‘‡),๐‘‡(0)=20,

whose solution is ๐‘‡(๐‘ก) =200 โˆ’180๐‘’โˆ’๐‘˜๐‘ก. The measurement at ten minutes says

110=200โˆ’180๐‘’โˆ’10๐‘˜โŸน๐‘’โˆ’10๐‘˜=12.

Thus ๐‘˜ =(lnโก2)/10ย minโˆ’1, approximately 0.0693ย minโˆ’1, and ๐‘‡(๐‘ก) =200 โˆ’180 2โˆ’๐‘ก/10. To reach 155โˆ˜C, we need

2โˆ’๐‘ก/10=200โˆ’155180=14,

so the object takes 20 minutes after entering the preheated oven.

(b)

Now suppose an identical object is placed in the oven before it is switched on. Both initially have temperature 20โˆ˜C, and the oven warms according to

๐ด(๐‘ก)=200โˆ’1802โˆ’๐‘ก/5,

with ๐‘ก in minutes. Assume the same heating constant ๐‘˜ applies and that the object does not appreciably affect the oven's temperature. Write and solve the initial-value problem for the object's temperature.

Solution

The same law uses the oven's current temperature:

๐‘‡โ€ฒ=๐‘˜(200โˆ’1802โˆ’๐‘ก/5โˆ’๐‘‡),๐‘‡(0)=20,๐‘˜=lnโก210.

Since 2โˆ’๐‘ก/5 =๐‘’โˆ’2๐‘˜๐‘ก, rearranging gives ๐‘‡โ€ฒ +๐‘˜๐‘‡ =200๐‘˜ โˆ’180๐‘˜๐‘’โˆ’2๐‘˜๐‘ก. Multiplication by ๐‘’๐‘˜๐‘ก undoes the product rule:

(๐‘’๐‘˜๐‘ก๐‘‡)โ€ฒ=200๐‘˜๐‘’๐‘˜๐‘กโˆ’180๐‘˜๐‘’โˆ’๐‘˜๐‘ก.

Integrating,

๐‘’๐‘˜๐‘ก๐‘‡=200๐‘’๐‘˜๐‘ก+180๐‘’โˆ’๐‘˜๐‘ก+๐ถ,๐‘‡=200+180๐‘’โˆ’2๐‘˜๐‘ก+๐ถ๐‘’โˆ’๐‘˜๐‘ก.

The initial condition gives 20 =380 +๐ถ, so ๐ถ = โˆ’360. Therefore

๐‘‡(๐‘ก)=200โˆ’3602โˆ’๐‘ก/10+1802โˆ’๐‘ก/5,๐‘กโ‰ฅ0.

In particular, ๐‘‡โ€ฒ(0) =0: the object and oven initially have the same temperature, so heating begins only as a temperature difference develops.

(c)

How long after switching on the oven does the object reach 155โˆ˜C? Compare with part (a). Here we are comparing the time the object spends inside the oven; part (a) excludes the time spent preheating the empty oven.

Solution

Set ๐‘ฅ =2โˆ’๐‘ก/10. For ๐‘ก โ‰ฅ0, we have 0 <๐‘ฅ โ‰ค1, and the target temperature gives

155=200โˆ’360๐‘ฅ+180๐‘ฅ2โŸน๐‘ฅ2โˆ’2๐‘ฅ+14=0.

The roots are ๐‘ฅ =1 ยฑโˆš3/2. Only the smaller root lies in (0,1], so

๐‘ก=โˆ’10lnโก2lnโก(1โˆ’โˆš32)โ‰ˆ29.00ย minutes.

The object spends about 9 more minutes in the warming oven than in the preheated oven. This compares time inside the oven; the 20 minutes in part (a) do not include preheating the empty oven.

5Zombies on campus

A campus contains ๐‘ people, some of whom have become zombies. Nobody enters, leaves, or dies: becoming a zombie changes a person's condition but does not change the total population. Let ๐‘(๐‘ก) be the number of zombies, with time measured in days.

Suppose each zombie encounters people at a constant rate ๐‘Ÿ >0, and those encounters are spread randomly across the population. An encounter with a human turns that human into a zombie; an encounter with another zombie changes nothing.

(a)

If there are currently ๐‘ zombies, how many humans remain? What fraction of encounters are with humans? Use this to write the rate at which one zombie creates new zombies.

Solution

There are ๐‘ โˆ’๐‘ humans, so the fraction of encounters that are with humans is (๐‘ โˆ’๐‘)/๐‘. One zombie has ๐‘Ÿ encounters per day, and only this fraction produces new zombies. Its rate of creating zombies is therefore

๐‘Ÿ๐‘โˆ’๐‘๐‘=๐‘Ÿ(1โˆ’๐‘๐‘).
(b)

Use your answer to build a differential equation for ๐‘(๐‘ก). Explain each factor in your equation. Check the model at ๐‘ =0 and ๐‘ =๐‘: what does it predict, and does that make sense? What familiar population model have you obtained?

Solution

There are ๐‘ zombies each creating new zombies at the rate above, so

๐‘โ€ฒ=๐‘Ÿ๐‘(1โˆ’๐‘๐‘).

The factors count encounters per zombie per day, the number of zombies, and the fraction of encounters that find a human. At ๐‘ =0 the rate is zero because there are no zombies to spread the condition. At ๐‘ =๐‘ the rate is also zero because no humans remain. Both predictions make sense. This is logistic growth, with growth parameter ๐‘Ÿ and carrying capacity ๐‘.

(c)

Sprinklers spray an antidote across campus. Each zombie encounters the spray once per day on average. Let 0 โ‰ค๐‘ โ‰ค1 describe its effectiveness: ๐‘ =0.87 means that 87% of zombies encountering the spray are cured. Cured zombies become human again.

Revise your differential equation to include the spray, and explain the new term. Does treatment change your expression for the number of humans?

Solution

Each zombie encounters the spray at a rate of once per day, and a fraction ๐‘ of these encounters produces a cure. Thus the cure rate is (1ย dayโˆ’1)๐‘๐‘. With time measured in days, the revised equation is

๐‘โ€ฒ=๐‘Ÿ๐‘(1โˆ’๐‘๐‘)โˆ’๐‘๐‘.

The new term removes cured zombies from ๐‘ and returns them to the human population. Nobody leaves the campus, so the number of humans is still ๐‘ โˆ’๐‘.

(d)

How effective must the spray be to make the zombie population decrease for every initial population 0 <๐‘(0) โ‰ค๐‘? Remember that 0 โ‰ค๐‘ โ‰ค1. Is it always possible for the spray to be effective enough? If the spray is less effective than this, can your model support a constant positive population of zombies? Find that population and explain how new infections and cures balance there. You do not need to solve the differential equation.

Solution

Factoring gives

๐‘โ€ฒ=๐‘(๐‘Ÿโˆ’๐‘โˆ’๐‘Ÿ๐‘๐‘).

For every ๐‘ >0, this is negative if ๐‘ โ‰ฅ๐‘Ÿ. Equality is enough: when ๐‘ =๐‘Ÿ, the equation becomes ๐‘โ€ฒ = โˆ’(๐‘Ÿ/๐‘)๐‘2 <0 for every positive population. If ๐‘ <๐‘Ÿ, sufficiently small positive populations instead have ๐‘โ€ฒ >0, so the required condition is exactly ๐‘ โ‰ฅ๐‘Ÿ. Here ๐‘Ÿ is the numerical encounter rate per day, and ๐‘ gives the numerical cure rate because each zombie encounters spray once per day.

Since ๐‘ โ‰ค1, this is possible only when ๐‘Ÿ โ‰ค1. If ๐‘Ÿ >1, even a 100% effective spray used at this encounter rate cannot make every positive population decrease.

When ๐‘ <๐‘Ÿ, a positive equilibrium is obtained by setting the remaining factor to zero:

๐‘โˆ—=๐‘(1โˆ’๐‘๐‘Ÿ).

This lies in (0,๐‘]. At this population, the human fraction is 1 โˆ’๐‘โˆ—/๐‘ =๐‘/๐‘Ÿ, so the infection rate is ๐‘Ÿ๐‘โˆ—(๐‘/๐‘Ÿ) =๐‘๐‘โˆ—, exactly the cure rate. For ๐‘ =0 this is the all-zombie state ๐‘โˆ— =๐‘, where both rates vanish. For 0 <๐‘ <๐‘Ÿ, infections and cures continue at equal positive rates, keeping the zombie population constant.