You are on page 1of 9

APMA 0350 Homework 1 Solutions

Instructor: Dave Kaspar


Due in class on Wednesday, February 10, 2016
Exercise 1. In each case, determine the constants (denoted by a, b, or c) such that the
given function satisfies the differential equation.
(a) y 00 6y 0 + 25y = 0; y(t) = eat sin bt
(b) y 0 + y = cos t; y(t) = eat + b cos t + c sin t
Solution.
(a) Given that y(t) = eat sin bt, we know that
y0 =

d at
(e sin bt) = beat cos bt + aeat sin bt
dt

(1)

and

d2 at
y = 2 (e sin bt) = 2abeat cos bt + a2 eat sin bt b2 eat sin bt.
dt
We can now plug into y 00 6y 0 + 25y = 0, giving us
00

(2)

(2abeat cos bt + a2 eat sin bt b2 eat sin bt) 6(beat cos bt + aeat sin bt) + 25(eat sin bt) = 0, (3)
which we can simplify to
(2ab 6b)eat cos bt + (25 + a2 b2 6a)eat sin bt = 0.

(4)

We want to know for which values of a, b this is zero for all t.


Consider first the case b = 0, where cos and sin evaluate as 1 and 0, respectively. In
this case we see that any value of (4) is satisfied for all t regardless of a.
Suppose now that b is nonzero. Evaluating at t = 0, we find
2ab 6b = 0.

(5)

25 + a2 b2 6a = 0.

(6)

Evaluating at t = /(2b), we find

