You are on page 1of 11

Math 228 Assignment 1 (Solutions)

1.

Solve the differential equation


dy dx

+ 2xy = 0

by separation of variables.
Solution dy y

= 2xd x

dy y

= 2

xd x

ln |y| = x2 + C1 = CeN ,

y = e+ eN

where C = e+ , gives the general solution.


2.

Solve the differential equation


dy dx

+1
x

by separation of variables.
Solution dy y

+1

1
x

dx

dy

+1 x y + 1 = e+ x

dx

ln |y + 1| = ln |x| + C1
y

= Cx 1 ,

where C = e+ , gives the general solution.


3.

Solve the IVP


Solution

(1 + x4 )d y + x(1 + 4y2 )d x = 0,

(1) = 0.

dy

1 + 4y2

xd x

1 + x4

dy

1 + 4y 2

xd x

1 + x4

(1)

where the integrations can be done as (ref. to the table of integrals if necessary)

dy

1 + 4y2 and (by a substitution v = x2 )

xd x

1 1 tan (2y) 2

(2)

1 + x4

dx

1 2

dv

1 + v2

1 1 1 tan v + C = tan1 (x2 ) + C. 2 2

(3)

Substituting (2) and (3) back into (1) gives tan1 (2y) + tan1 (x2 ) = 2C. 1

By the initial condition or

tan1 (0) + tan1 (1) = 2C


C

= .

The solution to the IVP is given by

p 8

tan1 (2y) + tan1 (x2 ) =


4.

p . 4

Solve the IVP

dy dt

+ t y = y,

(1) = 3.

Solution

The DE is separable and can be written as


dy y

= (1 t )dt .

Then

dy y

(1 t )dt
t

ln |y| = t

|y| = e+ eJ
y

+ C1
J

= e+ eJ = CeJ ,
J

where C = e+ . By the initial condition 3 = Ce1



C

= 3e .
J

The solution to the IVP is


y

= 3eJ

5.

Determine whether the equation


(x3 + y3 )d x + 3xy2 d y = 0

is exact. Solve it if it is exact.

Solution

Let M (x, y) = x3 + y3 and N (x, y) = 3xy2 . Then

N (x, y) M (x, y) = 3y 2 = y x
and the DE is exact. We want to construct F (x, y) such that

F = M (x, y) = x3 + y3 , x F = N (x, y) = 3xy2 . y


Integrating (4) w.r.t. x gives

F x y

(4) (5)

M x y dx

( , )=

( , )

+ g(y) =

(x3 + y3 )d x + g(y) =

+ xy3 + g(y).

(6)

Differentiating (6) w.r.t. y gives

F = 3xy2 + g (y). y
Equating (7) with (5) gives 3xy2 + g (y) = 3xy2 g(y) = 0. (You can also choose g(y) = C1 , but this C1 will be absorbed by a new constant.) Substituting this back into (6) gives
F x y

(7)

( , )=

+ xy3 .

Therefore the solution is given by


x

+ xy3 = C ,

or in its explicit form (the implicit form is ne!)


(
y

C x

3 )!


6.

Determine whether the equation


(3x2 y + eO )d x + (x3 + xeO 2y)d y = 0

is exact. Solve it if it is exact. 3

Solution

Let M (x, y) = 3x2 y + eO and N (x, y) = x3 + xeO 2y. Then

N (x, y) M (x, y) = 3x2 + eO = y x


and the DE is exact. We want to construct F (x, y) such that

F = M (x, y) = 3x2 y + eO , x F = N (x, y) = x3 + xeO 2y. y


Integrating (8) w.r.t. x gives

F x y

(8) (9)

( , )=

M x y dx

( , )

+ g(y) =

(3x2 y + eO )d x + g(y) = x3 y + xeO + g(y).

(10)

Differentiating (10) w.r.t. y gives

F = x3 + xeO + g (y). y
Equating (11) with (9) gives
x

(11)

+ xeO + g (y) = x3 + xeO 2y g (y) = 2y


g y

( ) = y2 .

Substituting this back into (10) gives


F x y

( , ) = x3 y + xeO y2 .

Therefore the solution is given by


x y

+ xeO y2 = C .

7.

Solve the IVP

3y 2 x 2
5 y

dy dx

2y4

= 0,

(1) = 1.

Solution.

