You are on page 1of 6

Math 138: Assignment 5

due Friday, June 12, 2015 at 12:00 pm

1. Solve the following initial value problems.


dy
(a) tan x = a + y, y(/3) = a, 0 < x < /2
dx
This equation is separable and we can rewrite it as
dy y+a
=
Z dx Z tan x
dy dx
=
y+a tan x
Integrating both sides, we have

ln |y + a| = ln | sin x| + C
|y + a| = | sin x|eC
y + a = eC sin x
y = A sin x a

Substituting the initial value y(/3) = a into both sides we have

a = A sin(/3) a

3
2a = A
2
4a
A=
3
4a
Thus, the solution is y = sin x a.
3
0
(b) (x + 1)y + y = ln x, y(1) = 10
This equation is linear which we recognize by dividing both sides by (x + 1) to
obtain
1 ln x
y0 + y=
x+1 x+1
1
R
The integrating factor is I(x) = e x+1 dx = eln |x+1| = x + 1.
Multiplying both sides by the integrating factor, we obtain

(x + 1)y 0 + y = ln x

(Note that this is in fact the equation we started with. We could have noticed the
left side as the derivative of (x + 1)y right from the given differential equation.)
Integrating both sides we obtain
Z
(x + 1)y = ln xdx
(x + 1)y = x ln x x + C
(We used integration by parts to integrate ln x.)
Substituting the initial value y(1) = 10 into both sides, we have
(1 + 1)(10) = 1 ln(1) 1 + C
20 + 1 = C
C = 21
x ln x x + 21
Thus, the solution is y = .
x+1
(c) (1 + cos x)y 0 = (1 + ey ) sin x, y(0) = 0
Rewriting this as a separable equation, we have
dy sin x
y
= dx
1+e 1 + cos x
Multiply top and bottom of the left side by ey > 0.
ey dy sin x
y
= dx
e +1 1 + cos x

Integrating both sides, we have


ln(ey + 1) = ln |1 + cos x| + C
= ln |1 + cos x|1 + C
1
ey + 1 = eC
|1 + cos x|
A
ey = 1
|1 + cos x|
Substituting the initial value y(0) = 0 into both sides we have
A
e0 = 1
|1 + 1|
A
1+1 =
2
A = 4
 
4
Therefore, solving for y, we obtain y = ln 1 .
|1 + cos x|
2. Find the general solution to the following differential equations.
(a) y 0 + y cos x = 21 sin 2x
R
This is a linear differential equation with integrating factor I(x) = e cos xdx =
esin x .
Multiplying both sides by I(x), we obtain
1
y 0 esin x + y cos xesin x = (2 sin x cos x)esin x
2
using the identity sin 2x = 2 sin x cos x.
We can integrate the right sides by parts with u = sin x, dv = esin x cos xdx. Then
du = cos xdx and v = esin x . Integrating both sides we have
Z
sin x sin x
ye = sin xe esin x cos xdx

= sin xesin x esin x + C


Solving for y, we obtain y = sin x 1 + Ce sin x .
dy
(b) t2 y = 2t3 e1/t
dt
Dividing both sides by t2 , we recognize this as a linear differential equation.
dy 1
2 y = 2te1/t
dt t
1
R
dt 1
Multiply both sides by the integrating factor I(t) = e t2 = e t to obtain
dy 1
e1/t e1/t 2 y = 2te1/t e1/t
dt t
Integrating both sides and solving for y:
e1/t y = t2 + C
y = (t2 + C)e1/t
 
dP P
3. Recall that the logistic differential equation is given by = kP 1 .
dt M
1
(a) Using the substitution z = , show that this differential equation can be trans-
P
dz k
formed into the linear differential equation + kz = .
dt M
1 1 dP 1 dz
Since z = , then P = and = 2 .
P z dt z dt
Substituting this into the logistic equation we obtain
 
1 dz 1 1
2 = k 1
z dt z zM
1 dz k k
2 = 2
z dt z z M
1 dz k k
+ =
z 2 dt z z2M
dz k
+ kz =
dt M
as desired.
(b) Solve the linear differential equation
R
in part a).
kdt
The integrating factor is I(t) = e = ekt . Multiplying both sides of the linear
d.e. by I(t), we get
dz ekt k
ekt+ ekt kz =
dt M
Integrating both sides with respect to t:
Z kt
kt e k
e z = dt
M
kekt
= +C
kM
ekt
ekt z = +C
M
1
z = + Cekt
M
1 + M Cekt
=
M
(c) Show that your answer to part b) agrees with the solution to the logistic equation
M
found in class, P (t) = .
1 + Aekt
Note that
1 M
=
z 1 + M Cekt
M
=
1 + Aekt
= P (t)

