You are on page 1of 61

FIRST ORDER

DIFFERENTIAL EQUATIONS

In this lecture we discuss various methods


of solving first order differential equations.
These include:
Variables separable
Homogeneous equations
Exact equations
Equations that can be made exact by
multiplying by an integrating factor

y f ( x, y )
Linear

Non-linear

Integrating Factor

Integrating
Factor

Separable Homogeneous Exact


Transform to separable

Transform to
Exact

Variables Separable
The first-order differential equation

dy
f x, y
dx

(1)

is called separable provided that f(x,y)


can be written as the product of a
function of x and a function of y.

Suppose we can write the above equation as

dy
g ( x ) h( y )
dx
We then say we have separated the
variables. By taking h(y) to the LHS, the
equation becomes

1
dy g ( x)dx
h( y )
Integrating, we get the solution as

1
dy

g
(
x
)
dx

c
h( y )
where c is an arbitrary constant.

dy
y
Example 1. Consider the DE
dx
Separating the variables, we get
1
dy dx
y
Integrating we get the solution as
ln | y | x k
or y ce , c an arbitrary constant.
x

Example 2. Consider the DE


3

x
3 x ln y dx dy 0
y
2

Separating the variables, we get


1
3
dy dx
ln y y
x
Integrating we get the solution as
ln | ln y | 3 ln x k
c
or ln y 3 , c an arbitrary constant.
x

Homogeneous equations
Definition A function f(x, y) is said to be
homogeneous of degree n in x, y if

f (tx, ty ) t f ( x, y ) for all t, x, y


n

Examples f ( x, y ) x 2 xy y
is homogeneous of degree 2.
y
yx
f ( x, y ) sin(
)
x
x
is homogeneous of degree 0.
2

A first order DE M ( x, y ) dx N ( x, y ) dy 0
is called homogeneous if M ( x, y ) , N ( x, y )
are homogeneous functions of x and y of the
same degree.
This DE can be written in the form
dy
f ( x, y )
dx

where f ( x, y ) M ( x, y ) / N ( x, y ) is
clearly homogeneous of degree 0.

The substitution y = z x converts the given


equation into variables separable form and
hence can be solved. (Note that z is also a (new)
variable,) We illustrate by means of examples.

Example 3. Solve the DE

(3x y ) dy 2 xy dx 0
2

That is

dy
2 xy

2
2
dx (3 x y )

Let y = z x. Hence we get


2

dz
2z x
2z
zx

2
2 2
2
dx (3 x z x ) (3 z )

dz
2z
z z
x

z
2
2
dx (3 z )
(3 z )
3

or

Separating the variables, we get

(3 z )
dx
dz
3
z z
x
Integrating we get
2

(3 z )
dx
z 3 z dz x
2

We express the LHS integral by partial


fractions. We get

3
1
1
dx

dz

ln
c
z z 1 z 1
x
3

or z ( z 1)( z 1) cx, c an arbitrary constant.


Noting z = y/x, the solution is:

( y x)( y x) c y , c an arbitrary constant


3

or

x y c y , c an arbitrary constant
2

Working Rule to solve a HDE:


1. Put the given equation in the form

M ( x, y )dx N ( x, y )dy 0 (1)


2. Check M and N are Homogeneous
function of the same degree.

3. Let y zx.

4. Differentiate y = z x to get

dy
dz
zx
dx
dx
5. Put this value of dy/dx into (1) and
solve the equation for z by separating
the variables.
6. Replace z by y/x and simplify.

Example 4. Solve the DE


y
yx
y sin(
)
x
x
Let y = z x. Hence we get
dz
dz
sin z
zx
z sin z or x
dx
dx
Separating the variables, we get 1 dz dx
sin z
x
Integrating we get cosec z cot z = c x
y
where z and c an arbitrary constant.
x

Non-homogeneous equations
We shall now see that some equations can
be brought to homogeneous form by
appropriate substitution.
Example 5 Solve the DE

(2 x y 1) dx ( x 3 y 2) dy 0
dy
(2 x y 1)

That is
dx
( x 3 y 2)

We shall now put x = u+h, y = v+k