Write the DE in the form


(

3y2 x2
5 y

)
dy

2y4

dx

=0

and let M (x, t ) = 3O ON and N (x, y) = 2N" . It is easy to check that the DE is exact. By the # O standard approach, construct

F x y

M x y dy

( , )=

( , )

+ h(x) =

3y 2 x 2
y

dy

+ h(x) =

2 3 x + 4 + h(x). 2y 2 4y

Differentiating this w.r.t. x and equating it with N (x, y), we have


x

2y

+ h (x) = 4

2y4 h(x) = 0.

Therefore F (x, y) = 23 + 4NO" and the general solution is given by O

2 3 x + 4 =C 2y2 4y

By the initial condition The solution is given by

3 2

1 = C, 4

= .

5 4

8.

2 x 5 3 + 4 = . 2 2y 4y 4

Solve the differential equation


y2 d x + (x2 + xy)d y = 0

by verifying that the function m (x, y) = N1O is an integrating factor.


Solution.

Multiplying m to both side the DE gives

y x

dx

1
x

1
y

)
dy

= 0.

Let M (x, y) = NO and N (x, y) = 1 + 1 . Then N O

M (x, y)
dy

2 x

N (x, y)
dx

and therefore the DE is exact. Construct

F x y

( , )=

M x y dx

( , )

+ g(y) =

y x

+ g(y).

Differentiating this w.r.t. y gives

F 1 = + g (y). y x Equating this with N (x, y) = 1 + 1 gives N O 1 1 1


+ g (y) =
g y

( ) = ln |y| .

O Therefore F (x, y) = N + ln |y| and the solution is given by


y x

+ ln |y| = C .

9.

Find the general solution of the differential equation


dy dx

+ 2xy = x3

and state the largest interval on which the general solution is dened, i.e. the solution as a function of x is well-dened.
Solution.

This is a linear rst-order DE (with p(x) = 2x in its standard form). The integrating factor is given by m (x) = e F(N)@N = eN
dy e dx

Multiplying the DE by m (x) gives


N + 2xyeN = x3 eN N

or which gives

(
ye

= x 3 eN ,
3

ye

N =

x e

dx

where (by the integration by parts)

N e

1 2 N dx = x e 2

xe

dx

1 2 N 1 N x e e + C. 2 2 1 2

Therefore

1 2 N 1 N y = x e e +C 2 2

)
e

= (x2 1) + CeN .

This solution is dened for x (, ).


10.

Find the general solution of the differential equation


dy dx

+ y cot x = 2cos x

and state an interval on which the general solution is dened.


Solution. This is a linear rst-order DE (with p(x) = cot x in its standard form). The integrating factor is given by (ref. to the table of integrals if necessary)

m (x) = e F(N)@N = eln|sin N| = sin x.

Multiplying this to the DE gives


dy dx

sin x + y cos x = 2sin x cos x


(y sin x) = 2sin x cos x,

or

which gives
y

sin x =

2sin x cos xd x = sin2 x + C.


= sin x +
C

The solution is given by


y

sin x

The solution is dened for each (kp , (k + 1)p ), k Z.


11.

Solve the IVP


xd y Solution.

+ (xy + 2y 2eN )d x = 0, ( )

(1) = 0.

This is a linear rst-order DE which can be written in its standard form as


dy dx

+ 1+

2
x

2
x

Then p(x) = 1 + 2 and the integrating integral is given by N

m (x) = e
Multiplying this to the DE gives
dy dx

(1+ N )@N

= eN+2 ln|N| = x2 eN .

x e

N + y (x2 + 2x) eN = 2x

or

yx

N) = e

2xd x = x2 + C.
C x

The general solution is given by


y

= (1 +

)eN .

By the initial condition 0 = (1 + C)e1 C = 1. The solution to the IVP is


y

= (1

1
x

)eN .

12.

Find a continuous solution satisfying the differential equation


dy dx

