solutions of math 53 midterm exam i - stanford...

9
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 t+y(t)=+. If y(0) 6 -1, then lim t+y(t)= -∞. 1

Upload: leliem

Post on 23-Jun-2018

232 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Solutions of Math 53 Midterm Exam IProblem 1:(1) [8 points] Draw a direction field for the given differential equation

y′ = t+ y.

(2) [8 points] Based on the direction field, determine the behavior ofy as t → +∞. If this behavior depends on the initial value of y att = 0, describe this dependency.

Solution: (a)

(b) If y(0) > −1, then

limt→+∞

y(t) = +∞.

If y(0) 6 −1, then

limt→+∞

y(t) = −∞.

1

Page 2: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Problem 2: [16 points] Solve the initial value problem

y′ +y

t= e−t

2

, y(1) = 0.

Solution:p(t) =

1

t, g(t) = e−t

2

.

The integrating factor mu(t) is

µ(t) = exp

(∫1

tdt

)= exp(ln |t|) = |t|.

We can take µ to be t (since we only need one). Then the general solutionis

y(t) =1

t

(∫td−t

2

dt+ c

)=

1

t

(−e−t2

2+ c

).

(12′)

To find c, plug in t = 1, y = 0:

0 = −e−1

2+ c; c =

e−1

2.

(If you find c based on a wrong general solution, you will NOT gain 2′

here.)Hence the solution for the initial value problem is

y(t) =1

t

(−e−t2

2+e−1

2

).

2

Page 3: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Problem 3:(1) [10 points] Solve the initial value problem

y′ = 2x(1 + y2), y(0) = −1.

(2) [6 points] Determine where the solutions attains its local maximumor local minimum values.

Solution: (a) This is a separable equation. Since 1 + y2 > 0, we candivide through to get

dy

1 + y2= 2x dx,

soarctan y = x2 + C

upon integrating, where C is an arbitrary constant that can be fixed byusing the initial condition:

C = arctan(−1) = −π4+ nπ, n ∈ Z.

Any C chosen in this way will work; in fact, the resulting functions areall equivalent (since the tangent function is periodic). Choosing n = 0for simplicity, we hence find that

y = tan(x2 − π

4

).

This solution is defined on

−π2< x2 − π

4<π

2

or x2 < 3π/4, i.e., |x| <√3π/2.

(b) Potential local extrema are located at points where the derivativeis zero or does not exist. Thus, we study the critical points of y′ =2x(1 + y2). But y is differentiable and hence continuous everywhere inits domain. Therefore, y′ is continuous on |x| <

√3π/2, so we only need

to find where y′ = 0, which clearly can only occur at x = 0. Checkingthe sign of y′ 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):

y′ =d

dxtan(x2 − π

4

)= 2x sec2

(x2 − π

4

).

The secant-squared term is always positive, so y′ = 0 only at x = 0.

3

Page 4: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Problem 4:

(1) [6 points] Show that the differential equation

(x2 + 3xy + y2)dx = x2dy

is homogeneous.

(2) [10 points] Solve the differential equation.

Solution: (a) Note that we do not mean to say that the equation ishomogeneous, in the sense of being linear with no constant term; wemean the other sense of homogeneous.

We consider the transformation of scaling which takes x to λx and yto λy, for a real constant λ 6= 0 ∈ R.

The equation, after scaling, looks like

((λx)2 + 3(λx)(λy) + (λy)2)dx = (λx)2dy,

λ2(x2 + 3xy + y2)dx = λ2x2dy

which is the same as the original equation. Thus by definition, we saythat the differential equation is homogeneous.

Alternatively, if we divide both sides of the equation by x2dx, we findthat

dy

dx=x2 + 3xy + y2

x2= 1 + 3(

y

x) + (

y

x)2,

which has the form f(y/x). This also implies that the ODE is of homo-geneous type.

(b) Note that at x = 0, the ODE gives the following equation for theslope:

(y2)dx = 0 · dy,or dx/dy = 0, which implies the slope is vertical at x = 0. Away fromx = 0 we analyze the ODE as follows:

To solve the ODE, we introduce the new variable v = y/x, or equiv-alently y = xv.

Taking the total derivatived

dxof the above equations, we find that

y′ = xv′ + v.Using these equations to rewrite the ODE in terms of v, we have

(x2 + 3x(vx) + (vx)2) = x2(xv′ + v),

4

Page 5: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

so, at x 6= 0 we have that the ODE says

1 + 3v + v2 = xv′ + v,

or

1 + 2v + v2 = xv′

(1 + v)2 = xv′.

This is separable; as long as v 6= −1, we can divide by x(1 + v)2 toget

1

(1 + v)2v′ =

1

xdx.

Now, integrating both sides,∫1

(1 + v)2dv =

∫dx

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,

ory =

−xlog |x|+ C

− x.

Also, recall that we assumed that v 6= −1; if it is the case that v = −1,then the ODE tells us that

(1 + v)2 = xv′ = 0.

Thus, v′ = 0, which means that if we ever have v = −1 then v = −1 forall x.

And indeed, we can verify that the solution v(x) = −1, or y(x) =xv = −x is a solution to the ODE:

(x2 + 3x(−x) + (−x)2) = (−x2) = x2dy

dx.

5

Page 6: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Thus, the general solution to the ODE is y(x) =−x

log |x|+ C− x or y = −x.

6

Page 7: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

Problem 5: Answer the following questions with out solving the differ-ential equation

y′ = y2(y2 − 1).

(1) [4 points] Sketch the graph of f(y) = y2(y2 − 1).

(2) [6 points] Determine the critical (equilibrium) points, and classifyeach one as stable, unstable or semistable. (A critical point is semistableif 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)

(1,0)•• •(-1,0)(0,0) y

f(y)

f(y)=y (y −1)22

(b) Solving y2(y2−1) = 0,we have y = −1, 0 or 1. If y ∈ (−∞,−1),then y′(t) = f(y) > 0, hence y(t) is increasing in t. If y ∈ (−1, 0), theny′(t) = f(y) < 0, hence y(t) is decreasing in t. If y ∈ (0, 1), theny′(t) = f(y) < 0, hence y(t) is decreasing in t. If y ∈ (1,∞), theny′(t) = f(y) > 0, hence y(t) is increasing in t. Therefore, y = −1 is astable critical point, y = 0 is a semi-stable critical point and y = 1 is anunstable critical point.

(c)

7

Page 8: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

• t

y

y=0

y=1

y=-1

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+ x2ex cos(y)dy = 0

so M(x, y) = x(x + 2)ex sin(y) and N(x, y) = x2ex cos(y). To showthat the equation is exact, we need to check My = Nx.

My = x(x+ 2)ex cos(y)

Nx = 2xex cos(y) + x2ex 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) = x2ex cos(y)

H(x, y) =

∫x2ex cos(y)dy + h(x)

H(x, y) =x2ex sin(y) + h(x)

8

Page 9: Solutions of Math 53 Midterm Exam I - Stanford Universityweb.stanford.edu/.../math/math53/math53.1152/exam1-sol.pdfSolutions of Math 53 Midterm Exam I Problem 1: (1) [8 points] Draw

To find h(x), we use the equation Hx =M(x, y).

Hx =2xex sin(y) + x2ex sin(y) + h′(x)

=x(x+ 2)ex sin(y) + h′(x)

M(x, y) =x(x+ 2)ex sin(y)

h′(x) =0

h(x) =c

where c is some constant. Thus, the solution is given by H(x, y) = Cfor some constant C.

x2ex sin(y) = C

.

9