You are on page 1of 62

CHAPTER 2

ORDINARY DIFFERENTIAL EQUATIONS


OF FIRST ORDER
At the end of this chapter you should be able to
/'

=:=J identify the types of ordinary differential equations of first order.


~J

determine the techniques in solving the differential equations by the method of


(a) separable variables
(b) homogeneous
(c) linear
(d) exact

=:=J reduce certain differential equations to the equations of the types mentioned above,
using given substitutions and solve the resulting equations.

=:=J model physical problems in the form of ordinary differential equations of first order

,~~~.
:2.0
~-=-7

INTRODUCTION
general form of the ordinary differential equations of first order is given by

dy

dx

f(x, y),

-'-.::.-:-::-e f(x, y) is a function of x and y. If f(x, y) = -M(x, y)/N(x, y), then this equation can
'.0 written as
M(x, y) dx + N(x, y) dy = O.
~~

-xamples, consider the equations

~.::.~

dy
dy
.
- - 2y = SlllX and 2x dx
dx
equations can be written as respectively
dy
dx

2y + sinx

and

dy
dx

+ (1 - x)y = x 2 .

SEPARABLE EQUATIONS

30

They can also be expressed respectively, as

(2y + sinx)dx - dy = 0

and

[x2

(1- x)yJ dx - 2xdy

= O.

In this chapter we are going to discuss ordinary differential equations of first order of types
separable variables, homogeneous, linear and exact. Each type of these differential equations
will be discussed later in details which includes the techniques of how to identify and solve the
given differential equations. We shall go further by considering differential equations which can
be reduced to the types discussed above, using given substitutions.
In this chapter the word "differential" in differential equation will be dropped. For example
separable differential equations will be called as separable equations.

2.1

SEPARABLE EQUATIONS

In this section we shall treat separable equations in details. We begin our discussion by showing
how to identify a given equation as a separable equation.

2.1.1

Method of identification

As we know that the general form of the first order differential equation is given by

dy

dx = f(x, V)

(2.1)

In some cases, the function f(x, y) can be written as

f(x, y) = u(x) v(y),


the product of u(x), a function of x alone by v(y), a function of y alone.
Equation (2.2) into Equation (2.1) we have

(2.2)
By substituting

dy
dx = u(x) v(y).
Separate the variables by putting all the terms in y and dy on one side and all the terms x and
dx on the other, we obtain the following definition.

Definition 2.1 (Separable Equation)


The differential equation

dy
dx = f(x, y)
is called a separable equation if it can be written in the form of

dy
v(y) = u(x) dx.

<)

Examples of how to identify equations as separable equations are considered below.

(2.3)

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


Example 2.1

31

Determine whether or not the following equations are separable.


dy

(a) dx - xy

= x.

.
dy
.
0
(c) smy
cosx dx - cosy smx = .

(b)

dx - xe

dy _

y-x

(d)

dy
x dx

= x - 2y.

Solution
(a) The given equation can be written as
dy

dx

+ xy.

Separating the variables, we obtain

dy
1+Y

= xdx.

Therefore, the equation is separable.


(b) The given equation can be written as

Separating the variables we have

= xe- x dx.

e- Y dy
Therefore, the equation is separable.
(c)

The given equation can be written as


.
dy
smy cos x dx

= cosy smx.

Separating the variables we get

siny dy
cosy

sinx dx.
cos x

Hence, the equation is separable.


(d)

2.1.2

In this case the variables x and y can not be separated. Therefore, the equation is not
separable.

Solution of Separable Equations

The solutions of differential equations of this type can be obtained by integrating both sides of
Equation (2.3). The result of this integration is

Jv~~)

+A 1

u(x)dx+A 2 ,

SEPARABLE EQUATIONS

32

where Al and A 2 are arbitrary constants. Rearranging this expression we have

Jv~~) J
=

Since Al and A 2 are constants, so is A 2

u(x)dx+A 2 -AI'

AI. Hence, by replacing A 2

Al with A, we have

Jv~~) J
=

u(x)dx+A.

If an initial value of y for a given x is given, we can then determine the value of A.

From this discussion, the process of solving separable equations can be summarized as follows.

1. Write down the given equation in the form


dy
v(y) = u(x) dx.

2. Integrate both sides of the equation with respect to the related variables and then put
only a constant of integration, say A.

3. If there is an initial condition, then use it to obtain the value for A.

We illustrate the process with the following examples.

Example 2.2 I

Find the general solution of the following equations.

dy

(a)

(x

+ 2) dx =

(c)

eX

dy
_+ x y 2 = O.
dx

y.

(b)

dy
coty dx = cotx.

(d)

dy
2
dx = sec y.

Solution
(a)

By separating the variables we have

dy
y

dx
x+2

Integrating both sides of the equation we obtain

x+2
J dYy = J ~

In Iyl = In Ix + 2\ + k,
Rearranging this equation becomes
In Iyl - In Ix + 21 = k

k constant.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


Y 1
Inl= k
x+2 1

that is

A=e k .

-Y-=A
x+2
'

or

Finally, the required general solution is

Y= A(x
b)

+ 2).

Separating the variables we obtain


cosy d
cos x
- . - y= -.-dx.
smy
smx
Integrating both sides of the equation we get

cos y dy =
sin y

cos x dx
sinx

In I sinyl = In I sin z]

+ k,

k constant.

Rearranging the equation becomes


In I sinyl -In I sin z] = k
siny
In -sinx

that is

c)

I'

=k

or

siny
= A,
.
smx

A = ek

or

siny= Asinx.

Separating the variables we obtain

dy
y

2= -xe- x dx.

Integrating both sides of the equation we get

J~; J
=-

1
- - = ;t:e- x
y

or
d)

xe?" dx

+ e- x + k,

1
y

- = A - (:r + l)e-

k constant

A = -k.

Separating the variables we obtain

cos
2ydy
or

= dx

(! + !cos2y)dy = dx,

Integrating both sides of the equation we get

33

34

J(~ + ~

cos 2y) dy =

dx

~Y

+ ~ sin 2y = x + k,
2y + sin 2y = 4x + A,

or

Remarks

k constant

= 4k.

I In

Examples 2.2(a) and 2.2(c), the solutions are written explicitly as functions
of y in terms of x. However, in Examples 2.2(b) and 2.2(d), the solutions are
expressed implicitly. Solutions to differential equations are not necessarily written
in the form of y = f(x).

Example 2.3

Obtain the particular solution for the differential equation

dy
(y+
dY ) ,
x--3=2
dx
dx

= 0 when x = 3.

which satisfies the initial condition y

Solution
The given equation can be written as

dy
(x - 2) dx

= 2y + 3.

Separating the variables we obtain

dy

dx

--=-
2y + 3
x- 2

Integrating both sides of the equation we get

dy
2y + 3 =

~ ln /2y + 3/ = ln

or

dx
x - 2

Ix -

21

+ k,

2y+3=A(x-2)2,

Using the initial condition, we substitute x = 3 and y

A=e 2k.

= 0, we have

3= A(3 - 2)2,

that is

Hence, the particular solution is given by


2y

+ 3= 3(x -

2)2,

which may be written explicitly as


y

= ~(x -

k constant

2)2 - ~.

A = 3.

35

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

I Example 2.4

Find the solution of the differential equation

= 1 when x =

which satisfies the condition y

1.

Solution
Separating the variables we obtain

or
Integrating both sides of the equation we get

J(; -:2) JC:2


dy =
1

In Iyl + - = - y
x

x) dx

+ In [z] + A,

A constant.

Rearranging the equation becomes


In [yl

+ -y + -x In I -y

or

IX

Substituting x

= 1 and

In Ixl = A
.

I + -1 + -=
1 A.
Y

= 1 into the equation we have


In
1

-I11 1+ -11 + -11 = A '

that is

A = 2.

So the solution that satisfies the initial condition is


In -y I + -1 + -1 = 2.
Ix
y
x
In this case the solution is expressed as an implicit function.

I Remarks

In the preceding examples the variables in the given differential equations are
easily separated. However, there are some differential equations which do not
appear separable initially, but through appropriate substitutions the equations
can be reduced to separable equations. Let us see the following examples.

SEPARABLE EQUATIONS

36

Example 2.5

Using the substitution z = x

+ y,

convert
dy
dx

x
x

+y+

+ y + 5

to a separable equation. Hence, solve the original equation which satisfies the condition y(l)

Solution
Given z = x

+ y,

then

dz
dy
dx
dx
dz
dy
that is
-=--1.
dx
dx
Therefore the differential equation becomes

-=1+

z +1
z +5

dz
dx

--1=--.
Rearranging this equation gives

2(z

dz
dx

+ 3)

--z+5

Separating the variables, we obtain

5) dz 2dx