where h, k are constants ( to be chosen).
Hence the given DE becomes

dv
(2u v 2h k 1)

du
(u 3v h 3k 2)
We now choose h, k such that
2h k 1 0
h 3k 2 0

Hence
1
3
h , k
5
5

Hence the DE becomes

dv
(2u v)

du
(u 3v)
which is homogeneous in u and v.
Let v = z u. Hence we get
dz
(2 z )
z u

du
(1 3 z )

dz
(2 z )
(2 2 z 3z )

z
or u
du
(1 3 z )
(1 3z )
2

Separating the variables, we get


(1 3 z )
du
dz
2
2 2 z 3z
u
Integrating we get u (2 2 z 3 z ) c
2

i.e. 2u 2uv 3v c
1
3
3 2
2
or 2( x 1/ 5) 2( x )( y ) 3( y ) c
5
5
5
2

Example 6 Solve the DE

(6 x 4 y 3) dx (3 x 2 y 2) dy 0
That is

dy
(6 x 4 y 3)

dx
(3 x 2 y 2)

Now the previous method does not work as


the lines
6x 4 y 3 0

3x 2 y 2 0
are parallel. We now put u = 3x + 2y.

The given DE becomes


1 du
(2u 3)
( 3)
2 dx
(u 2)
or

du
(4u 6) u
3

dx
(u 2) u 2

Separating the variables, we get

u2
du dx
u

u2
du dx
u
Integrating, we get

u ln u x c
2

i.e.

3 x 2 y ln (3 x 2 y ) x c
2

EXACT DIFFERENTIAL EQUATIONS


A first order DE M ( x, y ) dx N ( x, y ) dy 0
is called an exact DE if there exits a function
f(x, y) such that

df M ( x, y ) dx N ( x, y ) dy
Here df is the total differential of f(x, y)
and equals f
f
dx dy
x
y

Hence the given DE becomes df = 0


Integrating, we get the solution as
f(x, y) = c, c an arbitrary constant
Thus the solution curves of the given DE are
the level curves of the function f(x, y) .
Example 8 The DE y dx x dy 0
is exact as it is d (xy) = 0
Hence the solution is: x y = c

Example 7 The DE

x dx y dy 0

is exact as it is d (x2+ y2) = 0


Hence the solution is: x2+ y2 = c
Example 9 The DE

1
x
x
x
sin( ) dx 2 sin( ) dy 0
y
y
y
y

x
is exact as it is d (cos( ) ) 0
y
Hence the solution is: cos( x ) c
y

Test for exactness


Suppose

M ( x, y ) dx N ( x, y ) dy 0

is exact. Hence there exists a function f(x, y)


such that
f
f
M ( x, y ) dx N ( x, y ) dy df dx dy
x
y
f
f
M,
N
Hence
x
y
Assuming all the 2nd order mixed derivatives
of f(x, y) are continuous, we get

M
f
f
N

y
yx xy x
2

Thus a necessary condition for exactness is

M N

y
x

We saw a necessary condition for exactness is

M N

y
x
We now show that the above condition is
also sufficient for M dx + N dy = 0 to be
exact. That is, if M N

y
x
then there exists a function f(x, y) such that
f
f
M,
N
x
y

f
Integrating
M partially w.r.t. x, we get
x
f ( x, y ) M dx g ( y ) . (*)
x

where g(y) is a function of y alone

f
N
We know that for this f(x, y),
y
Differentiating (*) partially w.r.t. y, we get
f

M dx g ( y ) = N gives
y y x

or

g ( y ) N M dx
y x

(**)

We now show that the R.H.S. of (**) is


independent of x and thus g(y) (and so f(x, y))
can be found by integrating (**) w.r.t. y.

N M dx x x y M dx
x
y x
x

N
N
=
0


M
dx

x y
x y x x

Q.E.D.

Note (1) The solution of the exact DE d f = 0


is f(x, y) = c.
Note (2) When the given DE is exact, the
solution f(x, y) = c is found as we did in the
previous theorem. That is, we integrate M
partially w.r.t. x to get f ( x, y ) M dx g ( y )
x

We now differentiate this partially w.r.t. y and


