First Order Differential Equations
First Order Differential Equations
First Order Differential Equations
DIFFERENTIAL EQUATIONS
Basic Concepts
Ordinary Differential Equations
Anunknown function (dependent variable) y
of one independent variable x
dy
y cos x
dx
y 4 y 0
x 2 yy 2e x y ( x 2 2) y 2
Page
2
Basic Concepts
2 z
2x y
xy
Page
3
Basic Concepts
Theorder of a differential
equation is the order of the
highest derivative that appears in
the equation.
x3 y xy ( x 2 n2 ) y 0 Order 2
dy 1
2 Order 1
dx x y 2
d2y 3
( 2 ) y4 1 Order 2
dx Page
4
Basic Concept
The first-order differential equation contain only y’
F ( x, y , y ' ) 0
or y ' F ( x, y ) (*)
A solution of a given first-order differential equation (*)
on some open interval a<x<b is a function y=h(x)
that has a derivative y’=h(x) and satisfies (*) for all
x in that interval.
Page
5
Basic Concept
Example : Verify the solution
xy' 2y
y
2
x
Page
6
Basic Concepts
Explicit Solution
y h (x )
Implicit Solution
H ( x, y ) 0
Page
7
Basic Concept
General solution vs. Particular
solution
y ' cosx
y sinx c
c 3,2,....
General solution
arbitrary constant c
Particular solution
Page
choose a specific c 8
Basic Concept
Singular solutions
Def : A differential equation may sometimes have an additional
solution that cannot be obtained from the general solution and
is then called a singular solution.
y' xy ' y 0
2
Example
Page
9
Basic Concepts
y ky
General Solution
y(t ) ce kt
y(t ) 2e kt
Page
10
Basic Concept
Page
11
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
Transform to separable Exact
Variables Separable
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
h( y )
dy g ( x ) dx c
or y ce x , c an arbitrary constant.
Separable Differential Equations
Example : 9 yy 4 x 0
Sol:
Page
18
Separable Differential Equations
Example : y 1 y 2
Sol:
Page
19
Separable Differential Equations
Page
20
Example. Consider the DE
3
x
3x ln y dx dy 0
2
y
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
2 2
is homogeneous of degree 2.
y yx
f ( x, y) sin( )
x x
is homogeneous of degree 0.
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. Solve the DE
(3x y ) dy 2 xy dx 0
2 2
dy 2 xy
That is
dx (3x y )
2 2
or x y c y , c an arbitrary constant
2 2 3
Working Rule to solve a HDE:
1. Put the given equation in the form
M ( x, y )dx N ( x, y )dy 0 (1)
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. Solve the DE
i.e. 2u 2uv 3v c
2 2
1 3 3 2
or 2( x 1/ 5) 2( x )( y ) 3( y ) c
2
5 5 5
Example Solve the DE
(6 x 4 y 3) dx (3x 2 y 2) dy 0
dy (6 x 4 y 3)
That is
dx (3x 2 y 2)
u ln u x c
2
i.e.
3x 2 y ln (3x 2 y) x c
2
EXACT DIFFERENTIAL EQUATIONS
A first order DE M ( x, y ) dx N ( x, y ) dy 0
Now f ( x, y ) M dx y dx xy g ( y )
x x
Differentiating partially w.r.t. y, we get
f 2
x g ( y ) N x
y y
Hence g ( y ) 2
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. 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 2 3
M N
8 xy cos y
3
Hence exact.
y x
Now f ( x, y ) M dx (2 xy 4 sin y ) dx
x x
x y x sin y g ( y)
2 4
Differentiating partially w.r.t. y, we get
f
4 x y x cos y g ( y )
2 3
y
N 4 x y x cos y Hence g ( y ) 0
2 3
Integrating, we get g ( y ) 0
(Note that we have NOT put the arb constant )
Hence
f ( x, y) x y x sin y g ( y) x y x sin y
2 4 2 4
M N
2 y sin 2 x; 4 y cos x sin x 2 y sin 2 x
y x
Hence exact.
Now f ( x, y) N dy 2 y cos x dy
2
y y
y cos x g ( x)
2 2
Differentiating partially w.r.t. x, we get
f
2 y cos x sin x g ( x) y sin 2 x g ( x)
2 2
x
M 1 y sin 2 x gives
2
g ( x) 1
Integrating, we get g ( x) x
(Note that we have NOT put the arb constant )
Hence
f ( x, y) y cos x g ( x) y cos x x
2 2 2 2
e g ( x ) dx
then e
h ( y ) dy
e g ( z ) dz
Here M ( x 3 y ); N 2 xy
2
M N
6y 2y
y x
Hence the given DE is not exact.
M N
y x 6y 2y 2
Now g ( x),
N 2 xy x
a function of x alone. Hence
2
dx
e x
g ( x ) dx
e x 2
M N
0 e cot y
x
y x
Now cot y h ( y ),
M e x
e sin y y c,
x 2
c an arbitrary constant.
Example. Find an I.F. for the following DE
and hence solve it.
y dx ( x 2 x y ) dy 0
2 3
Here M y ; N x 2x y 2 3
M N
1 1 4 xy
3
y x
Ny Mx ( xy 2 x y ) xy
2 4
2 2
g ( z ),
xy z
a function of z =x y alone. Hence
2
e g ( z ) dz
e 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
2
d x ( 2
2 y ) d y 0
xy xy
which is of the form M dx N dy 0
e g ( z ) dz
dy
a1 ( x) a0 ( x) y b( x), (1)
dx
where a1(x), a0(x), and b(x) depend only
on the independent variable x, not on y.
We assume that the function a1(x), a0(x),
and b(x) are continuous on an interval
and that a1(x) 0 on that interval. Then,
on dividing by a1(x), we can rewrite
equation (1) in the standard form
dy
P( x) y Q( x) (2)
dx
where P(x), Q(x) are continuous functions
on the interval.
Let’s express equation (2) in the differential
form P( x) y Q( x) dx dy 0 (3)
( x) y ( x)Q( x)dx C
and solving for y yields
y exp P( x)dx ( x)Q( x)dx C
Working Rule to solve a LDE:
1. Write the equation in the standard form
dy
P( x) y Q( x)
dx
2. Calculate the IF (x) by the formula
( x) exp P( x)dx
3. Multiply the equation in standard form
by (x) and recalling that the LHS is just
d
( x) y , obtain
dx
d
( x) y ( x)Q( x)
dx
dy
x cos x y x sin x cos x 1
dx
Solution :- Dividing by x cos(x), throughout,
we get
dy 1 sec x
tan x y
dx x x
1
P ( x ) dx tan x dx
( x) e e x
d sec x
y x sec x x sec x
dx x
Integrate both side we get
y x xy cot x xy' 0.
Ans.: xy sin x sin x x cos x c.
dy
The usual notation dx implies that x is independent
variable & y the dependent variable. Sometimes it is
helpful to replace x by y and y by x & work on the
resulting equation.
* When diff equation is of the form
P y . x Q y
dx
dy
IF e P y dy
& solution is x IF Q IF dy c
Example. Solve
y xy ' y ' y e2 y
y x y e
2 ydy
dx
dx
y x y e 2 y
dy
dx 1
x ye y
dy y
1
dy
ln y 1
IF e y
e
y
1 1
x y e dy e dy
y y
y y
x
e c
y
y
x y e cy y