z+
( z+3

(1 + __z+3
2_)

or

dz

= dx.

Integrating both sides of the equation we get

z + 2 In Iz + 3 i = 2x + k,

or

In (z

(z +

or
Substituting back z

+ 3? = 2x -

3? = Ae

2x

+k

z
-

k constant

A = ek .

= x + y into this equation, we obtain


(x + y

+ 3)2 =

Ae x - y.

Given that y = 1 when x = 1, then


(1 + 1 + 3)2 = Ae 1 Hence, the required solution is

that is

A = 25.

= 1.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


I Example 2.6

37

Using the substitution z = xy, convert

to a separable equation. Hence, solve the original equation.


Solution

Given z = xy, then


dz
dy
dx = x dx + y.

Therefore the differential equation becomes


dz
dx

-=2x~.

Separating the variables, we obtain


dz
1 - z2
Integrating both sides of the equation we get

~=2xdx.

j h1-

Z2

= j 2x dX

sin -1 z = x 2

+ A, A constant

z=sin(x 2+A).

or

Hence, substituting back z = xy into this equation, we obtain


xy = sin (x 2

or

y=

+ A)

sin (x 2 + A)
.
x

\Ve now consider applications of the method to some problems. In each case, we need to first
interpret the physical data to model a differential equation.
I Example 2.7

According to Newton's law of cooling, the rate at which a body cools is proportional to the
difference between the temperature of the body and that of the surrounding medium. Let
represent the temperature (in DC) of a body in a room whose temperature is kept at a constant
180 If the body cools from 70 0 to 57 0 in 5 minutes, how much longer will it take for its
temperature to drop to 40 07

SEPARABLE EQUATIONS

38

Solution
Figure 2.1 illustrates the change in temperature of the body. The rate of change in () is directly
proportional to the difference between () and 18. This problem can be formulated as

de

- = -k(() - 18)

dt
Separating the variables, the equation becomes

40::::; () ::::; 70.

'

_ ) d() = -k dt.
( _() - 1 18

Room's Temperature at 18C


j'-'-:- -:--: -.-.-:- -:-,

r:--:-~---:--:--:--'

11

I"

':: <57'~c:::,

1 .1

I'

~:::::: 7.0~d::::::

5 minutes

'I

I'
I.

::::::::400::::::

? minutes

::-:':-.'.-: .':-:-::

===}

===>

..... I
. .. I

. . .....1

I'

Figure 2.1: Change in temperature ofthe body.


Integrating both sides of the equation, we get

J(()!

18) d() = -

In I() - 181
() 18

k dt

= -kt + C, C constant
= e- k H C
= Ae- k t , A=ec.

Therefore

() =
Given that ()

18 + Ae- kt .

= 70 when t = 0, we have
70

Also it is given that ()

= 57 when t = 5.

= 18 + A,

that is

So
57
-5k

18 + 52e- k(5)

39

-5k

= In

52

G~)

k=_~ln(39)
Therefore, the problem is modeled as

=
() =

I......

5
52
0.05753.

18 + 52e-o.05753t.

= 52.

..

~ wLYARY

DIFFERENTIAL EQUATIONS OF FIRST ORDER

39

Temperature ()

r
r

r
r
------------------~--------------------r
r
r
r
. ... 1"

..................

r
I

+---

5 minutes

---+;---

Time t

? minutes -

Figure 2.2: Graph of change in temperature of the body.


--Figure 2.2, the graph shows the decreasing temperature of the body. When
: :cain

e=

40, we

40 = 18 + 52e- o,05753t
52e-o.05753t = 22
-O,05753t

22
52
= 0.423077.
=

-_-sing logarithm, we have

-0.05753t = -0.86020
t ~ 14.952 minutes.
Hence, the body requires approximately another 9.952 minutes in order to cool from 57C to

.o-c
Example 2.8

A. stone of mass tri is thrown vertically upward from the ground with air resistance equals to
;:c 2 g, where v is the velocity of the stone, k is a constant and 9 is the gravitational constant. If
the initial velocity of the stone is u, find the maximum height attained by the stone.

Solution
The total resistance against the motion of the stone due to air resistance and gravitational force
t which is positive in the direction
upward. From Newton's second law, this statement can be formulated as

is mgkv 2 +mg. Let x be the displacement of the stone at time

d2x

Tndt 2

or

d2 x

= -mgkv 2

dt 2 = -g(kv

mg

+ 1).

SEPARABLE EQUATIONS

40

Notice that

~:: = ~ (~~) = ~~ = ~~ . ~~ = v ~~,

where v

dx
dt '

Therefore the differential equation can be written as


dv
2
v dx = -g(kv + 1).

x maximum

Separating the variables, we obtain

v=o

!~

( kv 2v+ 1 ) dv = -gdx.

;'

Integrating both sides of the equation, we get

(kv

2V

1)

1
2
2k In (kv +

Given that v

dv

gdx

1)

= -gx

+ A,

A constant.

= u when x = 0, we obtain

2
2k ln(ku + 1) = A.

Therefore, the motion can be modeled as


1
2
2k In (kv +

1)

= 2k

In (ku

+ 1) -

gx.

Let the maximum height attained be h. When the stone reaches the
maximum height, the stone stops momentarily, that is v
0 when
x = h. Hence,

v=u

The maximum height the stone attained is


1
h= In (ku 2
2kg

1.

Figure 2.3: The path of the stone


thrown vertically upmeter.
ward.

+ 1)

I Quiz 2A

Determine whether or not the following differential equations are separable.


(a)

dy
y dx

(c)

dr
de

(e)

dy
(1 - x) d
x

= 1 + y.

= (1 - r) cos e.
.

+ xy = sin x.

dy
dx

(b)

eY -

= x 2 + e":

(d)

2 dy
x dx

+ xy + Y = O.

(f)

ydx - xdy

= xydx.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


:2.

41

Find the general solutions of the following differential equations.

= x.

(a)

eX+Y dy
dx

(c)

2 dy
Y cos x dx

(e)

(1 + x)

= 2 + tan x.

~~ = 1 + .

dy

dy

dx + 2y = xy .
dx

(b)

2x

(d)

dy
xdx

(f)

(1 + X)2

(b)

dy
x dx

y-1
---yo
y+ 1

~~ + y2 = 1.

3. Solve the following initial value problems.


(a)

dy
tanx dx + tany

(c)

(e)

dy
dx

y( ~1r)

= 0,

dy

dx = tan2x,
y
x 2 -1'

~1r.

= y2 + y,

y(O)

2.

(d)

dy
. 2
-= SIn
x

y(2)

= 1.

(f)

--=vX=1

dx

1 dy

x dx

'

'

= 1 when

= 2.

~ when x

= O.

= 0 when x = 1.

4. Using the given substitutions, find the solutions of the following differential equations.
(a)

- = tan 2 (x + y),

dy
dx

= x +y.

(b)

dy
x dx +y

(c)

dy
dx

= 3x - y - 3.

(d)

dy
dx

3x - y+ 3
3x - y -1'

= 2x(1 +X 2y 2), z

x+y

,
1-x-y

xy.

= x + y.

5. The temperature of a room is lODe. A body needs 20 minutes to reduce its temperature
from sooe to 50 oe. Assuming that the temperature of the room is constant and the rate of
cooling of the body is proportional to the difference between the temperature of the body
and that of the room, find the time for the body to cool from

6. A parachutist jumps from an aeroplane on a regular training. When his parachute opens
he is traveling vertically downward with a velocity VQ. If the velocity of the parachutist at
time t is v and his acceleration is given by
dv
dt

= 9 - kv,

where 9 is acceleration due to gravity and k is a constant, show that

Find the limiting velocity (i.e t

----+

00) of the parachutist.

HOMOGENEOUS EQUATIONS

42

I
1.

(a) Separable. (b) Separable.

2.

eY =

(d)

1
tan- 1 y + -In x 2 ( 1 + y2) = A.
2

e- x

(b) eY =

+ A.

(a) sin x sin y = 1.

3.

(d)

(d)

(c) Separable.

(a)

-xe- x -

Answer II

Y = ~(x + 1- ~ sin2x).

Separable.

Ax 2 y 2 .

(f)

x
(0) y = - - .
4-x

(c)

(e)

y2=3

C-

_ _1 .
x+l )

(c)

(a) 44.772 minutes.

6.

(a) v=

2.2

~ In
2

(f)

Separable.

+ tan z}? + A.

(1l-y
+ y) + _1_ = A.
l+x

y2=4-lnlcos2xl.
y = fs(x -1)(3x+ 2)vx=T.

(b) xy = tan(x 2 + A).

(3x - y - 3)2 = Ae Y- x .

5.

Not separable. (f)

