Solutions of Math 53 Midterm Exam I

Solutions of Math 53 Midterm Exam I
Problem 1:
(1) [8 points] Draw a direction field for the given differential equation
y 0 = t + y.
(2) [8 points] Based on the direction field, determine the behavior of
y as t → +∞. If this behavior depends on the initial value of y at
t = 0, describe this dependency.
Solution: (a)
(b) If y(0) > −1, then
lim y(t) = +∞.
t→+∞
If y(0) 6 −1, then
lim y(t) = −∞.
t→+∞
1
Problem 2: [16 points] Solve the initial value problem
y0 +
y
2
= e−t ,
t
y(1) = 0.
Solution:
1
2
p(t) = , g(t) = e−t .
t
The integrating factor mu(t) is
Z
1
µ(t) = exp
dt = exp(ln |t|) = |t|.
t
We can take µ to be t (since we only need one). Then the general solution
is
Z
1
−t2
y(t) =
td dt + c
t
!
(120 )
−t2
e
1
−
+c .
=
t
2
To find c, plug in t = 1, y = 0:
0=−
e−1
+ c;
2
c=
e−1
.
2
(If you find c based on a wrong general solution, you will NOT gain 20
here.)
Hence the solution for the initial value problem is
!
2
1
e−t
e−1
y(t) =
−
+
.
t
2
2
2
Problem 3:
(1) [10 points] Solve the initial value problem
y 0 = 2x(1 + y 2 ),
y(0) = −1.
(2) [6 points] Determine where the solutions attains its local maximum
or local minimum values.
Solution: (a) This is a separable equation. Since 1 + y 2 > 0, we can
divide through to get
dy
= 2x dx,
1 + y2
so
arctan y = x2 + C
upon integrating, where C is an arbitrary constant that can be fixed by
using the initial condition:
π
C = arctan(−1) = − + nπ, n ∈ Z.
4
Any C chosen in this way will work; in fact, the resulting functions are
all equivalent (since the tangent function is periodic). Choosing n = 0
for simplicity, we hence find that
π
2
y = tan x −
.
4
This solution is defined on
π
π
π
− < x2 − <
2
4
2
√
2
or x < 3π/4, i.e., |x| < 3π/2.
(b) Potential local extrema are located at points where the derivative
is zero or does not exist. Thus, we study the critical points of y 0 =
2x(1 + y 2 ). But y is differentiable and hence continuous
everywhere in
√
its domain. Therefore, y 0 is continuous on |x| < 3π/2, so we only need
to find where y 0 = 0, which clearly can only occur at x = 0. Checking
the sign of y 0 on either side indicates
√ that (0, −1) is a local minimum.
There are no local maxima (x = ± 3π/2 are asymptotes).
Alternatively, just differentiate the solution from (a):
d
π
π
y0 =
tan x2 −
= 2x sec2 x2 −
.
dx
4
4
The secant-squared term is always positive, so y 0 = 0 only at x = 0.
3
Problem 4:
(1) [6 points] Show that the differential equation
(x2 + 3xy + y 2 )dx = x2 dy
is homogeneous.
(2) [10 points] Solve the differential equation.
Solution: (a) Note that we do not mean to say that the equation is
homogeneous, in the sense of being linear with no constant term; we
mean the other sense of homogeneous.
We consider the transformation of scaling which takes x to λx and y
to λy, for a real constant λ 6= 0 ∈ R.
The equation, after scaling, looks like
((λx)2 + 3(λx)(λy) + (λy)2 )dx = (λx)2 dy,
λ2 (x2 + 3xy + y 2 )dx = λ2 x2 dy
which is the same as the original equation. Thus by definition, we say
that the differential equation is homogeneous.
Alternatively, if we divide both sides of the equation by x2 dx, we find
that
dy
x2 + 3xy + y 2
y
y 2
=
=
1
+
3(
)
+
(
),
dx
x2
x
x
which has the form f (y/x). This also implies that the ODE is of homogeneous type.
(b) Note that at x = 0, the ODE gives the following equation for the
slope:
(y 2 )dx = 0 · dy,
or dx/dy = 0, which implies the slope is vertical at x = 0. Away from
x = 0 we analyze the ODE as follows:
To solve the ODE, we introduce the new variable v = y/x, or equivalently y = xv.
d
Taking the total derivative
of the above equations, we find that
dx
0
0
y = xv + v.
Using these equations to rewrite the ODE in terms of v, we have
(x2 + 3x(vx) + (vx)2 ) = x2 (xv 0 + v),
4
so, at x 6= 0 we have that the ODE says
1 + 3v + v 2 = xv 0 + v,
or
1 + 2v + v 2 = xv 0
(1 + v)2 = xv 0 .
This is separable; as long as v 6= −1, we can divide by x(1 + v)2 to
get
1
1
v 0 = dx.
2
(1 + v)
x
Now, integrating both sides,
Z
Z
1
dx
dv =
,
2
(1 + v)
x
so noting that the u-substitution u = 1 + v gives the integration
−(1 + v)−1 = log |x| + C.
Inverting both sides,
1+v =
−1
.
log |x| + C
Now substituting back v = y/x we have
1 + y/x =
−1
,
log |x| + C
or
−x
− x.
log |x| + C
Also, recall that we assumed that v 6= −1; if it is the case that v = −1,
then the ODE tells us that
y=
(1 + v)2 = xv 0 = 0.
Thus, v 0 = 0, which means that if we ever have v = −1 then v = −1 for
all x.
And indeed, we can verify that the solution v(x) = −1, or y(x) =
xv = −x is a solution to the ODE:
dy
(x2 + 3x(−x) + (−x)2 ) = (−x2 ) = x2 .
dx
5
Thus, the general solution to the ODE is y(x) =
6
−x
− x or y = −x.
log |x| + C
Problem 5: Answer the following questions with out solving the differential equation
y 0 = y 2 (y 2 − 1).
(1) [4 points] Sketch the graph of f (y) = y 2 (y 2 − 1).
(2) [6 points] Determine the critical (equilibrium) points, and classify
each one as stable, unstable or semistable. (A critical point is semistable
if it is stable on one side and is unstable on the other side.)
(3) [8 points] Sketch several graphs of solutions in the ty-plane.
Solution: (a)
f(y)
f(y)=y2(y2−1)
•
(-1,0)
(0,0)
•
•(1,0)
y
(b) Solving y 2 (y 2 −1) = 0, we have y = −1, 0 or 1. If y ∈ (−∞, −1),
then y 0 (t) = f (y) > 0, hence y(t) is increasing in t. If y ∈ (−1, 0), then
y 0 (t) = f (y) < 0, hence y(t) is decreasing in t. If y ∈ (0, 1), then
y 0 (t) = f (y) < 0, hence y(t) is decreasing in t. If y ∈ (1, ∞), then
y 0 (t) = f (y) > 0, hence y(t) is increasing in t. Therefore, y = −1 is a
stable critical point, y = 0 is a semi-stable critical point and y = 1 is an
unstable critical point.
(c)
7
y
y=1
•
y=0
•
y=-1
•
t
Problem 6: Consider the differential equation
(x + 2) sin y dx + x cos y dy = 0.
(1) [8 points] Show that µ(x, y) = xex is an integrating factor.
(2) [10 points] Solve the differential equation.
Solution: (a) Let’s multiply the equation by the integrating factor xex .
x(x + 2)ex sin(y)dx + x2 ex cos(y)dy = 0
so M (x, y) = x(x + 2)ex sin(y) and N (x, y) = x2 ex cos(y). To show
that the equation is exact, we need to check My = Nx .
My = x(x + 2)ex cos(y)
Nx = 2xex cos(y) + x2 ex cos(y) = x(x + 2)ex cos(y)
Hence My = Nx .
(b) To solve the equation, we find a potential function H(x, y) such
that Hx = M (x, y) and Hy = N (x, y).
Hy =N (x, y) = x2 ex cos(y)
Z
H(x, y) = x2 ex cos(y)dy + h(x)
H(x, y) =x2 ex sin(y) + h(x)
8
To find h(x), we use the equation Hx = M (x, y).
Hx =2xex sin(y) + x2 ex sin(y) + h0 (x)
=x(x + 2)ex sin(y) + h0 (x)
M (x, y) =x(x + 2)ex sin(y)
h0 (x) =0
h(x) =c
where c is some constant. Thus, the solution is given by H(x, y) = C
for some constant C.
x2 ex sin(y) = C
.
9