equating to N, find g (y) and hence g(y).
The following examples will help you in
understanding this.

Example 8 Test whether the following DE


2
is exact. If exact, solve it.
( x )dy y dx 0
y

2
Here M y, N ( x )
y
M
N
1
y
x

Hence exact.

Now f ( x, y ) M dx y dx xy g ( y )
x

Differentiating partially w.r.t. y, we get


f
2
x g ( y ) N x
y
y
2
Hence g ( y )
y
Integrating, we get g ( y ) 2ln | y |
(Note that we have NOT put the arb constant )
Hence f ( x, y ) xy g ( y ) xy 2ln | y |
Thus the solution of the given d.e. is
f ( x, y ) c or xy 2ln | y | c, c an arb const.

Example 9 Test whether the following DE


is exact. If exact, solve it.

(2 x y sin y ) dx (4 x y x cos y ) dy 0
4

Here M 2 xy sin y, N 4 x y x cos y


4

M
N
3
8 xy cos y
y
x

Hence exact.

Now f ( x, y ) M dx (2 xy sin y ) dx
4

x y x sin y g ( y )
2

Differentiating partially w.r.t. y, we get


f
2 3
4 x y x cos y g ( y )
y
2 3
N 4 x y x cos y Hence g ( y ) 0
Integrating, we get g ( y ) 0
(Note that we have NOT put the arb constant )
Hence
2 4
2 4
f ( x, y ) x y x sin y g ( y ) x y x sin y
Thus the solution of the given d.e. is
2 4
f ( x, y ) c or x y x sin y c, c an arb const.

In the above problems, we found f(x, y) by


integrating M partially w.r.t. x and then
f
to N .
equated
y
We can reverse the roles of x and y. That is
we can find f(x, y) by integrating N partially
f
to M .
w.r.t. y and then equate
x
The following problem illustrates this.

Example 10 Test whether the following DE


is exact. If exact, solve it.

(1 y sin 2 x)dx 2 y cos x dy 0


2

Here M 1 y sin 2 x, N 2 y cos x


M

N
2 y sin 2 x;
4 y cos x sin x 2 y sin 2 x
y
x
Hence exact.
2
Now f ( x, y ) N dy 2 y cos x dy
2

y cos x g ( x)
2

Differentiating partially w.r.t. x, we get


f
2
2
2 y cos x sin x g ( x) y sin 2 x g ( x)
x
2
g ( x) 1
M 1 y sin 2 x gives
Integrating, we get g ( x) x
(Note that we have NOT put the arb constant )
Hence
2
2
2
2
f ( x, y ) y cos x g ( x) y cos x x
Thus the solution of the given d.e. is
2
2
f ( x, y ) c or x y cos x c, c an arb const.

Integrating Factors
The DE ( x y 1) dx ( x xy ) dy 0
2

is NOT exact but becomes exact when


1 as it becomes
multiplied by
x
1
( y ) dx ( x y ) dy 0
x
1 2

i.e. d xy ln x y 0
2

1
is an Integrating Factor of the
We say
x
given DE

Definition If on multiplying by (x, y), the DE

M dx N dy 0
becomes an exact DE, we say that (x, y)
is an Integrating Factor of the above DE
1 1 1
, 2 , 2 are all integrating factors of
xy x y
the non-exact DE y dx x dy 0
We give some methods of finding integrating
factors of an non-exact DE

Problem Under what conditions will the DE

M dx N dy 0
have an integrating factor that is a function
of x alone ?
Solution. Suppose = h(x) is an I.F.
Multiplying by h(x) the above d.e. becomes

h( x) M dx h( x) N dy 0 .......(*)
Since (*) is an exact DE, we have

( h( x ) M ) ( h( x ) N )
y
x

i.e. h( x) y M y h( x) h( x) x N x h( x)
or
or

or

M
N
h( x )
M 0 h( x )
N h( x)
y
x
M N
h( x)(

) N h( x)
y x
M N

y x h( x)

N
h( x )

M N

y x
g ( x)
Hence if
N
is a function of x alone, then
g ( x ) dx

is an integrating factor of the given DE

M dx N dy 0

Rule 2: Consider the DE M dx N dy 0