(c) y2 = (2

(e) 1 + eY = A(x + 1).

(a) sin2(x+y) =2x-2y+A.

4.

(e)

(d) (x+y-lJZ+2x=A.
(b) 24.772 minutes.

k'

HOMOGENEOUS EQUATIONS

In this section we shall discuss homogeneous first order ordinary differential equations in details.
We begin our discussion on how to identify whether or not a given equation is homogeneous.

2.2.1

Method of Identification

The general form of the order differential equation of first order is given by

dy

dx = f(x, y).

The equation is called homogeneous equation if

f(AX, AY) = f(x, y),


for every real value of A.

Definition 2.2 (Homogeneous Equation)


The differential equation

dy
dx = f(x, y)
is called homogeneous equation if f(>..x, >..y)

f(x, y), for every real value of A.

<>

We first show how to indentify homogeneous equations below.

eeeee.
-"--"=

~k~----

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

[ExamPle 2.9

Determine whether or not the following equations are homogeneous.

(a)

(c)

dy

y-x

dx

y+x

(b)

dy
- =x-y.
dx

(d)

dy

xy

dx

x2 _ y2

dy

y-=x(1ny
dx

Solution

a
()

y --x. I n this
hi examp1e
-dy = G Iven
dx
y+x

f(x, y)

y-x

=-.

y+x

Test for homogeneity,

A ) = Ay - AX
f( AX,y,
Ay + AX
y-X
y+x
= f(x, y).

Hence, the equation is homogeneous.

(b)

.
dy
xy
.
GIven - = 2
2 In this example
dx
x-y

f(x, y) =
Test for homogeneity,

f(AX, AY)

xy
2
-y

(AX)(AY)
(AX)2 _ (Ay)2
xy
x2 _ y2

f(x, y).

Hence, the equation is homogeneous.

(c)

Given dy = x - y. In this example


dx

f(x, y) = x - y.
Test for homogeneity,

f(Ad;, AY) = AX - Ay
= A(X - y)
= Af(x, y).
Hence, the equation is not homogeneous.

HOMOGENEOUS EQUATIONS

44
(d)

Given Y dy = x (lny - lnx). The equation can be written as


dx

dy
dx

= :. ln
y

('!{)
.

In this example

f (x, y) = ;

ln

(~)

Test for homogeneity,

f(AX, AY) = AX
Ay in (AY)
AX

= ; in

(~)

= f(x, y).
Hence, the equation is homogeneous.

2.2.2

Solution of Homogeneous Equations

In practice, homogeneous equations can be reduced to separable equations, using the substitution
y =xv
Since y

or

v=

'x!{.

= xv, we have
dy
dv
-=v+x-.
dx
dx

Hence, by substituting this expression into the original equation we obtain an equation of sep
arable variables in terms of x dan v. When this expression is integrated then we obtain a
relationship between x and v. Finally by substituting v = y/x we have the required solution.
From the above discussion, the technique of finding solution for a homogeneous equation can be
summarized as follows.

1 Make sure that the given equation is homogeneous.


.. 1 equat'Ion.
dy = v + x dx
dv moe
. t th ongma
= xv and dx

.
S u b stitute
y

Separate the variables x and v in the resulting equation.

4 Integrate both sides of the equation with respect to the related variables and then put
only a constant of integration, say A.
5 If there is an initial condition, then substitute the condition into the general solution to
obtain the value for A.

:=-

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

45

We will illustrate the process with some examples.

"I

Example 2.10

Find the particular solution of the differential equation


dy

xy

dx
which satisfies an initial condition y(O) = 2.

Solution
.
dy
Civen -d =
X

xy
2

x +y

In this example
f(x, y) =

Test for homogeneity,

xy
X

+ y2

(AX)(AY)
f(AX, AY) = (AX)2 + (Ay)2
xy
x2

+ y2

= f(x, V)

Hence, the equation is homogeneous.


To solve the equation, we use the substitution y = xv. Then the given equation can be written
as
dv
x(xv)
v + x - = ~--C...--C...~
2+(xv)2
dx
x
V

1 + v2
Rearranging the terms, this equation becomes
dv
v
x - = - -2- v
dx
1+ v
v3

1 +v 2
or
or

(1

+3v
v

2)

dv = _ dx

(~+~)
dv =
3
v

_ dx.

Integrating both sides of the equation, we have

JC+ ~ )
1

1
--22
v

dv = -

+ ln Ivl =

J~

-In Ixl
'

+ k;

k constant

46

HOMOGENEOUS EQUATIONS

or

In

Ivl + In Ixl =

or

In

2v 2

Ixvl = k +

1
2v 2

'

Hence, by substituting v = J!.. we obtain the general solution


x
x2
Inlyl = k + 2
2y

or

y= Aex

2/

y2 ,

From the initial condition x = 0, y = 2 we have


2 = Aeo,
Hence, the particular solution is

Example 2.11

that is

2
y= 2ex 2/ 2y.

Find the general solution of the differential equation


dy
x 2 + y2
xy - x 2'
dx
Solution
dy
x 2 + y2
Given - =
2' In this example
xy - X
2 + 2
dx

f(x, y) =
Test for homogeneity,

xy-x

2'

(>.x)2 + (>.y)2
f(>'X, >.y) = (>.x)(>.y) _ (>.x)2
x2 +y2
xy - x 2
=

f(x, y).

Hence, the equation is homogeneous.


The substitution y = xv transforms the given equation to
dv
x 2 + (xv)2
v + x - = - - - - 2
dx
x(xv) - x
1 + v2
v-I

After rearranging, the equation becomes


dv
1 + v2
x-=---v
dx
v-I
v+l
v-I

A = 2.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

(~) dv=

or

v+1

(1- _2_)

or

v+1

dx
x

dv = dx.
x

\\'e integrate both sides of the equation separately to give

v-

2 In

Iv + II =

In Ixl

+ k,

k constant

In l(v+1)2 x i =v-k.

or

Hence, by taking the exponent of both sides of the equation, we obtain

(v + 1)2x = Ae v ,

e:",

Finally, substituting v = !{ we get

Example

2.121

Find the solution of the differential equation

x 2 + y2
xy

dy
dx

which satisfies an initial condition y = 2 when x = 2.

Solution
dy
Given d
x

= -

x 2 + y2
xy

. In

this example
2

f(x, y) = _ x
Test for homogeneity,

A A)
f( x, y

+ y

xy

(AX)2 + (Ay)2
(AX) (AY)
x2 +y2
xy
f(x, y).

= _

Hence, the equation is homogeneous.


As usual, we use the substitution y = xv which turns the given equation to
dv
x 2 + (xv)2
V

+X

dx

= - ---,--'--.,--'-

x(xv)

1 + v2
v

47

48

HOMOGENEOUS EQUATIONS

Rearranging the terms yield

dv
1 + v2
x-=----v
dx
v
1 + 2v 2
v

+V
dv= _
2V2)

or

~x.

Integrating both sides of the equation, we have

JC

+V2V2) dv

d;

= -

~ In (1 + 2v 2 ) = - In

In (1 + 2v

or
or

In

+ In x

4k

[x 4 (1 + 2v 2 ) ] =

4k.

Ixl + k,

k constant

Hence, by taking the exponent of both sides of the equation, we obtain

x 4 (1 + 2v 2 )
Then, substituting v =

'!J...

A,

A = e4 k .

we get

From the initial condition x = 2, y = 2 we have


22 (2 2

+ 2(2 2 ) )

A,

that is

48.

Finally, the solution is

Example 2.13

Solve the differential equation

dy
dx

x+y
x-y

Solution
.
dy
x+y
.
GIVen -d- = - - . In this example
x
x-y

j(x, y)
Test for homogeneity,

x+y
x-y

= --.

j(AX, AY) = AX + Ay
AX - Ay
x+y
x-y
= j(x, y).
Hence, the equation is homogeneous.

- - - -

- - - - -

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


Tsing the substitution y = xv, the given equation can be written as

+ x - dv
"

dx

x + (xv)
x - (xv)

= ----'----'

l+v
I-v

Rearranging the terms, the equation becomes


dv
1+v
x-=---v
"dx
I-v

C :2)
1
;

}f

dv

d:

(_1

__ +
+

or

v 2

"_v_) dv- dx
1 v2
X .

Integrating both sides of the equation, we have

tan":' v - ~ In (1 + v 2 )

In [z]

+ k,

k constant

In [x 2 (1 + v 2 ) ] = 2tan- 1 v - 2k.
Hence, by taking the exponent of both sides of the equation, we obtain
x 2 (1 + v 2)

Then, substituting back v =

'J!...

1
",

+ y2 =

Ae2tan-l(y/x).

2.141

Solve the differential equation

Solution
.

dy

GIven -

dx

2y 2
2

2'

+ y

In this example
f(x, y) =

Test for homogeneity,

we get
x2

Example

= Ae2 tan-

2y

+y2 .

2 (>-.y) 2
f(>-'x, >-.y) = (>-.x)2 + (>-.y)2
2y 2
x2

=
Hence, the equation is homogeneous.

+ y2

f(x, y).

= e- 2k.

HOMOGENEOUS EQUATIONS

50

Using the substitution y

= xv, the given equation can be written as


v

+ X -dv
dx

2(xV)2

= ----:::---'---'-....,.-;::
2

+ (xv)2

2v 2
1 + v2 '

Rearranging the terms, the equation becomes


dv
2v 2
x - = - -2- v
dx
1+v
v(v - 1)2

1 + v2
1+v

or

dv

= _ dx

v(v - 1)2

)2
(1- + ( 2)

or

v -1

x
dx
dv = - -.

We next integrate both sides of the equation to get

J(~+

(v

~ 1)2) dv = -

d:

2
= - In Ixl + k,
v-I

k constant

In Ivl - - or

lnlvxl

+ --.
v-I

Hence, by taking the exponent of both sides of the equation, we obtain


vx

Finally, substituting back v = JL we get


x
y
I Remarks

= Ae 2/ (v -

l ),

= ek .

= Ae 2x / (y - x ) .

In the preceding examples the given differential equations are homogeneous. How
ever, there are certain differential equations which are not homogeneous, but
through appropriate substitutions the equations can be reduced to homogeneous
equations. As an illustration let us see the following Example.

Example 2.15

I
+ 2, show that the equation
dy
x - y +2
dx
x +y- 2

Using the substitutions x = X and y = Y

can be reduced to a homogeneous equation. Hence, find the solution of the original equation.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

51

Solution
If x = X and y = Y

+ 2, then
dx

= dX

and

dy

= dY.

Substitute these results into the original equation, we obtain

dY
X-Y
dX- X+Y'
which is a homogeneous equation. Next, by using the substitution Y

= XV, we have

X dV = 1- V
dX
1+V

) dV = _ dX.
V +1
( V2 +2V -1
X

or

Integrating both sides of the equation yields

J(

V2

~ :V

l_

1)

dV = -

d:

"2 In /V 2 + 2V - 11 = -In IXI + k,


or

In

1V + 2V - 11 + 2In IXI =

2k

+ 2V -1)X21 =

2k.

In 1(V2

or

k constant

By taking the exponent of both sides of the equation and substituting V = Y/ X, we obtain
y

+ 2XY _ X 2 = A,

= e 2k .

finally, substituting back X = x and Y = y - 2 we get

______
1.

Q_ul_Z_2_B_'_~

I'"-

Determine whether or not the following differential equations are homogeneous.


(a)
(c)
(e)

dy
dx

x2 + y2
(x-y)(x+y)"

dy

d~ = y ( 1 + In y - In x).

2
dy
x +y) dx = xy.

(b)

dy
dx

y
x-,jXY

(d) x dy _ y = x
dx

X+y3

dy
(f)
dx
x 3 +y

vix 2 + y2.

52

LINEAR EQUATIONS

2.

Show that each of the following equations is homogeneous and find its general solution.
xy+ y2
dy
xy
- x 2'

dx
(c) x 2 dy - (y2 - xy) dx = O.

(a)

(e)
3.

3xy dy = y2 _ x 2.
dx

+ y) dx

(b)

(xe Y / x

(d)

(xy

+ x 2) dy + y 2dx
=

dy

+ -Jx 2 + y2 =

(f) x dx

- x dy = O.

O.

y.

Solve the following initial value problems.

4.

2/f + ~

y(l)

= 4.

(b)

xy

~~ = x 2 + y2,

dy
dx

y2 _ xy + x 2
x2

y(l)

2.

(d)

dy
dx

2x+y

,
x+2y

dy
dx

2 y2 - x 2
,
x 2 + 2xy

y(3)

= O.

(f)

dy
x dx - Y =

(a)

dy
dx

(c)
(e)

x'

Y = 1 when x

-J x 2
-

y2,

1 when x

Y = 1 when x

l.

= 3.
=

l.

By using the given substitutions, find the solutions of the following differential equations.

(a)

dy
dx

2x + y-1
x + 2y + i '

x = X + 1,
y=Y-l.

(b)

dy
dx

2x - 5y + 3
2x + 4y - 6'

x =x + 1,
y=Y+l.

(c)

dy
dx

x-y+2
,
x+y

x =X -1,
y=Y+l.

(d)

dy
dx

y-2
x+y-5'

x =X +3,
y = Y + 2.

I
1.

2.

3.

4.

2.3

Answer

(a) Homogeneous.
(d) Not homogeneous.
(a) xy = AeY / x.

(b)
(b)

e- Y / x + lnx = A.

(e) y(l + Ax 2) = 2x.

(d) y2 x = A(2y + x).

(e)

(x 2 + 2y2)3 = Ax 2

(f) y+ Jx2 +y2 = A

= 2+ lnx.

(b)

y2
2=2Inx+1.
x

(e) ln z -} - - = 1.

(d) (x_y)2(x 2_ y2) =32.

(e)

x 2e 2y/ x = 3(x + y).

(f)

(a)

/!;

Homogeneous.

(e) Not homogeneous.

(e) Not homogeneous.


(f) Not homogeneous.

x
y-x

sin " !

(a) (x - y - 2)2(x 2 - 2x - y2 - 2y) = A.

(b)

(e) x 2 - y2 - 2xy + 4x = A.

(d) y - 2 = Ae(x-3)/(y-2).

(;)

~7r +

lnx.

(4y - x - 3)(y + 2x - 3) = A.

LINEA~ EQUATIONS

In this section we shall look at first order linear ordinary differential equations. Differential
equations of this type are important and often occur in problems either in engineering or applied
mathematics. Our discussion begins with the general form of linear equation.

53

,JRDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

2.3.1

Method of Identification

\re begin our discussion with the following definition.

Definition 2.3 (First Order Linear Equation)


The differential equation

dy
a(x) dx

+ b(x)y =

(2.4)

c(x),

where a(x), b(x) and c(x) are continuous functions of x or constants is called first order

linear equation.

<>

Examples of how to identify the given equations as linear equations are considered below.

Example 2.161
Determine whether or not the following equations are linear.

a)

c)

dy
x - - 2y
dx

dy
dx + y2 =

= x+ 1.
eX.

x2 ) ~~ = X (y + sin -1 x) .

(b)

(1 -

(d)

2 dy
y
2x - +xe
dx

= SlllX.

Solution

(a) The equation is linear where


a(x) = x,
(b)

b(x) = - 2 and

c(x) = x

+ 1 are

continuous function of x.

The equation can be written as

(1_x 2)dY -xy=xsin- 1x.


dx
Obviously, the equation is linear where

a(x) = 1- x 2 ,

b(x) = -x

and

c(x) = xsin- 1 x are continuous function of x.

(c)

The equation is not linear because there is a term of y2.

(d)

The equation is not linear because there is a term of eY .

2.3.2

Solution of Linear Equations

For the purpose of finding solutions of differential equations of this type, Equation (2.4) is
rearrangged so that the coefficient of

~~
dy
-d
x

where p(x)

b(x)

c(x)

= a(x) and q(x) = a(x)'

is 1. Then Equation (2.4) becomes

+ p(x)y =

q(x),

(2.5)

LINEAR EQUATIONS

54

We wish to solve Equation (2.5) assuming p(x) and q(x) are either constants or functions of x
alone.
p=eJp(X)dx
(2.6)
Setting
and observing that, by using the chain rule,

~~ = p(x) . eJ p(x) dx = p(x) p.

(2.7)

Multiply both sides of (2.5) by p we have

dy
p dx

or

+ pp(x) Y = pq(x).

(2.8)

Using (2.7), and the formula for the derivative of a product, Equation (2.8) can be written as
d

d)PY]

pq(x).

Since p is a function of x alone and integrating this equation with respect to x gives

PY =
or

y=

pq(x) dx

+ A, A constant

~{J pq(X)dx+A},

which is the required general solution of (2.5). For convenience, the expression p = eJ p(x) dx is
called the integrating factor.
I

Remarks

In Expression (2.6) we do not introduce a constant of integration. Why? If we


put a constant, say k in (2.6), then

p = eJ p(x) dx+k
= ekeJ p(x) dx,
which means that both sides of Equation (2.8) are multiplied by a constant, e k .
This constant may be omitted from the equation without having any effect on the
solution. For illustration, let us see Example 2.17 below.

Example 2.17

Find the general solution of the differential equation

dy

dx + Y = x.

Solution
In this example p(x) = 1 and q(x) = x. Then

p(x) dx=

dx

+ k,

k constant.

JRDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

55

-::-:::'e integrating factor is

-=-:::'erefore, multiplying the given differential equation throughout by p yields


ekex dy +ekexy=xeke x
dx

: ~ after eliminating e k , we have


dy
eX _
dx

+ eXy= xe",

