Exam 1 practice test Solution, Math 254

Exam 1 practice test Solution, Math 254
1. Solve the initial value problem
dr
− tan θ(r + 1) = θ,
dθ
r
Solution: Rearrange to see that this is linear
�π�
4
= π/8 +
√
2
dr
− r tan θ = θ + tan θ
dθ
�
Find the integrating factor µ = e − tan θ dθ = eln | cos θ| = cos θ. (Note: since we only need a single function µ, we can leave out
the integration constant and the ± that comes from the absolute value.) Using this multiplying factor, we have
�
�
r cos θ = cos θ(θ + tan θ), dθ + C = θ cos θ + sin θ dθ + C = θ sin θ + C.
Solve for r to get
Plug in θ = π/4, r = π/8 +
√
r = θ tan θ + C sec θ.
2 we get
√
π
C
π
π √
tan(π/4) +
= +C 2= + 2
4
cos(π/4)
4
8
Oops, I meant that to come out nicer, anyway that gives
π
C =1− √ .
8 2
Finally we have
�
�
π
r = θ tan θ + 1 − √
sec θ.
8 2
2. Find the general solution (implicit is ok) to
(y(ln(xy) + 1)) y � + (x(ln(xy) + 1)) = 0
Solution: I messed up on my initial listing of this problem (that which is written above), it is meant to be exact, but I transcribed
it wrong. This is what I meant to put
(y(ln(xy) + 1)) + (x(ln(xy) + 1)) y � = 0
With that reversal, we have can ”multiply through by dx to get
(y(ln(xy) + 1)) dx + ((x ln(xy) + 1)) dy = 0
∂(y ln(xy) + y)
∂M
x
=
= ln(xy) + y
+ 1 = ln xy + 2
∂y
∂y
xy
Similarly, we get
∂(x(ln(xy) + 1))
∂N
y
=
= ln(xy) + x
+ 1 = ln xy + 2
∂x
∂x
xy
Thus the equation is exact. To solve, first integrate M with respect to x holding y constant to get
�
F (x, y) = y ln(xy) + y dx = xy ln(xy) + g(y).
(Recall that
�
ln x dx = x ln x − x + C, and use u = xy, du = ydx).
Taking the partial with respect to y and setting it equal to N we get
x ln(xy) + x + g � (y) = x ln(xy) + x
so we see that g � (y) = 0 and g(y) is constant. Thus the general solution is
xy ln(xy) = k
3. Solve the initial value problem
dx
(x2 + 1)
=
,
x(1) = 1
dt
1 − e−t
Note: I changed the initial condition from that which was originally posted to make things simpler.
Solution: This is separable .We get
to get
Plug in x = 1, t = 1 to solve for C
We have C = π/4 − ln(e − 1) and so
�
dx
=
x2 + 1
�
dt
+C =
1 − e−t
�
et dt
+C
et − 1
arctan x = ln |et − 1| + C
arctan(1) = π/4 = ln(e1 − 1) + C
�
�
x = tan ln |et − 1| + π/4 − ln(e − 1)
4. Use the substitution v = y/x to solve the differential equation
y� =
x+y
x−y
• First calculate y � in terms of x, v and v � .
• Substitute into the differential equation and replace all expressions involving y with expressions in v and x.
• Solve the resulting differential equation for v (implicit form is ok).
• Rewrite your solution to give an implicit solution for y.
Solution: y = vx do y � = v + xv � , substituting we get
v + xv � =
This yields
v� =
This is separable. We can solve using
To get
�
1
x
�
x + xv
1+v
=
x − xv
1−v
�
=
�
dx
+C
x
1+v
−v
1−v
1−v
dv =
1 + v2
1 1 + v2
x 1−v
1
ln(1 + v 2 ) = ln |x| + C.
2
To finish, we replace v with y/x to get an implicit form for the solution
arctan(v) −
arctan(y/x) −
1
ln(1 + (y/x)2 ) = ln |x| + C
2
2
5. A tank that can hold 1000L of water starts with 500L of salt water with concentration 0.1kg/L. We pump brine with a
concentration of 1kg/L (of salt) into the tank at a rate of 50L/hour. Assume that the liquid is always well mixed.
(a) What will the concentration of salt be in the tank when the tank first overflows?
Solution: If A(t) is the amount of salt in the tank, we can write a differential equation
dA
= (50L/hour)(1kg/L) − 0 = 50kg/hour
dt
(There is no outflow until we get overflow at t =10 hours.) So that A(t) = A(0) + (50kg/hour)t = (500L)(.1kg/L) +
(50kg/hour)t = 50kg+(50kg/hour)t. In particular, at the end of 10 hours, when the tank starts to overflow, A(10hours) =
550kg and the volume at that time is 1000L, so the concentration is 0.550kg/L .
(b) What will the concentration of salt in the tank be 15 hours after it overflows?
Solution: Once the tank overflows, there is outflow at the rate 50L/hour. Thus for t > 10hours, the equation is
dA
= (50L/hour)(1kg/L) − (50L/hour)(A/1000L).
dt
This leads to the linear differential equation
dA
1
+
A = 50.
dt
20
The integrating factor is µ = et/20 , and we get
et/20 A =
Solving for A gives
�
50et/20 dt + C = 1000et/20 + C.
A = 1000 + Ce−t/20 .
From part a, we know that A(10hours) = 550. This lets us solve for C
550kg = 1000kg + Ce−1/2
to get C = −450e1/2 ≈ −741.925kg. After an additional 15 hours, when t = 25hours we have A(25hours) = 1000 −
(450e1/2 )e−25/20 = 1000 − 450e−3/4 ≈ 787 Since the volume is 1000L, the concentration is 1 − (450/1000)e−3/4
= 1 − (9/20)e−3/4 ≈ 0.787kg/L .
3