Midterm Solutions
Midterm Solutions
28 February, 2007
Name: Solutions
ID:
Instructions: Put away all electronic devices, calculators, cell phones, et cetera. Write
only on the paper provided. Please box the final result of calculations.
1. (20 points): A nitric acid solution flows at a constant rate of 6 L/min into a large
tank that initially held 200 L of 0.5% nitric acid solution. The solution inside the
tank is kept well stirred and flows out of the tank at a rate of 6 L/min. If the
solution entering the tank is 20% nitric acid, determine the volume of nitric acid
in the tank after t minutes.
Solution: (See problem 3, page 98.) Let V (t) be the volume of solution (water and
nitric acid) measured in liters after t minutes. Let x(t) be the volume of nitric acid
measured in liters after t minutes, and let c(t) be the concentration (by volume) of
nitric acid in solution after t minutes.
The volume of solution V (t) doesn’t change over time since the inflow and outflow
of solution is equal. Thus V = 200 L. The concentration of nitric acid c(t) is
x(t) x(t)
c(t) = = .
V (t) 200
1
or
dx
+ 0.03x = 1.2, (1)
dt
which is a linear equation. The initial condition condition is found in the following
way:
5 Lnit. x(0) Lnit.
c(0) = 0.5% = = .
1000 Lsol. 200 Lsol.
Thus x(0) = 1.
In Eq. (1) we let P (t) = 0.03 and Q(t) = 1.2. The integrating factor for Eq. (1) is
Z Z
µ(t) = exp P (t) dt = exp 0.03 dt = e0.03t .
The solution is
Z
1
x(t) = µ(t)Q(t) dt + C
µ(t)
Z
= Ce−0.03t
+ 1.2e−0.03t
e0.03t dt
1.2 −0.03t 0.03t
= Ce−0.03t + e e
0.03
1.2
= Ce−0.03t +
0.03
−0.03t
= Ce + 40.
x(0) = Ce−0.03(0) + 40 = C + 40 = 1.
2
2. (20 points): Solve the following equation:
x2 y 3 + y dx + xdy = 0.
Solution: (See problem 25, page 79.) This is a Bernoulli type equation with n = 3,
P (x) = 1/x, and Q(x) = −x:
dy 1
+ y = −xy 3 .
dx x
Set v = y 1−n = y 1−3 = y −2 . Then the equation becomes
1 dv
+ P (x)v = Q(x),
1 − n dx
or
1 dv 1
+ v = −x,
−2 dx x
or
dv −2
+ v = 2x. (2)
dx x
Equation (2) is a linear equation, which we solve using an integrating factor:
Z Z Z
µ(x) = exp P (x) dx = exp −2/x dx = exp −2 1/x dx
The solution is
Z
1
v(x) = µ(x)Q(x) dx + C
µ(x)
Z
2 2
= Cx + x 2x/x2 dx
Z
2 2
= Cx + 2x 1/x dx
Thus
y −2 = Cx2 + 2x2 ln |x|.
3
3. (20 points): Solve the following equation:
Solution: (See problem 12, page 71.) This equation is exact. Set M(x, y) =
2xy 3 + 1, N(x, y) = 3x2 y 2 − 1/y. Then
∂M ∂N
= 6xy 2 = .
∂y ∂x
∂F (x, y)
= M(x, y)
∂x
and
∂F (x, y)
= N(x, y).
∂y
Thus
Z Z
2xy 3 + 1 dx + g(y)
F (x, y) = M(x, y) dx + g(y) =
= x2 y 3 + x + g(y).
And,
∂F (x, y) ∂
3x2 y 2 − 1/y = N(x, y) = x2 y 3 + x + g ′(y) = 3x2 y 2 + g ′ (y).
=
∂y ∂y
Thus
g ′ (y) = −1/y,
or
g(y) = − ln |y|.
Hence, the solution is
F (x, y) = x2 y 3 + x − ln |y| = C.
4
4. (20 points): If the following equation is exact, solve it directly. If not, make it
exact using a special integrating factor, then solve it.
y 2 + 2xy dx − x2 dy = 0.
Solution: (See problem 11, page 71.) Note immediately that y ≡ 0 is a solution.
The equation is not exact. Set M(x, y) = y 2 + 2xy and N(x, y) = −x2 . Then
∂M ∂N
= 2y + 2x 6= −2x = .
∂y ∂x
Consider
∂N/∂x − ∂M/∂y −2x − 2y − 2x −2y − 4x (−2)(y + 2x) −2
= 2
= 2 = = .
M y + 2xy y + 2xy (y)(y + 2x) y
Since this is only a function of y, we may construct an integrating factor µ(y) that
makes the equation exact:
Z Z
µ(y) = exp −2/y dy = exp −2 1/y dy
or
(1 + 2x/y) dx − (x/y)2 dy = 0
is exact.
∂ M̃ −2x ∂ Ñ
= 2 = .
∂y y ∂x
Thus the solution is of the form F (x, y) = C, where
∂F (x, y)
= M̃ (x, y)
∂x
and
∂F (x, y)
= Ñ(x, y).
∂y
Thus
Z Z
F (x, y) = M̃ (x, y) dx + g(y) = (1 + 2x/y) dx + g(y)
= x + x2 /y + g(y).
5
And,
∂F (x, y) ∂
−(x/y)2 = Ñ (x, y) = x + x2 /y + g ′ (y) = −(x/y)2 + g ′ (y).
=
∂y ∂y
Thus
g ′(y) = 0
and
g(y) = 0.
Hence, the solution is
F (x, y) = x + x2 /y = C ,
6
5. (20 points): Determine the equation for the displacement y(t) for a mass spring
system where m = 36 kg, b = 12 kg/sec (equivalently, b = 12 N · sec/m) , k =
37 kg/sec2 , and Fext = 0. Suppose the initial displacement is y(0) = 1 m, and the
initial velocity is y ′ (0) = 0 m/sec.
Solution: (See example 3, page 173.) The model for a damped mass-spring oscil-
lator is
my ′′ (t) + by ′ (t) + ky(t) = Fext .
Thus, plugging in the numbers,
7
6. (20 points): Solve the following equation:
p
dy y 2 + x x2 + y 2
= .
dx xy
Solution: (See problem 13, page 79.) This equation is homogeneous. Set v = y/x,
then
p p
dy x2 y 2 + x x2 + y 2 (y/x)2 + (1/x) x2 + y 2
= 2· =
dx x xy y/x
p
(y/x)2 + (1/x2 ) (x2 + y 2 )
=
y/x
p
(y/x)2 + 1 + (y/x)2
=
y/x
2
√
v + 1 + v2
= = G(v).
v
The transformed equation is
dv
v+x = G(v),
dx
or
dv G(v) − v
= ,
dx x
which is separable. Simplifying, we have
√ √
dv v2 + 1 + v2 − v2 1 + v2
= = .
dx xv xv
The solution may be found by integrating:
v dv dx
Z Z
√ = = ln |x| + C
1 + v2 x
Z
v dv 1
Z √
√ = u−1/2 du = u1/2 = 1 + v 2 .
1 + v2 2
Thus, the solution is √
1 + v 2 = ln |x| + C,
or p
1 + (y/x)2 = ln |x| + C.
8
7. (20 points): Solve the following equation:
dy
− x3 (1 − y) = 0, y(0) = 3.
dx
dy
= x3 (1 − y).
dx
The solution may be found by integrating
dy
Z Z
= x3 dx. = x4 /4 + C.
1−y
dy −du
Z Z
= = − ln |u| = − ln |1 − y|.
1−y u
Thus
− ln |1 − y| = x4 /4 + C,
or
ln |1 − y| = −x4 /4 + C1 .
Hence
exp {ln |1 − y|} = exp −x4 /4 + C1 ,
or, equivalently,
4 /4
|1 − y| = C2 e−x .
The sign from the absolute values may be absorbed in the constant, so that
4 /4
1 − y = C3 e−x ;
thus
4 /4
y(x) = 1 − C3 e−x .
Using the initial condition y(0) = 3, we have
4 /4
3 = y(0) = 1 − C3 e−(0) = 1 − C3 ,