': :,:e that this equation can also be obtained if the integrating factor were just
equation can be written as

p =

e", Then

::::.~

d
dx [eXy] = xe x.
~:-egrating

both sides of the equation with respect to x, we have


eXy=

xei da:

= (x - l)e X

+ A,

A constant.

:-.z.ally, we obtain the required general solution is

y = x-I

+ Ae- x .

:-~:;:n our previous discussions and Example 2.17, the technique of finding solution for a linear
-ciation can be summarized as follows.

31

Express the given equation in the form


dy
dx

:2

Find p(x) and evaluate

+ p(x)y =

q(x).

p(x) dx.

: 3 Set the integrating factor as


p=

eJ p(x) "".

: - Multiply equation in 1 throughout by the integrating factor


form

and then write it in the

d
dx[PY] = pq(x).

:.)

Integrate both sides of the equation obtained in 4 and then solve for y. Be sure to
include a constant of integration, say A.

:6

If there is an initial condition, then use the values given to obtain the value for A.

LINEAR EQUATIONS

56

In the process of finding integrating factors sometimes we may need this formula
e1nj(x) =

f(x), for f(x) >

o.

We will illustrate the process with the following examples.

Example 2.18 I

Find the particular solution of the differential equation


dy

dx + ytanx

which satisfies the condition y

= cos x,

= 1 when x = O.

Solution
In this example p(x)

= tanx and

cosx. Now

=-

q(x)

p(x) dx

p(x)

tan x dx

in cos x

= in sec x.

So the integrating factor is


eJ p(x)dx

= e1n sec x = secx.

Multiplying the given equation throughout by the integrating factor p(x)


dy

sec x dx

+ y sec x tan x =

1.

This equation can be written as

dx [y sec x] = l.

Integrating both sides of the equation with respect to x yields


ysecx

dx

= x + A,

A constant.

Hence, we have
y

From the initial condition x

= 0,

(x

+ A)cosx.

= 1 we obtain
1

(0 + A)(l),

(x

The required particular solution is therefore

+ 1) cos x.

that is A

l.

= sec x, we obtain

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


I Example 2.19

57

Solve the differential equation


(l-x2) dy _xy=_I_.
dx
1- x 2

Solution
Rewriting the given equation we have

~~
. example p ()
In this
x

-C~

x 2 ) Y = (1 _lx 2)2 .
.. .. .. .. . .. .. .. .. . . . . . .. . . . .

(i)

= - 1 _x x 2 and q()
x = (1 _ 1
x 2)2 ' Then

J~

p(x)dx = -

The integrating factor is


p(x) =

x 2 dx =

~ln(l- x 2) = ln~.

eJ p(x)dx =

~.

Multiplying Equation (i) with this integrating factor yields

~ dy ~

dx

x
) y
Vl-x 2

[y~]

= (1 _lx2)~'

3 .

(l-x 2)2

This equation can be written as


ddx

Integrating with respect to x we get


(ii)
By using the substitution x

= sin (J,

it can be shown that


dx
x
~+A,
(l-x2)~
yl- x 2

A constant.

Using this result, Equation (ii) becomes

y~=
that is
I Remarks

x
+A
Vl-x 2
x
A

= - -2 + -----===2
1- x

VI ~ x

' .

In the e~amples we have just discussed, the given differential equations are ob
viously linear. However, some nonlinear differential equations can be reduced to
linear equations by using appropriate substitutions. The following examples show
how this is done.

LINEAR EQUATIONS

58

Example 2.20

Using substitution z = y2, convert the differential equation


dy
x 2y dx - xy2 = 1,
to a linear equation in z. Hence, find the solution of the original equation which satisfies the
initial condition y = 1 when x = 1.

Solution
Notice that the given equation is not a linear equation in y. By using substitution z = y2, we
obtain
dz
dy
dx = 2y dx
dy
y dx

or

1 dz
dx.

"2

Putting the result into the original equation, we get

or

1 2 dz
-x - - xz= 1
2
dx
dz
2z
2
dx - --;- x2 '

which is a linear equation in z. We can show that the integrating factor of this equation is

1
p(x) = 2'
x
Equation (i) therefore can be written as

d~ [:2]= :4'

Integrating the equation with respect to x, we have

~=J~dX
x2
x4
-or

Z=

2
- 3x 3

+ A'

A constant

_2
+Ax 2
3x

2
y2 = - - + Ax 2.
3x
Imposing the initial condition y = 1 when x = 1, we obtain

or

2
2
2
1 = - 3(1) +A(1) ,

Hence, the solution is

that is A = 3'

(i)

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

59

Remarks I Example 2.20 is an example of Bernoulli equation


I
dy

dx + p(x)y = q(x)yn, n -=I- 1,

that reduces to a linear equation with the substitution


z = yl-n.
This equation is named after James Bernoulli (1654-1705). A detail discussion
involving this equation is given in Exercise 2 Question 29.

I Example 2.21

Show that if z = sin y, the differential equation


dy
tany
secy
- + - - = - -2 ,
dx
x
x
can be changed to equation
dz
z
1
dx +;; = x 2 '
Hence, solve the original equation.

Solution
Given that z = sin y, then

dz
dy
-=cosy
dx
dx
dy
dz
-=secy-.
dx
dx

or

Substituting this result into the original equation yields


dz
secy dx
or
or

dz
dx

tan y

secy

sin y

+ -x- = X2

+ -;;- = x 2

dz
dx

+ ~ =~,
2
x

(i)

which is a linear equation in z. We can show that the integrating factor is

p(x) = x.

Equation (i) can be written as

d
1

dx lx z ] = ;; .

Integrating the equation with respect to x, we have

xz=

Jd:

xz = ln x

+ A, A constant.

60

LINEAR EQUATIONS

Substituting back z = siny, finally we obtain


x sin y = In x

+ A.

Below we present some applications of linear differential equations.

Example 2.22 I

A simple eletrical circuit consists of a constant resistance R (in ohms), a constant inductance L
(in henrys) and an electromotive force E(t) (in volts). According to Kirchhoff's second law, the
current i (in amperes) in the circuit satisfies the equation
di

L dt

+ Ri =

E(t).

Solve the differential equation with the following conditions.


(a)

E(t) = Eo is a constant and i = i o when t = O. Describe the current i when t

(b)

E(t) = 110 sin 1201Tt, L = 3 henrys, R = 15 ohms and i = 0 when t = O.

--+ 00.

Solution

The standard linear equation that represents the current i is


di
R.
E(t)
-+-2=--.
dt
L
L

(i)

The integrating factor is therefore p(t) = e(R/ L)t, and the solution of Equation (i) is given by
ie(R/L)t =

(a)

Elt) e(R/L)tdt + A,

A constant.

(ii)

Figure 2.4 shows the electrical circuit with a constant E(t) = Eo. The solution is
ie(R/L)t =

i =

or

~o

e(R/L)tdt

+A

~ + Ae-(R/L)t.

(iii)

...
.
.
Eo
Imposing the condition that t = 0, i = i o to (lll), we obtam A = 20 - R' Finally the
required solution is

Notice that when t

--+ 00,

i ~ E o/ R is a constant (refer to Figure 2.5).

61

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


Eo
R ----------------------

io

Figure 2.5: Change of current in the circuit.

Figure 2.4: A simple electric circuit.

(b)

Figure 2.6 shows an electrical circuit with E(t) =


110 sin 1201rt, L = 3 henrys and R = 15 ohms.

Substituting these values into (ii) we obtain


ie

5t

= 1~0

E(t) = 100 sin 1201rt

5t

e sin 1201rtdt

+ A.
R

Integrating by parts, we have the general solution


110
3

ie5t =

[e5t (5 sin 1201rt -

1201rCOS1201rt ) ]
A
25 + 144001r2
+

= 22 [ e 5t (sin 1201rt - 241r cos 1201rt)]


1 + 5761r 2

A.

Figure 2.6: Electrical circuit with


E(t) = 110 sin 1201rt,
L = 3 henrys and
R = 15 ohms.

(iv)

To find A, we use the condition that when t = 0, i = O. Inserting these values into (iv) we
get
A _ 22 [
241r
]
- 3 1 + 5761r 2 .
Solution (iv) therefore becomes
ie 5t

= 22
3

[e5t (sin 1201rt - 241r2cos 1201rt)


1 + 5761r

241r]

+ 1 + 5761r 2

22 [sin 1201rt - 241r cos 1201rt


241re- 5t ]
+-----::
3
1 + 5761r 2
1 + 5761r 2

2=-

= 232 [( 1 + :761r2) sin 1201rt - (1 +2:;61r2) cos 1201rt +


By letting
cos=

1
1

(1 + 5761r 2) "2

12:~e7~:2 ] .

and

the expression for i can be written as


i

22'
1761re- 5t
1 (cos sin 1201rt - sin cos 1201rt) +
5 6 2
3(1 + 5761r 2) "2
1 + 7 1r

LINEAR EQUATIONS

62

or

Example 2.23

A tank which initially holds 100 litres of a brine solution containing 90% of water and 10% of
salt is drawn off at the rate of 5 litres/rninute. At the same time the tank is refilled at the rate
of 4 litres/rninute with a solution that contains 50% of water and 50% of salt. Assuming that
the mixture is kept uniform. How much salt is present
(a)

at any time t > O?

(b)

at the end of 10 minutes?

Solution
Let S be the amount of salt in the tank after t minutes.
The tank originally contained salt with concentration 10
% out of 100 lit res of brine, that is S = 10 when t = O.
The mixture flows out at the rate of 5 litres/rnin and at
the same time, 4 litres/rnin of mixture is added to the
solution. So, at any time t > 0, the amount of mixture in
the tank is

~"Jo"

""

S litres/min \
-------;..

?~

Figure 2.7: Mixing solutions


in a tank.

100 + (IN - OUT) t = 100 + (4 - 5) t = 100 - t.

The concentration of salt in the tank that is being drawn out at any time is

Further, the tank receives at the rate of 4 x 50% = 4 x 50/100 = 2 litres per minute of salt from
the second tank. Then the rate of increase of S is
dS =

dt

(a)

2_( 5 t )
100 -

or

dS

dt

(_5_)t = 2.
100 -

(i)

5_
In this equation p(t) = 100 t and q(t) = 2. Then

p(t)dt=

Since t

< 100,

5dt

100_t=-5In!100-tl.

the absolute sign can be disregarded. Therefore, the integrating factor is


1

p(t) = (100 _ t)5 .

The general solution of (i) is

(100S- t)5

=J

(100 2_ t)5 dt

A
+,

A constant

. ?...-=-.::::".-_-i....B:y DIFFERESTL-li

EQL-lTIO~"-S OF

s= !(100 -

t)

FIRST ORDER

+ A(100 -

53

t)5.

G:,"en 5 = 10 when t = 0, we get

10 = !(100 - 0)

+ A(100 - 0)5,

40
. A = -t h at IS
100 5 .

Hence, the amount of salt in the tank at any time t > 0 is

s=

! (100 - t) - 40

CO~O~

The amount of salt in the tank after t = 10 is

S = ! (100 - 10) - 40 (

_ _ _ _ _ _ _ _1

100 -10) 5

100
= 21.38 litres.

Quiz 2C

Determine whether or not the following differential equations are linear.

OJ

3.

(a)

dy
(x + 1) dx = y.

dy
(b) dx = 3y - 2x + 5xy.

(c)

2 dy
2
x dx + xy = y + x.

dr

(d) dB = (1 - r) cos B.

(e)

dx
2
dt + 2tx = t .

(f)

dy.
. 2

dx +smy =sm x.

Find the general solutions of the following differential equations.

(a)

dy
2
dx +3y = e:",

dy
2
(b) dx +y = x .

(c)