{ + y = f (x) :=

1, 0 x 3, 0, x > 3,

(0) = 0.

Solution.

We can rst solve the IVP on [0, 3). The DE is separable and can be written as
dy

1y

= d x.

By integration, we can nd the general solution as


y

= 1 CeN .

By the initial condition 0 = 1 C C = 1. The solution to the IVP (valid on [0, 3)) is given by
y

= 1 eN .

Since we are looking for a continuous solution, we must have


y

(3) = lim (1 eN ) = 1 e3 , N3

which, together with the DE for x > 3, denes another IVP on [3, ). The DE now becomes
dy dx

= y,

which is still a separable one and can be solved by integration. The general solution is given by
y

= CeN .

Applying the initial condition gives 1 e3 = Ce3 3 C = e 1. Therefore the solution to the IVP on [3, ) is given by
y

= (e3 1)eN .

Combining this with the previous solution, we nd the continuous solution for the original IVP as { 1 eN , 0 x 3, y = 3 1)eN , x > 3. (e
13.

Solve the homogeneous equation


(y2 + yx)d x + x2 d y = 0

by using an appropriate substitution. 8

Solution.

The DE can be written as


dy dx

( y )2
x

.
x

(12)

O Let v = N or y = xv, then y = v + xv , i.e.


dy dx

= v+x

dv dx

(13)

Equating (12) and (13) gives


v

+x

dv dx

= v2 v =
dx x

or
v

dv

which is in its separated form. By integration, we have


(
dv

2 + 2v

1 1 1 d v = ln |x| + C1 2 v v+2 1 (ln |v| ln |v + 2|) = ln |x| + C1 2 ln |v| ln |v + 2| = 2ln |x| + 2C1 v 1 = 2 e2+ v+2 x
v v

2 v + 2v

dx x

+2

C x

O where C = e2+ . Substituting v = N back into the previous equation, we obtain


y y

+ 2x

C x

and
y

=
x

2 C

2Cx

14.

Solve the homogeneous equation


dy x dx

y =

2 + y2

by using an appropriate substitution.


Solution.

The DE can be written as


dy dx

=
y x

1+

( y )2
x

(14)

O Let v = N or y = xv, then y = v + xv , i.e.


dy dx

= v+x

dv dx

(15)

Equating (14) and (15) gives


v

+x

dv dx

= v+

1 + v2
,

or

x 1 + v2 which is in its separated form. By integration, we have

dv

dx

= x 1 + v2 ln v + 1 + v2 = ln |x| + C1 v+ 1 + v2 = e+ x v+ 1 + v2 = Cx. (C = e+ )


O Substituting u = N gives
y x

dv

dx

+ +

1+

( y )2
x

= Cx

or as the general solution.


15.

2 + y2

= Cx2

Solve the IVP


y

 dy
dx

+ y = 1,

(0) = 4.
.

Hint: Daniel Bernoulli (February 8, 1700 - March 17, 1782) was a Dutch-born mathematician who spent much of his life in Basel, Switzerland where he died
Solution.

This is a differential equation of Bernoulli type, which can be rewritten as


dy dx

+ p(x)y = f (x)yH ,
 !

with p(x) = f (x) = 1 and r = 1 . Let u = y1H = y1+ = y or y = u ! . We then substitute 2


dy dx

dy du du dx

 2 ! du u 3 dx

 Wikipedia,

The Free Encyclopedia.

http://en.wikipedia.org/wiki/Daniel_Bernoulli.

10

into the given equation and have

which can be simplied to

( )  2  du u ! + u! = u! , 3 dx
du

 2  du u ! + y = y 3 dx

3 3 u = . dx 2 2 This linear rst-order DE (also separable) can be solved easily and the solution is
+
u

! = 1 Ce N . ! = 1 Ce N .

Substituting u = y gives
y

By the initial condition 4 = 1 C C = 7. The solution to the IVP is


y

= 1 + 7e
dy dx

!N

16.

Solve the differential equation


= sin(x + y).

Solution.

gives

Applying the substitution u = x + y, then u = 1 + y , which together with the DE,


du dx

= 1+

dy dx

= 1 + sin(x + y) = 1 + sin u.

This is a separable DE and can be solved by integration as


du

1 + sin u where the integration in the LHS can be computed as du sin ud u du 1 sin u du = = 2 1 + sin u 1 + sin u 1 sin u 1 sin u 1 sin2 u du sin ud u d [cos u] = = sec2 ud u + 2u 2u cos cos cos2 u = tan u sec u, which gives tan u sec u = x + C. Substituting u = x + y back into the previous equation gives tan(x + y) sec(x + y) = x + C as the general solution. 11

dx

= x + C,

You might also like