M N

y x
h( y ) , a function of y alone,
If
M
h ( y ) dy

then
is an integrating factor of the given DE

Problem Under what conditions will the DE

M dx N dy 0
have an integrating factor that is a function
of the product z = x y ?
Solution. Suppose = h(z) is an I.F.
Multiplying by h(z) the above d.e. becomes

h( z ) M dx h( z ) N dy 0 .......(*)
Since (*) is an exact DE, we have

( h( z ) M ) ( h( z ) N )
y
x

M
h( z ) h( z )
N h( z )
i.e. h( z )
y
y
x
x
or
M
N
h( z )
M h( z ) x h( z )
N h( z ) y
y
x
or h( z )( M N ) h( z )( Ny Mx)
y x
or

M N

y x h( z )

Ny Mx h( z )

M N

y x
g ( z)
Hence if
Ny Mx
is a function of z = x y alone, then
g ( z ) dz

is an integrating factor of the given DE

M dx N dy 0

Example 11 Find an I.F. for the following


DE and hence solve it.

( x 3 y ) dx 2 xy dy 0
2

Here

M ( x 3 y ); N 2 xy
2

M
N
6y 2y
y
x
Hence the given DE is not exact.

Now

M N

y x

6 y 2 y 2 g ( x),

x
2 xy

a function of x alone. Hence


g ( x ) dx

e
e

2
dx
x

is an integrating factor of the given DE


Multiplying by x2, the given DE becomes

( x 3x y ) dx 2 x y dy 0
3

2 2

which is of the form M dx N dy 0


Note that now

M ( x 3x y ); N 2 x y
3

2 2

Integrating, we easily see that the solution is


4

x
3 2
x y c,
4

c an arbitrary constant.

Example 12 Find an I.F. for the following


DE and hence solve it.

e dx (e cot y 2 y csc y ) dy 0
x

M e ; N e cot y 2 y csc y
M
N
x
0 e cot y
y
x

Here

Hence the given DE is not exact.

M N

y x

Now
M

0 e cot y
cot
y

h
(
y
),

x
e
x

a function of y alone. Hence

h ( y ) dy

cot y dy

sin y

is an integrating factor of the given DE


Multiplying by sin y, the given DE becomes

e sin y dx (e cos y 2 y ) dy 0
x

which is of the form M dx N dy 0


Note that now

M e sin y ; N e cos y 2 y
x

Integrating, we easily see that the solution is

e sin y y c,
x

c an arbitrary constant.

Example 13 Find an I.F. for the following


DE and hence solve it.

y dx ( x 2 x y ) dy 0
2 3

M y ; N x 2x y
M
N
3
1 1 4 xy
y
x

Here

2 3

Hence the given DE is not exact.

Now M N

y x

Ny Mx

1 (1 4 xy )

2 4
( xy 2 x y ) xy
3

2
2
g ( z ),
xy
z
a function of z =x y alone. Hence
g ( z ) dz

e
e

2
dz
z

1
1
2 2 2
z
x y

is an integrating factor of the given DE

1
Multiplying by 2 2 , the given DE becomes
xy
1
1
d
x

2
y
)
d
y

0
2
2
xy
xy
which is of the form

M dx N dy 0

Integrating, we easily see that the solution is

1 2
y c,
xy

c an arbitrary constant.

Problem Under what conditions will the DE

M dx N dy 0
have an integrating factor that is a function
of the sum z = x + y ?
Solution. Suppose = h(z) is an I.F.
Multiplying by h(z) the above DE becomes

h( z ) M dx h( z ) N dy 0 .......(*)
Since (*) is an exact DE, we have

( h( z ) M ) ( h ( z ) N )
y
x
M

i.e. h( z )
M
h( z ) h( z )
N h( z )
y
y
x
x
M
N
or h( z )
M h( z ) h( z )
N h( z )
y
x
M N

) h( z )( N M )
or h( z )(
y x
M N

y x h( z )
or

N M
h( z )

M N

y x
g ( z)
Hence if
N M
is a function of z = x + y alone, then
g ( z ) dz

is an integrating factor of the given DE

M dx N dy 0

You might also like