dy
.
dx + y tan x = sin 2x.

dy

(d) x dx + 2y = cos x.

(e)

dy
2
(1 + x 2 ) dx - xy = x(l + x ) .

dy

(f) dx + Y cot x = x.

Solve the following initial value problems.


(a)

dy
(l+x)dx _xy=e 2 X , y(O) = 3.

(b)

dy
dx + y cot x = esc x,

(c)

dy
x
x--y=-dx
x + I.'

y(l) = O.

(d)

1 .
dy
dx + y cos x = "2 sin 2x, y = 1 when x = O.

(e)

2 dy
(1 - x ) - - xy = 1
dx
'

y(O) = O.

(f)

dy
2

x - -y = x lnx
dx
'

y = 0 when x = O.

Y = 1 when x = 1.

64

LINEAR EQUATIONS

4. Using the given substitutions, find the general solutions of the following differential equa
tions.
(a)

dy
dx

(c)

X -

+ Y = xy3

dy
+Y
dx

= y2x 2 ln x,

5. Using the substitution z

= y-2.

dy
(b) dx
- 4y

(d)

y-l.

dy
dx

"
= xyz,

z=y -2" .
2

= 2ytanx + y tan 2 x,

= y-l.

= cos y, show that the differential equation


dy
coty
dx - -x-

3x

cscy,

is reduced to
dz
dx

z
x

3x

-+-=-e .
Hence, solve the original equation.
6. Show that if z

y2, the differential equation


dy
xy dx

+ Y2 =

dz
dx

2z
x

2" cos x,

can be reduced to the equation


cosx
x

-+-=--.
Hence, solve the original equation.
7. One of the basic equations in electric circuits is
di

L dt +R2

E,

where L is called the inductance, R the resistance, i the current, and E the electromotive
force or emf. (L and R are constants.)
(a)

If E

= Eo (constant), show that when

(b)

If E

= Eo cos wt,

= tan-1

--+ 00, 2 --+

Eo
If.

where Eo and ware constants, show that when t


i

where 0:

--+

Eo

VR2

+w 2L 2

--+ 00,

cos (wt - 0:),

(w:).

8. A mixing tank with a 1000 litre capacity initially contains 400 litres of distilled water. Then
at time t = 0 brine containing 0.25 kg of salt per litre of brine is allowed to enter the tank
at the rate of 8 litres/rnin and simultaneously the mixture is drained from the tank at the
rate of 6 litres/rnin.

------

--

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


(a)

65

If y is the amount of salt in the tank, show that the rate of change of the amount of
salt is given by
dy
dt

~=2

+ t + 200

(b) Determine the amount of salt in the tank at any time t.


(c)

Find the total amount of salt when the tank is full.

______________---'I~A_n.s.w.e.r_Il__
l.

2.

:3.

(a) Linear.

(b)

Linear.

(b)

Linear.

y = x 2 - 2x + 2 + Ae- X

(e) Linear.

(f) Not linear.

(c) y = A cos x - 2 cos 2 x.

(a) y =
(d) x 2y = xsinx + cosx + A.

(e) y = 1 + x 2 + A\./1 + x 2.

(f)

(a) (1+x)y=e 2x+2ex.

(b)

(c)

y=xln(~).
x+l

(d)

(e) YV1 - x 2 = sin- 1 x.

(f)

y=x 2(inx-l)+2x.

y = sin x-I + 2e- sin x .

..1.

(a) 2y-2 = 2x + 1 + Ae 2x.


(c) y-l = Ax + x 2(1-lnx) .

.s.

xcosy = - ~e3x

S.

(b)

2.4

(d)

(c) Not linear.

e2x + Ae- 3x .

ysinx = x.

1 - xcotx

+ Acscx.

(b) 8y- ~ = Ae- 2x - 2x + l.


(d) y-l =-~sin3xcosx+Acos2x.

+ ~e3x + A.

6.

y=~(t+200)-100(~)3.
t + 200

x 2y2

= x sinx +

cosx + A.

(c) 243.6 kg.

EXACT EQUATIONS

In this section we are going to discuss another type of ordinary differential equations of first
order which are known as exact equations. This type of differential equations often occur when
we wish to find a potential function for a conservative vector field. As usual we begin our
discussion on how to identify whether or not a given equation is exact.

2.4.1 Method of Identification


The general form of the first order ordinary differential equation is given by
dy

(2.9)

dx = f(x, y).

In certain cases, the function f(x, y) on the right hand side of this equation may be written as

f( x, Y)

= _ M(x, y)
N(x, y)'

Therefore, Equation (2.9) becomes


dy

dx
On rearrangement,

M(x, y) dx

M(x, y)
N(x, y)'

+ N(x,

y) dy

= O.

EXACT EQUATIONS

66

Using the concept of total differential and differential equation of first order we obtain the
following definition.

Definition 2.4 (Exact Equation)


The differential equation
M(x, y) dx

+ N(x,

y) dy

(2.10)

= 0

is called an exact equation if there exist a continuous function u(x, y) such that
du = M(x, y) dx

+ N(x,

y) dy.

(;

(2.11)

The above definition poses two questions.

1. How do we know that Equation (2.10) is an exact equation? In other word, what is the
condition involving M(x, y) and N(x, y) for Equation (2.10) to be exact?

2. How can we determine the continuous function u(x, y)?


The first question can be dealt with using the following theorem.

Theorem 2.1 (Condition for Exact Equations)


The equation
M(x, y) dx

+ N(x,

y) dy = 0

is an exact equation if and only if


aM
ay

aN
ax'

(2.12) I

Proof
Let M(x, y) dx + N(x, y) dy = 0 is an exact equation. Then, there exists a continuous function
u(x, y) with its total differential is given by
au
au
du = ax dx+ ay dy.
Comparing this equation with Equation (2.11) we have
aU=M
ax

and

aU=N
ay
.

These equations are differentiated with respect to y and x respectively, then


aM
ay

and

aN
ax'

67

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


Since u(x, y) is continuous, then

02U
oyox

02u
oxoy'

Hence, we obtain

oM
oy
Conversely, if

o~

oN

= ox'

~~, then it is necessary to show that there exists a function u(x,

y) such

that

ou

ox = M(x, y)

(2.13)

ou

oy = N(x, y).

(2.14)

and

We choose to integrate Equation (2.13) with respect to x by holding y fixed. Therefore we have

u(x, y)

M(x, y) dx

+ (y),

where (y) is a function of y to be determined later. To establish this fact we differentiate this
equation with respect to y, obtaining

~~ = ;y

M(x, y) dx

+ '(y).

Equating this result to Equation (2.14) for ou/oy, we have

'(y) = N(x, y) - ;y

M(x, y) dx.

There will be a solution if '(y) is independent of x, and this will be the case if the derivative
of the right-hand side with respect to x is zero. Carrying out this differentiation, and with the
assumption that the partial differentiations with respect to x and y may be interchanged, we
have

o'(y)

0 [

~ = ox N(x, y) - oy

J
= --- - -- -- J
oN - -0 [0-= --ox

ox oy

oN
ox

0 [0
oy ox

oN oM
= - - - - - =0.
ox
oy

M(x, y) dx

M(x, y)dx
M(x, y) dx

]
]

EXACT EQUATIONS

68

This proves the hypothesis. If we recall the total differential of a function of two variables 7J,(x, y)
is given by
f}u

Bu

d7J,= -dx+ -dy


ox
oy"
then according (2.13) and (2.14),

du= M(x, y) dx

+ N(x,

y) dy.

Furthermore, according to Definition 2.4, since "U(x, y) exists and is continuous, hence

M(x, y) dx

+ N(x,

y) dy

O.

Let us now consider examples of how to determine the given equations as exact equations.

Example 2.24

Determine whether or not the following differential equations are exact.

(a)

(2x

+ 3y2) dx + (6xy + 2y) dy = O.

(c) (1-cos 2x)dy+ysin2xdx=O.

(b)

(~+3x2)

(d)

x In x dy

dX+(1+:

+ y dx = O.

Solution
(a)

In the given equation,

M= 2x+ 3y2
so,

and

oN
ox = 6y.

oM =6y
oy
oM
oy

Therefore,

N= 6xy+2y,

oN
ox

The equation is exact.


(b)

In the given equation,

and

so,

oM
oy

The equation is not exact.

oN
ox

Therefore,

x3
N=l+-,

oM =I- oN.
oy
ox

3x 2
y

dy=O.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


(c)

In the given equation,


N = 1 - cos 2

and

M = ysin2x

aN

aM
ay = sin2x

so,

-.- =

ax

sm2x.

aN

aM

Therefore,

X,

ay

ax

The equation is exact.


(d) In the given equation,

M=y

N= xlnx,

and

aN

aM

-=1

so,

7);;= l+lnx.

ay

aM
ay

Therefore,

i- aN.
ax

The equation is not exact.

I Example 2. 25

Find the values of k such that the given equations become exact.

+ -kY)
dx 3

(2- Y+ -1 )

(a)

-y2
( x2

(b)

(2x + ysinxy + k y 4) &r + (xsinxy - 20x y 3) dy

(c)

(1 + e

X
/

Y)

x2

dx + e X / Y

(1 +

dy

k;)

o.
=

O.

dy = O.

Solution
Assume that the given equations are exact.
(a)

In the given equation,


and

aM 2y k
-ay= + x-3
x2

2y

1
x

N=---
2
X

aN

2y

2y

'

x 3
2
ax-- -x +

Since the equation is assumed to be exact, then

aM
ay

aN
ax'

that is

2y

+ x-3 = x-2 +x 3
x2

By comparing the terms on both sides of this expression, we obtain k

2.

70
(b)

EXACT EQUATIONS
In the given equation,
M

8M
8y

= 2x + y sin xy + k y 4

= x sin xy - 20x y3,

and

8N

& = SlllXY + xy cos xy -

= sin xy + xy cos xy + 4k y3

20y3.

Since the equation is assumed to be exact, then

8M
8y

8N

8x'

sin xy + xy cos xy + 4k y3

that is

By comparing the terms in this expression, we obtain 4k


(c)

= sin xy + xy cos xy - 20y3.

-20, that is k

-5.

In the given equation,


M

= 1 + eX / Y

X
N- e /Y

and

8N
8x

(1 + kX)
(1 + kX) +
y

= ~ eX/Y
y

eX/Y

(~).
y

Since the equation is assumed to be exact, then

8M
8y

8N

8x'

that is

eX/Y ( _

~)

~ eX/Y

or

X/ Y
e
( -

~)

=e

X/ Y

(1 + k:) +

(~~) + eX/ Y

eX/Y

(~),

C: k).

By comparing the terms on both sides of this expression, we obtain k

2.4.2

= -1.

Solution of Exact Equations

Having established a test for exactness, it remains for us to respond to Question 2 to determine
how a continuous function u(x, y) can be found.
If M(x, y) dx + N(x, y) dy = 0 is an exact solution, then from Definition 2.4, there exists a
continuous function u(x, y) such that

du

= O.

Integrating this equation with respect to u we have

u(x, y) = A,

A constant.

Therefore the required solution is of the form u(x, y)

8u =M
8x

= A.

(2.15)

Given that
(2.16)

and

8u =N
8y

(2.17)

;::

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

71

The equations can be used to obtain the function u, First we integrate Equation (2.16) with
respect to x while holding y fixed. This gives us
u =

M dx+ (y),

(2.18)

where (y) is an arbitrary function of y. This arbitrary function (y) can be determined by
differentiating Equation (2.18) with respect to y and equating it with Equation (2.17).
Summerising, the technique of finding solution for an exact equation can be described as follows.

1 Express the given equation in the form


Mdx+Ndy = 0