If (4) is to be zero for both t = 0 and t = /(2b), then the parameters a and b must
satisfy the system
(
2ab 6b = 0
(7)
2
25 + a b2 6a = 0.
Conversely, it is clear that if a and b satisfy the system, then (4) is satisfies for all t.
Solving 2ab 6b = 2b(a 3) = 0, we get a = 3 or b = 0. We handled the b = 0 case
above. If a = 3, plugging in to 25 + a2 b2 6a = 0 gives b = 4.
Summarizing, the given function y(t) is a solution if b = 0 and a is arbitrary, or a = 3
and b = 4.
(b) We will use a similar approach for part b. y(t) = eat + b cos t + c sin t, so
y 0 (t) = aeat b sin t + c cos t.

(8)

Plugging in to y 0 + y = cos t, we get


(aeat b sin t + c cos t) + (eat + b cos t + c sin t) = cos t,

(9)

(a + 1)eat + (b + c) sin t + (b + c) cos t = 0eat + 0 sin t + cos t.

(10)

which simplifies to

Thus we get the system of equations


a+1=0
b + c = 0
b+c=1

(11)

By solving this system, we get our final answer a = 1, b = 21 , and c = 12 .


Problem 2. Consider a mixing problem with two tanks connected as indicated in the following illustration.
Tank A

Tank B
1000 liters
2 liters / second

1 liter / second

1 liter / second

500 liters

10 g NaCl / liter
1 liter / second

(a) Write out a system of ODE for a(t) and b(t), which are the masses (in grams) of
dissolved NaCl in each of tanks A and B, respectively, at time t seconds.
Solution. First note that for each tank, the net inflow rate equals the net outflow rate,
so the volumes in tanks A and B are constant. Since the units of a0 (t) and b0 (t) are
grams/second, we use dimensional analysis to obtain the system of ODEs:
a0 (t) =

b(t) grams 2 liters a(t) grams 1 liter a(t) grams 1 liter

1000
liters
second
500
liters
second
|
{z
} |
{z
} |500 liters
{z second}
input from tank B

output to left

output to tank B

10 grams 1 liter a(t) grams 1 liter b(t) grams 2 liters


b (t) =
+

.
| liter {z second} |500 liters
{z second} |1000 liters
{z second}

(12)

input from right

input from tank A

output to tank A

After simplification, we obtain the system:


a(t) b(t)
+
250
500
a(t)
b(t)
b0 (t) =

+ 10.
500
500

a0 (t) =

(13)

(b) Suppose that a(0) = 0 and b(0) = 1000. Guess limt a(t) and limt b(t), and
explain your thoughts. (You dont have to solve the system or prove your guesses are
correct.)
Solution. By looking at the system it seems reasonable that, regardless of the initial
data, if we let the system run sufficiently long, all the fluid which starts in the two
tanks will eventually flow out the tap on the left. This means that the starting fluid
will all be replaced with the input fluid (from the right), which has concentration of 10
grams / liter of NaCl. Thus we expect the limiting NaCl concentrations of both tanks
to be the same as the input fluid. This guess gives us limiting concentrations a = 5000
grams and b = 10000 grams.
(c) Verify that if both a(t) and b(t) are at their limiting values determined in part (b),
then a0 (t) = b0 (t) = 0.
Solution. We see that at equilibrium, when a0 (t) = b0 (t) = 0, the values of a and b
must satisfy the system of equations:
b
a
+
=0
250 500
a
b

+ 10 = 0,
500 500

(14)

2a b = 0
a b = 5000.

(15)

which simplifies to:

This has unique solution a = 5000, b = 10000, corresponding with our guess above.
3

Remark. Does it make sense that this equilibrium is independent of initial conditions,
i.e. that you cannot rig the system in some way to get different equilibrium amounts?
Exercise 3 ([C, 2.2.4]). Solve the initial value problem
t2 y 0 + 3ty = 4e2t ,

y(1) = e2 .

Solution. This is a first order linear equation. We would like to use the method of integrating
factors. In order to do this we need to write the equation in the form
y 0 + a(t)y = g(t).

(16)

Assuming t > 0 we may divide both sides of the equation by t to form the new equation
3
4
y 0 + y = 2 e2t .
t
t
The integrating factor, (t), is given by equation 30 on p. 36 of [BDiP]

Z t
3
ds = t3 .
(t) = exp
1 s

(17)

(18)

So the solution is


Z t
Z t
1
4
3 4 2s
2s
y(t) = 3
s 2 e ds + C = 3
se ds + C
t
s
t
1
1

1
= 3 e2t (2t 1) e2 + C
t

(19)

By evaluating y(1) we find that C = e2 so the solution is


1 2t
e (2t 1).
t3

y(t) =

(20)

In order to evaluate the integral,


Z

se2s ds

(21)

t
Z
s 2s
1 t 2s
se ds = e
e ds
2
2 1
s=1
te2t e2 e2t e2
=

2
4
2te2t e2t e2
e2t (2t 1) e2
=
=
.
4
4

(22)

we use integration by parts


Z
1

2s

Problem 4 ([BDiP, 2.1.33]). Show that if a and are positive constants and b is any real
number, then every solution of the equation
y 0 + ay = bet
has the property that y 0 as t . Hint: Consider the cases a = and a 6= separately.
Solution.
We can solve the ODE explicitly using integrating factor of eat :

eat y 0 + aeat y = bea t


d at
(e y) = be(a)t
dt
d(eat y) = be(a)t dt
Z t
at
e y(t) =
be(a)t dt

(23)

0
b
Case 1: a 6= : eat y(t) = a
e(a)t + C y(t) =
we can conclude y(t) 0 as t .

b
et
a

+ Ceat . Since a, > 0,

Case 2: a = : From the first bullet point, we have


Z t
Z t
at
(a)t
at
y(t) = e
be
dt = e
bdt = (bt + C)eat .
0

(24)

Again, since exponential decays faster than any polynomial, y(t) 0 as t .

Exercise 5. Solve the initial value problem


y 0 = 2y 2 + ty 2 ,

y(0) = 0.

Solution. This is a first order nonlinear equation. The solution with the given initial condition is y(x) = 0 for all x R.
As an exercise, you can solve the same differential equation with initial condition y(0) = 1.
The equation is separable and can be rewritten as
1 dy
2 x = 0.
y 2 dx

(25)

Now we can rewrite this as

1
dy = (2 + x)dx
y2
and then integrating with respect to x we find
1
x2
= 2x +
+C
y
2
5

(26)

(27)

where C is an arbitrary constant. To determine the solution satisfying y(0) = 1 we solve the
equation y in terms of x,
y=

1
2x +

1 2
x
2

+C

x2

2
+ 4x + C

(28)

and we find C = 2. The solution is


y(t) =

x2

2
.
+ 4x 2

(29)

Problem 6 (Adapted from [S]). For the differential equation,


y 0 = y 2 (y + 1)(2 y)
do all of the following:
(a) Plot the right-hand side.
(b) Determine all equilibria and their stability.
(c) Sketch several qualitatively different solutions.
(d) Find those values of y where these solutions switch from concave to convex or vice
versa. (Recall that a twice differentiable function is convex where its second derivative
is positive, and concave where its second derivative is negative.)
Solution.

(a)
(b) Equilibria are determined by setting y 0 = 0, so y 2 (y + 1)(2 y) = 0 y = 1, 0, 2.
Notice these are the zeros of the graph in Part a. Stability is determined by whether
y 0 is below or above zero on either side of the equilibria. Thus, y1 = 1 is unstable,
y2 = 0 is semi-stable, and y3 = 2 is stable.

(c)
(d) We calculate the second derivative of y by using the chain rule:
y 00 (t) =

d 0
d
df dy
y (t) = f (y) =
.
dt
dt
dy dt

(30)

By direct calculation,
df
= 2y(y + 1)(2 y) + y 2 (2 y) y 2 (y + 1) = 4y 3 + 3y 2 + 4y.
dy

(31)

Thus,


y 00 (t) = 4y 3 + 3y 2 + 4y y 2 (y + 1)(2 y)


= y 4y 2 + 3y + 4 y 2 (y + 1)(2 y) = y 3 (y + 1)(2 y)(y r1 )(y r2 ),
(32)

where r1,2 = 83 1
73.
(Weve
used
the
quadratic
formula
to
factor
the
quadratic
8
term). We plot this below:

This, at 1 and r2 the solution switches from convex to concave. At 0 there is no


change. At r1 and 2 the solution changes from concave to convex.
7

Problem 7 ([BDiP, 2.3.25]). A body of constant mass m is projected vertically upward with
an initial velocity v0 in a medium offering a resistance k|v|, where k is a constant. Neglect
changes in the gravitational force.
(a) Find the maximum height xm attained by the body and the time tm at which this
maximum height is achieved.
(b) Show that if kv0 /(mg) < 1, then tm and xm can be expressed as
"
#

2
1 kv0 1 kv0
v0
1
+

tm =
g
2 mg 3 mg
"
#

2
v02
2 kv0 1 kv0
xm =
1
+
.
2g
3 mg 2 mg

(33)

(c) Show that the quantity kv0 /(mg) is dimensionless.


Remark. The problem does not clearly specify the initial time and initial height; we will
assume that these are both zero, which must be what [BDiP] wanted, since we get the right
answer.
Solution. The first step is to identify the initial value problem satisfied by v = v(t). The
forces acting on the body are gravity, which gives a force mg, and the resistance of the
medium, which gives a force1 kv. The net force acting on the mass is mg kv. Using
Newtons second law F = ma, we find
k
k 
mg 
F
= g v =
v+
.
(34)
v0 = a =
m
m
m
k
We need to solve this ODE with initial condition v(0) = v0 .
This is in the form y 0 = ayb discussed in class and [BDiP], and we find v+ mg
= Cekt/m
k
mg
for some constant C. Imposing v(0) = v0 forces C = (v0 + k ), and the solution to the initial
value problem is

mg  kt/m mg
v(t) = v0 +
e

.
(35)
k
k
We have v(0) = v0 > 0 for an upward launch and limt v(t) = mg
< 0 using (35),
k
so there is a positive maximum height. Using first-semester calculus, the time tm when the
maximum height is achieved must have v(tm ) = 0. Setting (35) equal to zero and solving,
we find


m
kv0
tm =
log 1 +
.
(36)
k
mg
Recall that log(1 + x) has a power series with radius of convergence 1:
log(1 + x) =

X
(1)n+1 xn
n=1

=x

x 2 x3
+

2
3

(|x| < 1).

(37)

When the problem says the medium offers resistance k|v|, it is giving the magnitude of the resistance.
The direction of the resistance should be the opposite of the sign of v. Thus the force is sgn(v)k|v| = kv.

So, if kv0 /(mg) < 1,


"
#

2

3

4
m kv0 1 kv0
1 kv0
1 kv0
tm =

+
k mg 2 mg
3 mg
4 mg
"
#

2

3
v0
1 kv0 1 kv0
1 kv0
=
1
+

+ ,
g
2 mg 3 mg
4 mg

(38)

the second equality following after we factor kv0 /(mg) from all the terms of the series. We
have provided the information about tm required for question parts (a) and (b).
We use the ODE to relate xm and tm . Namely, after solving (34) for v,
Z tm
Z tm
m
mg
m
mg
v 0 (t)
dt = (v(0) v(tm ))
tm .
(39)
v(t) dt =
xm =
k
k
k
k
0
0
(This is, of course, no more than a shortcut; we could have simply integrated our explicit
formula for v(t).) Since v(0) = v0 and v(tm ) = 0,



mv0 mg
m
kv0
mg
xm =

tm =
log 1 +
v0 +
.
(40)
k
k
k
k
mg
Alternately, using the series for tm when kv0 /(mg) < 1,
"
#

2

3
1 kv0 1 kv0
1 kv0
mv0 mg v0

1
+

+
xm =
k
k g
2 mg 3 mg
4 mg
#
"

2

3
1 kv0
mv0 1 kv0 1 kv0
+

=

k
2 mg 3 mg
4 mg
#
"

2
v02
2 kv0 1 kv0
=
,
1
+
2g
3 mg 2 mg

(41)
(42)
(43)

factoring kv0 /(mg) from each term of the series, and we have finished (a) and (b).
(c) Recall from our derivation of (34) that kv (and hence kv0 ) and mg both have units
of force, so their quotient is dimensionless. Another way: if kv0 /(mg) had units u, then the
series expressions for tm and xm would be adding quantities with units u0 , u1 , u2 , . . . which
physically cannot make sense.

References
[BDiP] William E. Boyce and Richard C. DiPrima, Elementary Differential Equations and Boundary Value
Problems, 10th ed., Wiley, 2012.
[CP] George F. Carrier and Carl E. Pearson, Ordinary Differential Equations, SIAM, 1991.
[C] Christian Constanda, Differential Equations: A Primer for Scientists and Engineers, Springer, 2013.
[R] Clay C. Ross, Differential Equations: An Introduction with Mathematica, 2nd ed., Springer, 2004.
[S] Bj
orn Sandstede, Materials from APMA 0350, 2014. Unpublished.

You might also like