Math 2142 Homework 5 Solutions Problem 1. Consider the first

Math 2142 Homework 5 Solutions
Problem 1. Consider the first initial value problem.
dy
= (1 − 2x)y 2
with
y(0) = −1/6
dx
Rewriting this separable equation, we get
Z
Z
1
dy =
(1 − 2x) dx
y2
−1
= x − x2 + c
y
Plugging in y = −1/6 and x = 0 from the initial condition gives 6 = c. Solving for y gives
−1
= x − x2 + 6
y
1
= −x + x2 − 6
y
1
y = 2
x −x−6
Now consider the second initial value problem.
dy
= xy 3 (1 + x2 )−1/2
with
y(0) = 1
dx
Rewriting this separable equation, we get
Z
Z
x
1
√
dy =
dx
3
y
1 + x2
Z
x
−1
√
=
dx
2
2y
1 + x2
To do the remaining integral, use the substitution u = 1 + x2 , so du = 2x dx. This gives
Z
Z
√
√
x
1
1
√
√ du = u + c = 1 + x2 + c
dx =
2
u
1 + x2
Therefore, altogether we have
−1 √
= 1 + x2 + c
2y 2
Plugging in y = 1 and x = 0 from the initial condition gives −1/2 = 1 + c, so c = −3/2. To
solve for y
√
−1
3
=
1 + x2 −
2
2y
2
√
1
= −2 1 + x2 + 3
y2
√
y = (3 − 2 1 + x2 )−1/2
Problem 2. For the first differential equation
dy
x2
=
dx
y(1 + x3 )
we separate the variables to get
Z
Z
y dy =
x2
dx
1 + x3
The y integral is just y 2 /2. To do the x integral, use the substitution u = 1+x3 , so du = 3x2 dx.
Z
Z
√
1
x2
1
1
1
3
du = ln |u| + c = ln |1 + x3 | + c = ln( 1 + x2 ) + c
dx =
3
1+x
3
u
3
3
We can remove the absolute value signs because x > 0. Altogether, we have
√
3
y 2 /2 = ln( 1 + x2 ) + c
q
√
3
y = ± 2 ln( 1 + x2 ) + c
where the c in the second line is really twice the constant from the first line.
For the second differential equation
2x
dy
= y
dx
ye − x2 yey
we separate the variables to get
Z
y
ye dy =
Z
2x
dx
1 − x2
To calculate the y integral, we use integration by parts. Let u = y and dv = ey dy. Then
du = dy and v = ey , giving us
Z
Z
y
y
ye dy = ye − ey dy = yey − ey
(and I’ll save the integration constant for the end). To do the x integral, use the substitution
u = 1 − x2 , so du = −2x dx.
Z
Z
2x
1
dx = −
du = − ln |1 − x2 | + c = − ln(1 − x2 ) + c
2
1−x
u
Note that we can remove the absolute value signs because −1 < x < 1. Altogether, we get
yey − ey = − ln(1 − x2 ) + c
which we will not attempt to solve for y!
Problem 3(a). Solve the following algebraic equation explicitly for y.
y 2 − 2y + 4 = x4 + x2 + 6
Solution. As indicated on the homework, we completing the square on the left side and solve
for y.
(y − 1)2 − 1 + 4
(y − 1)2 + 3
(y − 1)2
y
=
=
=
=
x4 + x2 + 6
x4 + x2 + 6
x4 + x2 + 3
√
± x4 + x2 + 3 + 1
3(b). Solve the following separable initial value problem and give the solution explicitly as a
function y(x).
3x2 + ex
dy
=
with
y(0) = 1
dx
2y − 4
Solution. Separating the variables, integrating and completing the square gives
Z
Z
2y − 4 dy =
3x2 + ex dx
y 2 − 4y
(y − 2)2 − 4
(y − 2)2
y
=
=
=
=
x3 + ex + c
x3 + ex + c
x3 + ex + b
c
√
2 ± x3 + e x + b
c
where b
c = c + 4 is an altered constant of integration. To solve for the constant b
c, we plug in
y = 1 and x = 0 to get
√
c
1 = 2± 0+1+b
It follows that b
c = 0 and we need to use the negative square root. So, the specific solution is
√
y = 2 − x3 + ex
Problem 4. A tank contains 1000 liters of water with 15 kg of dissolved salt. Pure water
enters the tank at a rate of 10 liters per minutes and the mixture is drained from the bottom
at the same rate. Assume that the solution is kept thoroughly mixed, how many kilograms
of salt are in the tank after t minutes?
Solution. Let y(t) be the amount of salt (in kilograms) in the tank after t minutes. We are
given y(0) = 15. To express dy/dt, we need to determine the rates at which salt is entering
and leaving the tank. Since the water entering the tank contains no salt, the rate at which
salt enters is 0. The rate at which salt is leaving the tank is
L
y
y kg
· 10
=
1000 L
min
100
measured in kilograms per minute. Therefore, our initial value problem for this situation is
dy
y
=−
dt
100
with
y(0) = 15
We know that the solution to a differential equation of the form dy/dt = ky is y = Aekt where
A = y(0). Therefore, the solution here is
y(t) = 15e−t/100
Problem 5. Newton’s Law of Cooling states that the rate of cooling (or heating) of an
object is proportional to the temperature difference between the object and its surroundings.
In other words, if T (t) is the temperature of the object at time t and Ts is the constant
temperature of its surroundings, then Newton’s Law of Cooling says that T (t) satisfies
dT
= k(T (t) − Ts )
dt
for some constant k.
5(a). A can of soda at 72 degrees is placed in a refrigerator where the temperature is 44
degrees. Use Newton’s Law of Cooling to set-up and solve a differential equation for T (t),
the temperature of soda after t minutes. (The constant k will appear in your answer but you
can solve for the constant of integration using the initial temperature of the can.)
Solution. Let T (t) be the temperature of the can t minutes after it is placed in the refrigerator.
Since the temperature of the refrigerator is 44 degrees, we have Ts = 44. Since the initial
temperature of the can is 72 degrees, we have T (0) = 72. Therefore, our initial value problem
is
dT
= k(T − 44)
with
T (0) = 72
dt
Separating the variables gives
Z
Z
1
dT =
k dt
T − 44
ln(T − 44) = kt + c
T − 44 = Aekt
T (t) = Aekt + 44
where A = ec is the altered constant of integration. Note that we do not need absolute value
signs for ln |T − 44| because T (0) = 72, so we know T (t) − 44 is positive. To find the constant
A of integration, we plug in T = 72 and t = 0 to get 72 = A + 44, or in other words, A = 28.
Altogether, our solution looks like
T (t) = 28ekt + 44
5(b). After 20 minutes, the temperature of the can is 61 degrees. Use this information to
find the constant k.
Solution. We are given T (20) = 61, so we can find k by plugging in t = 20 and T = 61.
61 = 28e20k + 44
which means k = −0.025 (approximately).
5(c). How long does it take for the soda to cool to 50 degrees?
Solution. We need to solve
50 = 28e−0.025t + 44
which gives t = 62 (approximately).
Problem 6. One model for the spread of a rumor is that the rate of spread is proportional
to the product of the fraction of people who have heard the rumor and the fraction of the
people who have not heard the rumor. If y(t) denotes the fraction of people who have heard
the rumor after t days, then the modeling differential equation is
dy
= ky(1 − y)
dt
where k is the proportionality constant.
6(a). Find the general solution to this separable differential equation. (You can assume that
0 < y < 1, and hence 0 < 1 − y < 1 as well. The constant k will appear in your solution in
addition to the constant of integration.)
Solution. Separating the variables gives
Z
1
dy =
y(1 − y)
Z
k dt
The t integral is just kt + c, but to do the y integral, we need to use partial fractions.
1
A
B
A(1 − y) + By
= +
=
y(1 − y)
y
1−y
y(1 − y)
and therefore, 1 = A(1 − y) + By. Since this equality has to hold for all y, we can plug in y
values to help us determine the constants A and B. Plugging in y = 1 gives us 1 = B and
plugging in y = 0 gives us 1 = A. So, our partial fraction decomposition is
1
1
1
= +
y(1 − y)
y 1−y
Returning to our original integrals, we have
Z
1
dy
y(1 − y)
Z
1
1
+
dy
y 1−y
ln(y) − ln(1 − y)
y
ln
1−y
y
1−y
1−y
y
1
−1
y
1
y
1
y
Z
=
k dt
= kt + c
= kt + c
= kt + c
= Aekt where A = ec
=
=
=
=
y =
1
Aekt
1
Aekt
1
+1
Aekt
1 + Aekt
Aekt
Aekt
1 + Aekt
6(b). Suppose at t = 0, one person is a class of 25 has heard a rumor and at t = 1, two people
in the class have heard the rumor. Use this information to find the value of the constant of
integration and the constant k.
Solution. We are given y(0) = 1/25 and y(1) = 2/25. Plugging in y = 1/25 and t = 0,
A
1
=
25
1+A
1 + A = 25A
1
= A
24
To find k, we plug in y = 2/25 and t = 1 to get
2
ek /24
=
25
1 + ek /24
Multiplying the right side by 24/24, the right side becomes ek /(24 + ek ). From here, we
simplify to find k.
2
25
25
2
25
2
23
2
48
23
=
=
=
=
ek
24 + ek
24 + ek
ek
24
+1
ek
24
ek
= ek
and so k = ln 48/23. Plugging A and k into our original solution gives
y(t) =
1/24 · et ln(48/23)
1 + 1/24 · et ln 48/23
Multiplying the right side by 24/24, move the t into the logarithm as an exponent and cancel
the exponential and logarithm to get
y(t) =
(48/23)t
24 + (48/23)t
6(c). When will 90% of the class have heard the rumor?
Solution. To find when 90 percent of the class has heard the rumor, we need to solve
(48/23)t
9
=
10
24 + (48/23)t
for t. I don’t have a calculator handy, but you can simplify this expression as follows.
9
10
10
9
10
9
1
9
9 · 24
ln 216
ln 216
ln 48/23
=
=
=
=
=
=
(48/23)t
24 + (48/23)t
24 + (48/23)t
(48/23)t
24
+1
(48/23)t
24
(48/23)t
(48/23)t
t ln 48/23
= t
Problem 7. For the first initial value problem
dy
2
+ 2xy = 4e−x
dx
with
y(0) = 3
our integrating factor is
I(x) = e
R
2x dx
= ex
2
The next integral we need to calculate is
Z
Z
Z
x2
−x2
I(x) · Q(x) dx = e · 4e
dx = 4 dx = 4x + c
2
Since 1/I(x) = e−x , the general solution is
2
2
y(x) = e−x (4x + c) = 4xe−x + ce−x
2
To find the constant c, we plug in y = 3 and x = 0 to get
3 = 4(0)e0 + ce0
Therefore, c = 3 and the specific solution is
2
2
y(x) = 4xe−x + 3e−x
Next, consider the second differential equation. We rewrite it in the form of a linear
equation as
dy y
− = 2t2
dt
t
The integrating factor is
I(t) = e
R
−1/t dt
−1
= e− ln t = eln t
= t−1
The next integral to calculate is
Z
Z
Z
−1
2
I(t) · Q(t) dt = t · 2t dt = 2t dt = t2 + c
Since 1/I(t) = t, the general solution is
y(t) = t · (t2 + c) = t3 + ct
Consider the third integral
dy
+ y = 3x
dx
The integrating factor is
I(x) = e
R
1 dx
= ex
The next integral we need to calculate is
Z
Z
Z
x
I(x) · Q(x) dx = e · 3x dx = 3xex dx
We do this integral using integration by parts. Set u = 3x and dv = ex dx, so du = 3 dx and
v = ex . We get
Z
Z
x
x
3xe dx = 3xe − 3ex dx = 3xex − 3ex + c = 3xex − 3ex + c
(Notice that the c really should be inside the minus sign, but since it is a constant, it doesn’t
matter in the sense that it can be replaced by its negative.) Since 1/I(x) = e−x , the general
solution is
y(x) = e−x (3xex − 3ex + c) = 3x − 3 + ce−x
Finally, we consider the last differential equation
dy
+ 3y = sin 2x
dx
The integration factor is
R
I(x) = e
3 dx
= e3x
The next integral to calculate is
Z
Z
I(x) · Q(x) dx = e3x sin 2x dx
To do this integral, we will need to use integration by parts twice. First, let u = sin 2x and
dv = e3x dx, so du = 2 cos 2x dx and v = 1/3 · e3x . We get
Z
Z
3x
3x
e sin 2x dx = 1/3 · e sin 2x − 2/3 · e3x cos 2x dx
To do the remaining integral, let u = cos 2x and dv = e3x dx, so du = −2 sin 2x dx and
v = 1/3 · e3x . We get
Z
Z
3x
3x
3x
3x
e sin 2x dx = 1/3 · e sin 2x − 2/3 1/3 · e cos 2x + 2/3 · e sin 2x dx
Z
Z
3x
3x
3x
e sin 2x dx = 1/3 · e sin 2x − 2/9 · e cos 2x − 4/9 · e3x sin 2x dx
Z
13/9 · e3x sin 2x dx = 1/3 · e3x sin 2x − 2/9 · e3x cos 2x
Z
e3x sin 2x dx = 3/13 · e3x sin 2x − 2/13 · e3x cos 2x + c
Note that I added the constant of integration in the last step. Since 1/I(x) = e−3x , the
general solution is
y(x) = e−3x (3/13 · e3x sin 2x − 6/13 · e3x cos 2x + c) = 3/13 · sin 2x − 2/13 · cos 2x + ce−3x
Problem 8. A tank contains 100 liters of pure water. Brine containing 0.4 kilograms of salt
per liter is added to the tank at a rate of 5 liters per minute. The solution in the tank is kept
thoroughly mixed and is drained at a rate of 3 liters per minute. How many kilograms of salt
are in the tank after t minutes?
Solution. Let y(t) be the amount of salt (in kilograms) in the tank after t minutes. We are
given y(0) = 0. The rate at which salt is entering the tank is
L
kg
kg
·5
=2
L
min
min
To determine the rate at which salt is leaving the tank, note that at time t we have 100 + 2t
liters of brine in the tank because the brine is entering at a rate of 5 liters per minute and
only draining at a rate of 3 liters per minute. Therefore, the rate out is
0.4
3
y kg
3y
kg
L
·
=
min 100 + 2t L
100 + 2t min
Our initial value problem is
dy
3y
=2−
with
y(0) = 0
dt
100 + 2t
Writing this as a linear first order differential equation, we have
dy
3
+
y=2
dt 100 + 2t
The integrating factor is
I(t) = e
R
3
100+2t
dt
= e3/2·ln(100+2t) = eln(100+2t)
3/2
= (100 + 2t)3/2
Therefore, the solution y(t) is given by
−3/2
y(t) = (100 + 2t)
Z
2(100 + 2t)3/2 dt
To calculate the integral, use the substitution u = 100 + 2t, so du = 2 dt.
Z
Z
2
2
3/2
2(100 + 2t) dt = u3/2 du = u5/2 + c = (100 + 2t)5/2 + c
5
5
Plugging this into the formula for y(t) gives
2
2
c
−3/2
5/2
y(t) = (100 + 2t)
(100 + 2t) + c = (100 + 2t) +
5
5
(100 + 2t)3/2
To find c, we plug in y = 0 and t = 0 giving us
2
c
0 = (100) +
5
1003/2
and so c = −40000. Altogether, we have
2
40000
y(t) = (100 + 2t) −
5
(100 + 2t)3/2