and then test for exactness.

2 Write

8u = M
8x

and

8u
8y

=N

(2.19)
(2.20)

3 Integrate Equation (2.19) with respect to x, that is

M dx +(y).

(2.21)

4 Differentiate Equation (2.21) with respect to y and equating the result with Equation
(2.20) to determine the arbitrary function (y).

5 Write down the solution in the form u(x, y) = A, where A is a constant.


6 If there is an initial condition, then substitute the condition into the general solution to
obtain the value for A.

As an illustration we present the following examples.

I Example 2.26

Solve the differential equation

~-

EXACT EQUATIONS

72

Solution
In this example,

= 6x 2

lOxy + 3y 2

and

aM
ay

-5x 2

+ 6xy -

3y 2

aN

f);; = -lOx + 6y.

= -lOx + 6y,

So,

aM

aN

ay

f);;'

Therefore, this equation is exact.

We see that

au
ax

- = 6x 2

lOxy + 3 y 2

(i)

and
au
ay

= -5x 2 + 6xy - 3y 2 .

.. .... ... .... .... ... ...

(ii)

Integrating Equation (i) with respect to x we obtain


u(x, y)

(6x 2 - lOxy

= 2x 3 -

+ 3 y 2) dx

5x 2y + 3 x y 2

+ (y),

(iii)

where (y) is an arbitrary function of y. To determine (y), differentiate Equation (iii) with
respect to y and equating the result obtained with Equation (ii), that is
au
ay = -5x 2

+ 6xy + '(y)

= -5x 2 + 6xy - 3 y 2 .
'(y)

So, we have
Integrating with respect to y,

(y)

Therefore, Equation (iii) becomes

u(x, y)

= -3 y 2 .

= _y3 + B, B constant.

= 2x 3 - 5x 2y + 3x y 2

y3 + B.

Since the general solution is of the form u(x, y) = A, then


2x 3 - 5x 2y + 3 x y 2 - y3 + B = A
2x 3 - 5x 2y + 3x y 2

or

y3 = C,

A - B.

Example 2.27

Solve the differential equation


[e- Y

+ cos (x

- y)

+ 2x] dx +

[-xe- Y

cos (x - y) - 1] dy

O.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

73

Solution
In this example,

:v

+ cos (x -

alvI
ay = -e- Y

y)

+ sin (x -

+ 2x

N = -xe- Y

and

aN

ax

V),

:30,

eu

aN

ay

ax

cos (x

y) - 1

-:v + sin (x - V)

Therefore, this equation is exact.

au
ax =

ev + cos (x -

au
ay = -xe- Y

y) + 2x

(i)

cos (x - y) - 1.

(ii)

=::tegrating Equation (i) with respect to x we obtain

u=

J(e

= xe- Y

+ cos (x - y) + 2x) dx

-Y

+ sin (x -

y)

+ x 2 + (y),

(iii)

o~:ere

(y) is an arbitrary function of y. To determine (y), differentiate Equation (iii) with


o~;Ject to y and equating the result obtained with Equation (ii), that is
au
ay

= -xe- Y

cos (x - y)

= -.Te- Y - cos

/(y)

we have

u = e:v

- .-refore, Equation (iii) becomes


0

C'

the general solution is of the form u( x, y)


e:v

+ sin (x

- y)

+ x2 -

(.T - Y) - 1.

-1.

(y) = -y + B,

. ~grating with respect to y

+ /(y)

B constant .

+ sin (x

- y)

+ x2 -

Y + B.

= A, then

Y+B

xe- Y + s i n ( x - y ) + x 2 _ y = C ,
C=A-B.
-=.-=marks

We have shown that in the preceding examples the solution are initially obtained
by integrating Equation (2.19) with respect to x. The solution can also be initially
determined by integrating Equation (2.20) with respect to y. The result is then
differentiated with respect to x and equate with Equation (2.19).

74

EXACT EQUATIONS

Examples 2.28 and 2.29 below illustrate the second approach.

Example 2.28 I

Solve the differential equation

Solution
This is actually Example 2.26 revisited, and since it is exact we see that
f)u
f)x

- = 6x 2
and

f)u
f)y = -5x 2

lOxy + 3 y 2

(i)

+ 6xy -

(ii)

3y 2 .

Integrating Equation (ii) with respect to y we obtain


U=

(-5x 2 + 6xy - 3 y 2 ) dy

= -5x 2y + 3x y 2 -

y3 + 'IjJ(x) ,

(iii)

where 'IjJ(x) is an arbitrary function of x. To determine 'IjJ(x), differentiate Equation (iii) with
respect to x and equating the result obtained with Equation (i), that is
f)u

f)x = -lOxy + 3 y 2

+ 'IjJ' (x)

= 6x 2 -lOxy+ 3 y2 .
So, we have

Integrating with respect to x


Therefore, Equation (iii) becomes

'IjJ(x) = 2x 3 + D, D constant.

3
2y
U= 2x - 5x
+ 3x y 2 - y3 + D.

Since the general solution is of the form u(x, y) = A, then

2x 3 - 5x 2y + 3x y 2 - y3 + D = A

or
2x 3 - 5x 2y + 3x y 2 - y3 = C, C = A-D.

"

I Remarks I The solution obtained is the same as the solution in Example 2.26, as to be

expected.

Example 2.29 I

Solve the differential equation

sin x dy

+ (y cos x

- x sinx) dx = O.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

75

, pilOn

h mis example,
M

aM
ay

ycosx xsinx

and

N= sinx

aN

= cosx,

ax

aM

aN

ay

ax'

= cosx.

'TIlJErefore, this equation is exact.


. .~ see that

au
ax = ycosx au
.
ay = slnx.

(i)

XSlllX

(1'1')

Integrating Equation (ii) with respect to y we obatin

u=

sinxdy

= ysinx + 'ljJ(x),

(iii)

...-here 'ljJ(x) is an arbitrary function of X. To determine 'ljJ(x) , differentiate Equation (iii) with
::espect to x and equating the result obtained with Equation (i), that is

au
ax

+ 'ljJ' (x)

'==

y cos x

y cos x - x sin X.

= -xsinx.

So. we have

'ljJ'(x)

Integrating with respect to x

'ljJ(x) = xcosx - sinx + D,

Therefore, Equation (iii) becomes

u = y sin x + x cos x - sin x + D.

Since the general solution is of the form u(x, y)

y sin x

y sin x

or

Remarks

+ x cos x -

D constant.

sin x

+ x cos x -

= A,

then

+D = A
sin x = C,

= A - D.

In the example, we are given

sinxdy+ (ycosx - xsinx)dx= O.


This equation can be rearranged as

dy
dx

+ Y cot x = x,

EXACT EQUATIONS

76

which is a linear equation. We can show that the solution is

+ C csc x

y = 1 - x cot x
y sin x

or

+ x cos x -

sin x

= C.

(a) In the examples we have discussed, the given differential equations are ex
act. However, there are certain equations that are not exact but can be
transformed to be exact by multiplying an integrating factor p,(x, y).
Assume that

M(x, y) dx

+ N(x,

y) dy = 0

is not exact. However, when this equation is multiplied by a factor p,(x, y),
the resulting equation
~L(X,

y)M(x, y) dx

+ p,er, y)N(x, y) dy =

becomes exact. We write this equation as

P(x, y) dx

+ Q(x,

y) dy = 0,

(2.22)

where

P(x, y) =

~L(X,

y)M(x, y)

and

Q(x, y) =

~L(X,

y)N(x, y).

Since Equation (2.22) is exact, from (2.12) we expect

or

oP

oQ

oy

Ox

a (p,M) = ~
a (p,N).

~
uy

uX

From here we can proceed to obtain the general solution of the equation.
More detailed discussion is given in Exercise 2 Question 30.
(b) The integrating factor, p,(x, y), has many forms depending on the problem
given. It is important to note that for an equation which is not exact may
have a few different integrating factors to be come exact. Nevertheless, the
general solution obtained for the given equation will be unique.
For illustration we present the following examples.

Example 2.30 I

Show that the differential equation

2ydx + xdy = 0
is not exact. If

~L(X,

y) = - is its integrating factor, then find the solution.


xv

~-

- - .

__ o_

,;.

-:::

~_-::

- ---

'-'----

77

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

__

------::

- -~~

_~

_0

.'

__

- ~-- -----:~~_:

"-~-~- ~--

Solution

=._----=

In this example,

-~~ ----~--------

and

M=2y

~,- ~~

N=x

aM
ay

"\"re see that

=f

-_. _--=-
-::.---

~------

""-~~--=-- ~-_:::
.'

If we choose p,(x, y) =

,~------

2x 4y

--~

~~-~ ~=-~--~:
-:-

dy = 0,

~ ~_:-

_.~-----~_:

-~---=---

-~~

----= '.
-~~~--

"-=-=

-'--=~ -'--_:--:'.
-:-" ~ -~ --_:-:_~

A constant

C=

v'A.

:-

--~~-=:-~

that the differential equation

+ y2) dx + (2x 2 + 3xy) dy =

not exact. If its integrating factor is of the form p,(x, y) = xmyn, determine the values of m
n so that the given differential equation becomes exact. Hence, find the solution for the
:~ginal equation.

..:5

~d

Solutlon

:::=. this example,

and

N= 2x 2 +3xy
aN
-=4x+3y.
ax

- .: :

~-.-~-_._._.::

_...

--:_---=~._
-.

~.-=-~:

- :~-

----~-

aM =2x+2y,
ay

--~-:_=-~-

.~ ~,,~=-~:

M= 2xy+y2

-=::." -- --_.'
-:~-=-_:

..

.-

~_.~.~

:_-~~=