where A = M C.

4. Suppose a container has 4L of saltwater with a salt concentration of 0.25kg/L. Further


suppose that brine with a salt concentration of 0.5kg/L is pumped into the container
at a rate of 3L/min and pumped out at the same rate. Let y(t) be the amount in
kilograms of salt in the container where t is in minutes.

(a) State initial value problem modelling the amount of salt in the container. Solve
the initial value problem and find the amount of time it takes for there to 1.5kg
of salt in the container.
(b) Suppose instead that the solution in the container is pumped out at 2L/min.
State the initial value problem corresponding to this scenario and solve it.

dy y 
(a) = rate in rate out = (0.5kg/L)(3L/min) kg/L (3L/min), y(0) = 1
dt 4

dy 3 3y
=
dt 2 4
6 3y
=
4
dy dt
=
6 3y 4
Z Z
dy dt
=
6 3y 4
1 t
ln |6 3y| = + C
3 4
3t
|6 3y| = e 4 3C
3t
6 3y = Ae 4
A 3t
y = 2 e 4
3
A
From y(0) = 1 we get 1 = 2 which gives A = 3. We then have
3
3t
y = 2 e 4
To solve for the amount of time it takes for there to be 1.5kg of salt,
3t
1.5 = 2 e 4
3t 1
e 4 =
2 
3t 1
= ln
4 2
 
4 1
t = ln
3 2
4
= ln (2) minutes
3
dy 3 2y
(b) = , y(0) = 1
dt 2 4+t
dy 2y 3
Re-writing the differential equation as + = , we see that this is a linear
dt 4 + t 2
differential equation. We have that
2
R
dt
I(t) = e 4+t

= e2 ln |4+t|
= (4 + t)2

So then
d  3(4 + t)2
y(4 + t)2 =
dt Z 2
3(4 + t)2
Z
d
y(4 + t)2 dt =

dt
dt 2
Z
2 3
y(4 + t) = (4 + t)2 dt
2
3 (4 + t)3
 
= +C
2 3
4+t C
y= +
2 (4 + t)2
From y(0) = 1 we get C = 16 so then
4+t 16
y=
2 (4 + t)2

5. Suppose that a cup of boiling hot coffee (ie its temperature is 100 C) is left in a 20 C
room and sits until it has cooled to 60 C. The cup of coffee is then taken outside where
the temperature is 5 C. After 15 minutes, the coffee is now 25 C. How long has the
coffee been cooling in total?
Let T (t) give the temperature of the coffee where t is in minutes. Newtons Law of
dT
Cooling gives = k(T TS ) where TS is the surrounding temperature. This gives
dt
that
T (t) = Cekt + TS
We have two different situations to consider. The first being the cup of coffee in the
room and the second being the cup of coffee outside. Let t denote the time at which
the coffee is removed from the room and taken outside. We have two time intervals,
when 0 t < t (when the coffee is inside) and when t t t + 15 (when the coffee
is outside).
Consider when t t t + 15. We have that TS = 5, T (t ) = 60, and T (t + 15) = 25.

From this we see that T (t) = Cekt + 5 so then 60 = T (t ) = Cekt + 5 which gives

C = 55ekt . Thus, we have T (t) = 55ek(tt ) + 5. We now solve for the value of k
using that T (t + 15) = 25,

25 = 55e15k + 5
4
e15k =
11  
1 4
k= ln
15 11

Now consider the period of time when 0 t < t . We have that TS = 20 and
T (0) = 100. From this and the work above we get
1 4
T (t) = Ce 15 ln ( 11 )t + 20
100 = C + 20
C = 80

So then 1 4
T (t) = 80e 15 ln ( 11 )t + 20
From T (t ) = 60 we get
1 4
60 = 80e 15 ln ( 11 )t + 20

1 4 1
e 15 ln ( 11 )t =

  2 
1 4 1
ln t = ln
15 11 2
1

15 ln
t = 4
2
ln 11

15 ln 21

So then the total time that the coffee is cooling is 15 + 4
 25.3 minutes.
ln 11

You might also like