Chapter 9

Chapter 9 - Notes
Harini Chandramouli
MATH1272
[email protected]
Section 9.1 - Modeling with Differential Equations
3
Problem 1. Show that y(x) = x− 2 is a solution to 4x2 y 00 + 12xy 0 + 3y = 0 for x > 0.
Solution. First we need to find y 0 and y 00 :
3 5
y 0 (x) = − x− 2
2
7
15
y 00 (x) =
x− 2
4
Now we plug these values in, plus y, to the differential equation to see if we get 0:
3
3
3
3
15 − 7
3 −5
2
2
2
4x
x
+ 12x − x
+ 3 x− 2 = 15x− 2 − 18x− 2 + 3x− 2 = 0
4
2
And thus y(x) is a solution to the differential equation. NOTE that it is not the only solution!
1
3
Why did I ask that x > 0? Recall that y(x) = x− 2 = √ which is only defined when x > 0.
x3
1
Section 9.2 - Direction Fields and Euler’s Method
Problem 1. For the IVP
y 0 + 2y = 2 − e−4t ,
y(0) = 1
Use Euler’s Method with a step size of h = 0.1 to find approximate values of the solution at
t = 0.1, 0.2, 0.3.
Solution. We recall first Euler’s Method:
Euler’s Method. Approximate values for the solution of the initial-value problem
y = F (x, y), y(x0 ) = y0 , with step size h, at xn = xn−1 + h are
0
yn = yn−1 + hF (xn−1 , yn−1 ),
n∈N
So first we rewrite or differential equation so it is in the necessary form:
y 0 = 2 − e−4t − 2y
Here we have that F (t, y) = 2 − e−4t − 2y. We also see that t0 = 0 and y0 = 1. So let us
begin doing some computations
y0 = 1
y1 = y0 + h · F (t0 , y0 ) = 1 + (0.1) · F (0, 1)
= 1 + (0.1) 2 − e0 − 2(1) = 0.9
So we have that the approximation to the solution at t1 = 0.1 is y1 = 0.9.
Now we proceed to the next step.
y2 = y1 + h · F (t1 , y1 ) = 0.9 + (0.1) · F (0.1, 0.9)
= 0.9 + (0.1) 2 − e−4(0.1) − 2(0.9) = 0.853
So we have that the approximation to the solution at t2 = 0.2 is y2 = 0.853.
We hae one more time step to figure out:
y3 = y2 + h · F (t2 , y2 ) = 0.853 + (0.1) · F (0.2, 0.853)
= 0.853 + (0.1) 2 − e−4(0.2) − 2(0.853) = 0.837
So we have that the approximation to the solution at t3 = 0.3 is y3 = 0.837.
2
Section 9.3 - Separable Equations
Problem 1. Show that
dy
x2
=
is separable, then solve.
dx
1 − y2
Solution. First we want to write the differential equation as a product of two functions,
one of which is just a function of x and the other as just a function of y to show that it is
1
,
separable. Define g(x) := x2 and f (y) :=
1 − y2
dy
1
2
= (x ) ·
= g(x)f (y)
dx
1 − y2
Thus, the equation is separable.
Now we solve:
x2
dy
=
dx
1 − y2
2
(1 − y )dy = x2 dx
Z
Z
2
(1 − y )dy =
x2 dx
1
1 3
y − y2 =
x +C
3
3
1
1
Therefore an implicit solution is given by y − y 2 = x3 + C .
3
3
Problem 2. Solve the following IVP:
y0 =
xy 3
1
(1 + x2 ) 2
,
y(0) = −1
Give an explicit solution.
Solution. First we realize this equation is separable, and then proceed as usual from there.
Changin to Leibniz notation helps a lot!
dy
xy 3
=
1
dx
(1 + x2 ) 2
1
x
dy =
1 dx
3
y
(1 + x2 ) 2
Z
Z
1
x
dy
=
1 dx
y3
(1 + x2 ) 2
let u = 1 + x2 , =⇒ du = 2xdx
Z
Z
Z
1
x du
1
−3
y dy =
=
u− 2 du
1 ·
x
2
u 2 2
1
1
=⇒ −
= (1 + x2 ) 2 + C
2y
3
Now we apply our IC to find C:
y(0) = −1 =⇒ −
1
3
1
= (1 + 0) 2 + C =⇒ C = −
2(1)
2
So the implicitly defined solution is then
−
1
1
3
= (1 + x2 ) 2 −
2y
2
To find the explicit solution, we must solve for y in terms of x. So we proceed as follows:
1
3
2 12
(−2) −
=
(1 + x ) −
(−2)
2y
2
√
1
=
3
−
2
1 + x2
y2
1
√
y2 =
3 − 2 1 + x2
s
1
√
y = ±
3 − 2 1 + x2
However solutions to IVPs are unique and therefore only one of the above two is a solution.
Which one? Apply the initial conditions once more and check! If we want y(0) = −1 then
we need the “-” solution, thus our answer is
r
y=−
1
√
3 − 2 1 + x2
Problem 3. [Stewart, Ch. 9, Sec. 3, Prob. 31] Find the orthogonal trajectories of the
family of curves.
k
y=
x
where k is an arbitrary constant.
Solution. First we need to find a differential equation that is satisfied by all the members of
the family. So lets differentiate y = xk = kx−1 :
dy
= −kx−2
dx
But this formula depends on k so to get rid of it we note that y =
we can write our differential equation as
dy
y
= −(xy)x−2 = −x−1 y = −
dx
x
4
k
x
=⇒ k = xy. So then
So the slope of the tangent line at any point (x, y) on the curves given is y 0 = −x−1 y. So
the orthogonal trajectories must satisfy the following differential equation:
d˜
y
x˜
=
d˜
x
y˜
(the opposite reciprocal gives you the perpendicular slope!). Note we use x˜ and y˜ to specify
that we are working with a different curve now.
We are dealing with a separable equation, so we can solve it
Z
Z
y˜d˜
y = x˜d˜
x
1 2 1 2
y˜ = x˜ + C
2
2
1 2
(˜
y − x˜2 ) = C
2
where C is an arbitrary constant. Now to make our answer look like the book’s solution, we
multiply the whole equation by −2 and get a new constant K := −2C. Thus the orthogonal
trajectories are the family of curves given by the equation x2 − y 2 = K .
Problem 4. [Stewart, Ch. 9, Sec. 3, Prob. 47] A vat with 500 gallons of beer contains 4%
alcohol (by volume). Beer with 6% alcohol is pumped into the vat at a rate of 5 gal/min
and the mixture is pumped out at the same rate. What is the percentage of alcohol after an
hour?
Solution. Let a(t) denote the units of alcohol in the tank. We know that the equation we
want to create will have the following structure:
da
= (rate in) − (rate out)
dt
da
and we know that
has the units (units of alcohol)/min. So our units on the right hand
dt
side must also be the same.
(rate in) = ( flow rate of beer entering) · ( concentation of alcohol in beer entering )
6 units of alcohol
gal
30 units of alcohol
=
·5 =
100
gal
min
100
min
(rate out) = ( flow rate of beer exiting) · ( concentation of alcohol in beer exiting )
a units of alcohol
gal
a units of alcohol
=
·5 =
500
min
100
min
gal
Thus we arrive at the equation:
da
30
a
=
−
dt
100 100
5
which is a separable equation. Thus we can proceed to solve the equation
1
da
=
(30 − a)
dt
100 Z
Z
1
(30 − a)da =
dt
100
1
t+C
− ln |30 − a| =
100
Now we go back to the original problem to find our initial conditions. The original vat had
500 gallons of beer at 4% alcohol, so we see that:
a(0) =
4 units of alcohol
= 20 units of alcohol
gal
· 500
gal
100
So we apply this initial condition to our equation and find:
1
(0) + C
100
− ln(10) = C
1
t − ln(10)
=⇒ − ln |30 − a| =
100
− ln |30 − 20| =
Now we go back and see what the question asked for - the percentage of alcohol after an
hour. For this we plug in t = 60 and we find:
1
(60) − ln(10)
100
3
ln |30 − a| = ln(10) −
5
3
ln(10)− 53
|30 − a| = e
= eln(10) · e− 5
− ln |30 − a| =
3
30 − a = 10e− 5
3
=⇒ a = 30 − 10e− 5
Now we have the units of alcohol at time t = 60 but what we need is the percentage. Since
the volume of beer is a constant at 500 gallons for all time, the percentage of alcohol is given
as follows:
3
30 − 10e− 5
· 100 = 4.90 %
500
6
Section 9.4 - Models for Population Growth
Problem 1. One model for the spread of a rumor is that the rate of spread is proportional
to the product of the fraction y of the population who have heard the rumor and the fraction
who have not heard the rumor. Write a differential equation that is satisfied by y. Solve the
differential equation.
Solution. Let y denote the fraction of the population who have heard a rumor, this implies
then that 1 − y is the fraction of th epopulation who haven’t heard the rumor. The rate of
dy
. So since the model says that the rate of the spread
the spread of the rumor is given by
dt
of the rumor is proportional to the product of y and 1 − y we have:
dy
= ky(1 − y)
dx
where k ∈ R+ . This equation is separable so we can solve:
Z
Z
1
dy = k dx
y(1 − y)
y = kt + C
ln 1 − y
y
= Aekt
1−y
where A := eC . The above is an implicitly defined solution. What if I wanted to solve for y
and get an explicit solution?
y = Aekt (1 − y) = Aekt − Aekt y
y + Aekt y = Aekt
y(1 + Aekt ) = Aekt
Aekt
=⇒ y =
1 + Aekt
And so our explicit solution is given by y =
Aekt
.
1 + Aekt
7
Section 9.5 - Linear Equations
Problem 1. Solve the differential equation
dy 1
1 t
+ y = e3 .
dt 2
2
Solution. In this example we will go through and figure out how the integrating factor, I(t),
is found. On a quiz or exam, you can just tell me what I(t) should be based off the formula
given in the textbook.
Once we determine the integrating factor, we will multiply the equation by it so we will
get
1
1 t
dy
+ I(t) · y = I(t) · e 3
I(t) ·
dy
2
2
So now we ask ourselves if we can write the left side as the derivative of some particular
expression. Try to determine I(t) so that the left side is the derivative of the expression
(I(t) · y). We know that
dy
dI(t)
dy
1
+y·
= I(t) ·
+ I(t) · y
dt
dt
dy
2
1
dI(t)
= I(t)
=⇒
dt
2
This is a separable equation and therefore we can solve it easily:
Z
Z
dI(t)
1
=
dt
I(t)
2
1
ln |I(t)| =
t+K
2
1
1
I(t) = e 2 t+K = Ae 2 t
(I(t) · y)0 = I(t) ·
where A ∈ R. Now we get to pick our integrating factor and so let us pick the function
where A = 1 for ease. Thus our integrating factor is:
1
I(t) = e 2 t
Now we want to multiply our differential equation by the integrating factor and solve:
1
e2t ·
1
1
dy
1
1 t
1 5
+ e2t · y = e2t · e3 = e6t
dy
2
2
2
0
1
5
1
=
e2t · y
e6t
2
Z
1
1 5t
3 5
t
e2 · y =
e 6 dt = e 6 t + C
2
5
1
3 1t
y =
e 3 + Ce− 2 t
5
3 1
1
And so our solution is y = e 3 t + Ce− 2 t where C is a constant in R.
5
8
Problem 2. Solve the IVP
2y 0 + ty = 2,
y(0) = 1.
Solution. First we need to put our differential equation in the correct initial form:
t
y0 + y = 1
2
So we define P (t) =
t
and Q(t) = 1. Now we find our integrating factor:
2
R
I(t) = e
P (t)dt
=e
R
t
dt
2
t2
= Ae 4
t2
and so we choose I(t) = e 4 , that is we let A = 1. And now we proceed by multiplying our
differential equation then solving:
t2
t2
t2
t
e 4 · y0 + e 4 · y = e 4 · 1
2
t2 0
t2
e4 ·y
= e4
Z 2
t2
t
e4 ·y =
e 4 dt
But we note that the right hand side has no closed form solution to the integral! So we must
leave it as an integral and so we have
e
t2
4
Zt
·y =
s2
e 4 ds + C
0
2
− t4
Zt
y = e
s2
0
Now we plug in our ICs to find C:
1 = e0
Z0
s2
e 4 ds + Ce0
0
=⇒ C = 1
t2
And thus our solution is y = e− 4
Rt
s2
t2
e 4 ds + e− 4 .
0
9
t2
e 4 ds + Ce− 4
Section 9.6 - Predator-Prey Equations
Instead of doing a problem in this section, we will just discuss the dynamics of the LotkaVolterra Equations, which are a pair of first-rder, nonlinear differential equations.
dR
= kR − aRW
dt
dW
dt
= −rW + bRW
Where we have R as the number of prey (rabbits), W as the number of predators (wolves).
dR
k, a, r, b ∈ R+ are parameters (that are all positive real numbers). Lastly we see that
dt
dW
and
are the grow rates of the populations over time.
dt
What makes it nonlinear? The RW terms! These are not linear terms. This term represents interaction between the predator and prey.
We note that there are many assumptions that go into the equations (there is no effect
of the environment or evolution) but these still do a pretty good job of estimating populations of predators and prey as you would think they would work out.
Let us look at the prey equation first. We have a kR term and we see this is the same
as the natural growth equation from the population dynamics section. That is, this term
represents exponential growth by reproduction or unlimited food. While the −aRW term
represents the rate of predation, which is proportional to the predator and prey interaction.
Note that if either R or W are 0, there is no predation.
Now let us consider the predator equation. The bRW term represents the growth of predator
population. It’s similar to the term in the prey equation with a different constant. Why
must there be a different constant? The rate at which the predator population grows is not
necessarily equal to the rate at which the prey is consumed. Eating 1 rabbit doesn’t mean
there will be 1 new wolf. The −rW term is the loss rate of predators due to natural death
or emigration. This last term leads to exponential decay in the absence of prey (the food
source of the predators).
So what do the dynamics of the system look like? The predators are abundant when there
is a lot of food, that is, when there is lots of prey. However, with time, the predators will
deplete their food source and will run out of food to eat. This will lead to a decline in the
population of the predators. A decline in the population of predators means that the prey
population will start to grow as there is no one eating them. But then as the prey population grows, we see that there is a greater food supply for the predators, so they’ll start
eating the prey again and grow once more. This sort of cyclic dynamic continues indefinitely.
Equilibrium solutions are when equilibrium occurs, that is, when neither of the popu10
lation levels is changing with respect to time. That is, when the derivatives are 0:
dR
dt
=
=⇒
dW
dt
=
=⇒
kR − aRW = R(k − aW ) = 0
R=0
or
k − aW = 0
−rW + bRW = W (bR − r) = 0
W =0
or
bR − r = 0
Solving this and seeing what pair of solutions we have we get the following solutions that
go together (remember, solutions come with an ‘x’ and a ‘y’ since we’re in a 2 dimensional
system, or in our case, an ‘R’ and a ‘W’).
Equilibrium Solution 1: R = 0, W = 0
r
k
Equilibrium Solution 2: R = , W =
b
a
What do these solutions mean? Well Equilibrium Solution 1 correlates to the extinction
of both species. If both populations are at 0, they will continue to be so. Equilibrium
Solution 2 correlates to a fixed point in the system in which both populations sustain their
current, non-zero numbers.
11