(2xy

--

--=--=

~:-: - ~---~

x 2y= C,

--=-::==:.:

then the original equation becomes

x 4 y 2 = A,

~iow

-~-_:~---=-~-_:-

--~~---

---~==:

---:'o~- _ :=_:~:

which is exact, and its solution is

Example 2.31

~--=--

~~-=- -=-

C constant.

4X3 y2 dx

or

~----'

---~:_=~~-_

In this example, the integrating factor, p,(x, y) can have many forms. Some others
are
3
1
x,
2x y,
32'
x Y

2x 3y,

: :-

2
1
-dx + -dy = 0,
x
Y
which is an exact equation, and its solution is

---:

,.'_.-

C,

-=-~-~_:

-~-=---------==~-

aN.
ax

Xow if the equation is multiplied by the integrating factor p,(x, y) = - , then we have
xy

_. .'

~:_-----=:-:_:

Hence, the given differential equation is not exact.

x2y

--=::::::

--=----_._- ,::

aN = 1.
ax

aM =2,
ay

Remarks

---~---

.'.'

---=

EXACT EQUATIONS

78
So,

Hence, the given equation is not exact.

Multiplying the differential equation with the given integrating factor f.t(x, y) = xmyn, we have

(i)
From this equation, we let
and
If Equation (i) is exact, then

~
oy

or
or

nxmyn-l (2xy

of

oQ

oy

ox

[xmyn (2xy+y2)] =

+ y2) + x myn(2x + 2y) =

~
ox

[xmyn (2x 2 +3xy'l]


)
mxm-1yn (2x 2 + 3xy) + x m yn(4x + 3y)

and after rearranging, it becomes

Notice that this is an identity which applies for all values of x and y. So it is necessary to equate

+ 2 = 3m + 3

and

Solving this simultaneous equation, we obtain m


f.t(Y) = y. Hence, Equation (i) becomes

and its solution is


X

Remarks

y2 + xy3 = A,

The integrating factor f.t

Example 2.32

= xmyn

2n

+ 2 = 2m + 4.

= 0, n = 1 and the integrating factor is

A constant.

also can be used to solve Example 2.30.

Assuming that a suitable integrating factor for the following equation is f.t(x, y) = xf(y), solve
the differential equation

Solution
The given differential equation when multiplied by f.t(x, y) = xf(y) becomes
(2x sirr' y + 3x 2 sin y) f(y) dx + (4x 2 cos y sin 2 y + 2x 3 cos y) f(y) dy = O.

(i)

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

79

From this equation, we let


and
If Equation (i) is exact, then

8P
8y
or

:y [(2x sin 3 y + 3x 2 sin y) f(y)]

or

(2x sin 3 y + 3x 2 sin y)

8Q
8x
=

:x

[(4x 2 cos y sin 2 y + 2x 3 cos y) f(y)]

r (y) + (6x cos y sin

y + 3x 2 cos y) f(y)

= (8x cosy sin 2 y + 6x 2 cos y) f(y).


After rearranging, it becomes

3x 2 [f'(y) sin y - f(y) cos y] = -2x sin 2 y[ (y) sin y - f(y) cos y].
Notice that the equation is true only if

f' (y) sin y - f(y) cos y = 0,


f'(y)
f(y)

or

cosy
siny

f(y) = siny.

which suggests that

Therefore, its integrating factor is /L(x, y) = x sin y. Hence, Equation (i) becomes

and its solution is

x 2 sin? y + x 3 sin 2 y

A,

A constant.

_________,I_Q_u_iz_2_D....'
1.

Determine whether or not the following differential equations are exact.

(a)

(3x 2y + eY ) dx

(b)

(2x

(c)

(2x+3cosy)dx+ (2y-3xsiny)dy =0.

(d)

xdy+(y-e X ) dx=O.

(e)

x(y + 2) dx

(f)

(y

+y -

+ (x 3 + xe Y - 2y) dy = O.
cosy) dx + (4y + x + sinx) dy =

+ y(x + 2) dy =

J x 2x+ y2 )

dx

O.

O.

+ (x +

J x 2Y+ y2 )

dy = O.

80

EXACT EQUATIONS

2. Determine the values of k such that the following differential equations are exact. Hence,
solve the equations.

2x) dx + (3x y2 + 20X2y3) dy = O.

(a)

(y3 + k x y 4

(b)

(2x y2 + ye X) dx + (2x 2y + ke" -1) dy = O.

(c)

(ycosx + kxe- Y

(d)

(cos 2y + kx 2y2) dx + (cos 2y - 2x sin2y - 2x 3y) dy


= O.

2) dx + (sin x - x 2e- Y ) dy
= O.

3. Show that the following equations are exact. Hence, find the solutions.

(a)
(c)

1)

y3 - -

dy

+ -y2
x

dx = O.

(3x 2 - ysinxy) dx - xsinxydy = O.

(tanx - sinxsiny) dx +cOS:l~cosydy

(d)

= O.

4. Solve the following initial value problems.

,5.

(a)

(x + y)2 dx + (2xy + x 2 - 1) dy

(b)

y(O) =

(c)

y cosh (xy) dx + [x cosh (xy) - y] dy = 0,


(3x 2 - 2xy + eY - ye- X) dx + (2y - x 2 + e- x + xe Y ) dy = 0,

(d)

(y2 cos x - 3x 2y - 2x) dx + (2ysinx - x 3


+ lny) dy

y(O)

y(l) = 1.

0,

= 0,

J20.

y(O) = 1.

= e.

Show that the equation

(3xy - 10y)dx + (2x 2 - 10x)dy = 0

is not exact. Using fL(X, y)

= xy as an integrating factor, solve the equation.

6. Show that the equation

(xy+y2 +y)dx+ (x
is not exact. By using the integrating factor fL(X)
7. Given (3xy - 2py2) dx + (x 2 - 2pxy) dy

= 0,

+ 2y) dy = 0
= eX, solve the equation.

p constant.

(a)

Show that the equation is not exact.

(b)

Multiply the equation by f(x) and determine the function f(x) such that the equation
becomes exact.

(c)

Using the function f(x) obtained in (b), find the solution of the original equation.

8. Given the equation (2y2 - 6xy) dx + (3xy - 4x 2) dy


(a)

Show that the equation is not exact.

= O.

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

81

(b)

Multiply the equation by xmyn and determine the values of m and n such that the
equation becomes exact.

(c)

Using the values of m and n obtained in (b), find the solution of the original equation.

9. By assuming the integrating factor !J(x, y) = xf(y), solve the differential equation

(2 sin 2 y

+ 4x 2 sin y)

dx

+ (3x sin y cos y + 2x 3 cos y)

dy = O.

1
10. Use !J(x, y) = - f(y) as the integrating factor to solve the following differential equations.
x
(a)

(2x lnx) dy

+ y dx =

2.

(a) Yes.

(b) No.

(e) No.

(e) 2,

O.

----------------

(d) Yes.

xy3 + 5x 2 y4 - x 2 = A.
ysinx + x 2e- Y 2x = A.

(a) 10,

(1 + xy2) dy

I Answer

---------------1.

~ dx -

(b)

O.

(e)

(f)

No.

(b) 1,

x2y2+yex_y=A.

(d) -3,

xeos2y-x3y2+~sin2y=A.

(b) x+ye x/ y =A.

3.

_
(a) ly4
4

Y... - A
.

x
(e) x 3 + eosxy = A.

(d) -lnleosxl+eosxsiny=A.

4.

(a) (x + y)3 - y(y2 + 3) = 4.


(e) xe" + ye X + x 3 _ x 2y + y2 = 2.

(b) y2 - 2 sinhxy = 20.


(d) y2 sinx-x 3y-x2+ylny-y=0.

.5.

x 2 y2(x - 5)

= A.

(b) f(x)

(b) m=n=1.

9.

xsiny,

10. (a)

6.

= x.

7.
8.

y(x

(e)

y 2 1n x

Y...

(e)

(b)

A.

_ _ _ _ _ _ _1

+ y)e

= A.

x 2y(x - py)

A.

x 2 y2(y - 2x) = A.

(~ + y2

_ 2y

2) eY

1'------

EXERCISE 2

dy
x(l - y)- + y(2 - x) = O.
dx

(a)

2 dy
x dx=y(y-1).

(b)

(c)

dy
dx

(d) 2x -

y
dy

(e) (1 + x) dx

dy
= 1 - 2y
dx

+ 1)'
=

Xv 1 - y.

(f)

dy

vXY dx

= A.

1. Solve the following separable equations.

x(x

Yes.

V4 -

+ Y2
.
x.

82

EXERCISE 2

2.
Using the given substitutions, solve the following differential equations.

3.

4.

5.

(a)

dy
dx = (x

(c)

dy
dx

(x+y-l)2'

(e)

dy
dx

x+y
,
l+x+y

+ 4y)

= x+4y.

(b)

dy
dx = 1 - cos(x - y),

z = x -yo

z=x+y-l.

(d)

2 dy
1
x-=-dx
xy+ 2'

z= xy.

z = x +y.

(f)

dy
dx

x
x

y2 + 2xy
x 2

+ 2y + 1
+ 2y + 3'

z= x

+ 2y.

Solve the following homogeneous equations.


(a)

dy
dx

y3 _ x2y
x 3 + xy2'

(b)

dy
dx

(c)

dy
x - =y(lny-lnx).
dx

(d)

xy _dy = y2 + x2eY/
",
dx

(e)

x(x + y) ~~ = x

(f)

dy

x dx = Y + Vx 2 + y2.

+ xy -

3y2.

Using the given substitutions, solve the following equations.


(a)

dy
dx

2(x - 4)
y-x+6'

x = X +4,

y = Y - 2.

(b)

dy
dx

x - 3y + 2
,
3x - 5y

x = X +~,

y = Y +~.

(c)

dy
dx

y - 5x
2y - x

+ 1,

y=Y-l.

(d)

dy
dx

x+y+3
x-y-5'

x =X + 1,

y = Y -4.

(e)

dy
dx

x + 5y +4
5x - y - 6'

x =X + 1,

y=Y-l.

+6
+ 3'

x = X

Solve the following linear equations.


dy
2
- xy = (1 + x) e",
dx

(a)

(1 + x) -

(c)

dy
(2x - 1) dx

(e)

2
1
dy
2(1+x)dx -(1+2x)y=x (l+x)2.

+ 8y

4
= (2x _ 1)2

(b)

dy
( - -x
)
. -1 x.
d+
2 y=2sm
x
i-x

(d)

(x 2

(f)

dy.
. 2
cos x dx + y sin x = x sm x

dy
x)dx

+y =

(x 2 - x)lnx.

+ x2.

JRDINARY DIFFERESTIAL EQUATIOJYS OF FIRST ORDER

83

Using the given substitutions, reduce the following equations into linear equations. Hence,
find the solutions for the original equations.
(a)

dy
(1 + x)y dx - y2

(c)

(e)

dy
x cos2 Y
- - coty =
dx
siny

x,

:~ + y = x 2y2l n x,

dy

Z = y2.

(b)

xY

Z = y-l.

(d)

:~ + y cot x = y2 sin 2 x,

z = y-l.

1
Z=--.
cosy

(f)

:~ + 1 = 2e- Y sinx,

dx

+y

= smx,

= y2.

eY

Solve the following exact equations.

(a)

xdy

+ (y

- 2x 3 ) dx = O.

(c) (l+l:y)dX+(l+l:X)dY=O.

+ 3cosy)dx + (2y

(b)

(2x

- 3xsiny)dy = O.

(d)

(X;y)2(YdX-Xd Y) =0.

(e) (3x 2 + y2 + 2xy)dx + (3y2 + x 2 + 2xy)dy = O.


"

Using the given integrating factors, solve the following differential equation.
(a)

(y-2x)dx+ (x-xy+x 2)dy=0,

(b) ydx - (x
(c)

J-t

= e:v .

+ y2) dy = 0,

J-t

= y-2.

= x 2dx,
x 2ydy = 0,

J-t

2.

= x
J-t = (x 2 +y2)-2.

xdy - ydx

(d) xy 2dx (e)

ydx

+ xdy + (

(f)

(x 2

+ 2xy -

2y
) dy
1 + cos xy

y2) dx

= 0,

+ (y2 + 2xy -

Consider the equation (5x 2y + 6x 3 y2


(a)

x 2) dy

= 0,

J-t

= 1 + cosxy.

J-t

(x

+ y)-z.

+ 4x y2) dx + (2x 3 + 3x 4y + 3x 2y)

dy = O.

Show that the equation is not exact.

(b) Multiply the equation by xmyn and determine the values of m and n so that the
equation becomes exact.
(c)
~O.

Using the values of m and n obtained in (b), find the solution of the original equation.

Solve each of the following differential equations, given that its integrating factor is of the
form J-t = xmyn.

(c)

2eYdx+ (xe Y+

(e)

(2 y2 - 6xy) dx

2:)

dy=O.

+ (3xy -

4x 2) dy = O.

(d)

y(2x+coshx)dx+2 (x 2 + sinh x) dy = O.

(f)

(2 x y 3

+ 2y)

dx

+ (X2y2 + 2x) dy

O.

EXERCISE 2

84

11. For each of the following equations, determine the most generalised function M(x, y) so
that the equations are exact.
2

(a)

M dx

(c)

M dx

+ (sinxcosy -

(x sec y -

~) dy =

O.

e- X ) dy = O.

+ (xe XY + 2xy + ~)

(b)

1''{ dx

dy = O.

(d)

Mdx+(x 2 - c o s ( x - y ) ) d y = 0 .

12. For each of the following equations, determine the most generalised function N(x, y) so that
the equations are exact.
4x 3y

+ 2) dx + N

(a)

(ye XY

(c)

(If; + ----!--)
+
x

1:

dx

+N

dy = O.
dy = O.

+ e- Y )

(b)

(ycos (xy)

(d)

( 2 sin 2x sin y

(b)

dy
(x +y) - = y.

dx

+N

y)

ln
+ ----;;-

dx

dy = O.

+N

dy = O.

13. Solve the following differential equations.

+ 2) dx + Y(l: + 2) dy

O.

(a)

x(y

(c)

2
3
dy
x--(x+l)y=x - x .
dx

(d)

(2x y 2

(e)

y dy = ex+3y sin 1:.


dx

(f)

x(1

dx

+ 2y) dx + (2x 2y + 2x) dy

+ x)

dy

dx + y = x(1

+ X)2 e- x

O.

14. Solve the following initial value problems.

(a)

(~+ 6x)

(b)

2
2
dy
Y dx - yx = x

(c)

(1 + cos 2x) -

(d)

(4x 2

15. (a)

y(1)

dx - (2 -ln1:) dy = 0,

+ 2x + 21:y,

Y(~7T) =0.

y(O)

0,

= 2.

Using the method of separable variables, find the solution of the differential equation
dy
eX dx
which satisfies the condition y ----.

(b)

O.

y(O) = O.

dy
.
- (1 + e Y ) sm 2x = 0,
dx

+ 8xy + 5y 2 ) dx + y 2dy =

+ xy 2 =

when x ----.

'

00.

Find the general solution of the differential equation


X

dy .
3
dx - 3y = x .

Find also the particular solution in which a turning point is at x = 1. Is it a maximum


or a minimum point?

iJRDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


~6.

(a)

85

Solve the equation


dy
xydx

~ + ~,

(b) Using the substitution y =

= (x + y) 2 .

show that the equation

dy
x 2 - = 1 - 2x 2y2
dx

reduces to a linear equation

dz

4z

---=2.
dx
x

Hence', find the solution for the original equation.


_I.

(a)

Solve the equation

dy

+ 1) -dx + Y = 2x.

x(x

(b)

Using the substitution y2

z ~ x, show that the equation

+ y2 = a

y3 dy + x
dx
reduces to an homogeneous equation

dz

x +z

dx

x - z

Hence, find the solution for the original equation.


~3.

(a)

Using the substitution y

= zx, solve the equation


dy

+ y) dx = x + 2y,

(2x

given that y
(b)

a when x = 1.

Solve the differential equation


dy
x2 dx

~9.

(a)

+ X + (1 -

= O.

Find the general solution of the differential equation


2
2x v

(b)

2x) Y

~~ + k 2 + x 2 = O.

Show that the differential equation


dy
2xydx

Y - x - k

can be reduced to the equation in (a) using the substitution y = vx 1 / 2 . Hence, find its
general solution. Find also the particular solution if the curve of the solution passes
through the point (k, 2k).
20. (a)

Using the substitution y

= xv, where v is a function of x only, solve the equation

86

EXERCISE 2
dy

dx

3x 2y'

given that y = 1 when x = 1.


(b)

Show that

(1 + x2)3/2~ (
dx

VI +x 2

= (1 + x 2)

dy - xy.
dx

Hence, find the solution of the equation


dy
- xy
dx

(1 + x 2) -

+ x 2 ),

x(1

which satisfies the initial condition y = 1 when x = O.


21. (a)

Find the solution of the equation


(x -1) dy +xy
dx

which satisfies the condition y(O)


(b)

(x -1)e X

= o.

When multiplied by j(x), the equation


(5x 2 + 12xy 3y2) dx

+ (3x 2 -

2xy) dy

becomes exact. Find j (x) and hence, solve the original equation.
22. (a)

Solve the differential equation

~
x

dd

= V~2y---;-(x-+-2---;-),

given that y = 0 when x = -2. Give your answer in the form y = j(x).
(b)

Using the substitution z = tan y, show that the equation


dy
.
dx +xsm2y

reduces to equation
dz
dx

+ 2xz =

x .

Hence, find the solution for the original equation.


23. (a)

Find the solution of the differential equation


(1 x 2) y'
.

If Y = 471" when x
(b)

x cos y,

= 1 + cos 2y,

= O.

Solve the differential equation


2
dy
(x +x)dx +y=x+1.

EXERCISE 2

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER


24. (a)

Given that y satisfies the differential equation

+ 2ytanx =

yl

and the initial condition y


(b)

::5. (a)

1 when x

dy .

~1T. Express dx in terms of x.

+3

dy

3x - y

dx

3x - y - 1

Find the solution of differential equation

given that y = 1 when x

= xy(l + y2),

= o.

Solve the differential equation


dy
dx

given y

__ (a)

sinx,

By using the substitution z = 3x - y - 3, or otherwise, find the solution of the equation

(1 - x 2) yl

(b)

87

2xy

+ 1 + x2

= cosx,

= 2 when x = O.

If
dy

x - =y -y
dx

and y = 2 when x = 1, prove that

dy
1 2

=-y
dx
2

(b)

Using the substitution z

= x + y, convert the equation


dy
dx

1 + 2x + 2y
1 - 2x - 2y

to a separable equation in terms of z and x. Hence, or otherwise, find the solution of


the original equation.

a)

Find the general solution of the differential equation


dy
.
-dx
+ -xy = -1
sm
2

-x.
2

If y = 1 when x = 21T, find the limit of y when x approaches zero.

J)

Using the substitution y

= xv, convert the equation


xy dy
dx

= y2 + J x2 + y2

to a separable equation in terms of x and v. Hence, find the solution of the original
equation, if given the condition y = 1 when x = 1.

88

EXERCISE

28. (a)

Solve the differential equation


(x

(b)

+ 1) dy

dx

_ xy

= e 2x.

Given that the equation

+ [1 + (x + y) tan y] dy = 0

has an integrating factor of the form (x + y)n, where n is an integer.


dx

Find the solutior,

of the differential equation.


29. (Bernoulli equation) Using the substitution z

= yl-n, show that the equation

dy +P(x)y=Q(x)yn,
dx

where n

=1=

1 can be reduced to equation

dz

dx

+ (1 -

n) P (x) z = (1 - n) Q (x).

Hence, find the solutions of the following equations.

(a)

dy
cos X dx

.
3
+ y sm
x + 2y =

dy
y3 dx

(b)

+ xy4 =

xe- x,

yeO)

= 2.

30. In an exact equation, the integrating factor JL(x, y) may not be a function of x and y, but

a function in term of either x or y only. If we calculate

~
N

(OM _ON)
ay

ax

as a function of x only, then


JL(x)

= exp { / ~

(ao~ - ~~) dX}

is an integrating factor for M(x,y)dx +N(x,y)dy


-1

= O.

Similarly, if

(ON
- -OM)
ox
ay

is a function of y only, then


JL(y)=ex p { /

~(: - Oo~)dY}

is an integrating factor for M(x,y)dx +N(x,y)dy

= O.

Test the following equations with those integrating factors and hence, solve the equations.

+ 2x 2) dx

- (x - x 2y) dy

(a)

(y

(c)

2dx+(2x-3y-3)dy=O.

= O.

(b)

y(l+xy)dx-xdy=O.

(d)

(5xy+4 y2+1) dx+(x 2+2xy) dy

= O.

EXERCISE 2

ORDINARY DIFFERENTIAL EQUATIONS OF FIRST ORDER

89

:31. The rate of cooling of a body is given by the equation

dT
dt
'
where T is the temperature in degrees Celcius, k is a constant and t is the time in minutes.
When t = 0, T = 90C and when t = 5, T = 60C. Show that when t = 10, T = 41:1; DC.

- = -k (T -10)

t, -=-~.o;::,o:.

Find the solution

According to Newton's law of cooling, the rate at which a body cools is given by the equation

dT

- dt = -k(T-T)
S ,
~-=- '.: ~::',o

equation

where T; is the temperature of the surrounding medium, k is a constant and t is the time
in minutes. If the body cools from 100C to 60C in 10 minutes with the surrounding
temperature of 20C, how long does it need for the body to cool from 100C to 2.5C.
3:3. Under a certain condition, the rate of temperature drop of a cooling body in a medium
of a constant temperature, is proportional to the difference in temperature between the
body and the surrounding medium. Interpret this statement in the form of a differential
equation. If the temperature drop is from 70C to 60C in 3 minutes when the surrounding
temperature is 15C, find

.11(0) = 2.

(a)

the temperature of the body 3 minutes later,

(b)

the time taken for the body to cool from 60C to 40C.

3-1. A body cools from 80C to 50C in 20 minutes. If the room temperature is 100C (assumed
constant) and the rate of cooling of the body, is proportional to the difference in temperature
between the body and the room, find
(a)

the time taken for the body to cool from 80C to 30C,

(b)

the time taken for the body to cool from 50C to 30C.

.35. A particle drops vertically under the influence of gravity and is acted upon by air resistance
kv 2 , where k is a constant. Its velocity v at time t is

dv

dt

=g - kv .

If the particle drops from rest, show that


v

2 a kt
= a(e2 a k t

1)

+1

where a =

V..
~

,.,:

Find the velocity of the particle when the time approaches infinity.

36. The velocity v of a particle moving in a straight line satisfy the equation

"

- :: .-:) =

dd'v = K(8v)4 j 3 ,

,t

o.

:r 2 + 2x y ) dy

= O.

where K is a constant and t is the time. If v = V when t = 0 and v


v in term of t. Find the distance travelled in the interval t = 0 to t

= 8V when t = T, find
= T.

90

EXERCBE2

37. A tank of 1000 litre capacity is used to prepare a mixing solution of salt. Initially, a solution
that contains 1 kg of dissolved salt per litre flows into the tank at the rate of 6 litre/minute.
The mixture is kept uniform by stirring and the well-stirred mixture simultaneously flows
out of the tank at the same rate.
(a)

If y is the amount of salt in the tank, show that the rate of change of salt is given by
dy

dt +

3
500

Y = 6.

(b)

Determine the amount of salt in the tank at any time t.

(c)

Find the time when the concentration of the salt reaches 0.5 per litre.

38. In a chemical process to obtain a substance B from a substance A, every molecule of A is


converted directly to a molecule of B. The rate of increase of the number of molecules of
B at any time is directly proportional to the number of molecules of A at that time. The
number of molecules of A at the initial process is N, and the number of molecules of B at
time t after the process begins is y.
Assuming y as a continuous variable, write down a differential equation to describe the
chemical process. If y = a when t = 0, show that
y = N(l - e- k t ) ,

where k is a positive constant. Sketch the graph of y against t.


If the number of molecules of A and B are the same when t = 50, determine the time has
passed before the number of molecule of B is greater than I9~0 N

39. A chemical reaction is called a second order reaction if the rate of change of x, the quantity
of substance C at time t, is proportional to the product of the quantities of substance A and
substance B that are still present at that instant. The differential equation that represents
this relationship is
dx
= k(a - x)(b - x).

dt

If a = 4, b = 3 and x = a when t
the value of t when x = 2.

= 0, find the value of k. Hence, if x = 1 when t = 3, find

40. In a reversible chemical reaction of second order, the equation of the reaction is
A+B~2C.

If the initial concentrations of A and Bare 1 and 2 respectively, then the rate of formation
of C is given by
dx
2
- = k l ( 1 - : r ) ( 2 - x ) - k 2x,

dt

where x is the concentration of C at time t, while k l and k 2 are constants. Given that
at time t = 0, x = a and in the state of equilibrium (when dx/dt = 0), the value of x
approaches ~, prove that
log
+
= 5k I t .
1- 2x

If x = 0.4 when t = 10, find t when x = 0.49.

(1

X/2)

You might also like