ODE Class-1 Lecture Sheet
ODE Class-1 Lecture Sheet
Mohin Uddin
Department of Mathematics
Bangladesh University of Engineering and Technology, BUET
1
Here, the highest derivative is of second order. So, this equation is said to be a
second-order O.D.E.
( )
d2 y 3
(ii) dn2
+ a2 y = 0
Degree of an O.D.E.
The degree of the highest ordered derivative involved in a differential equation is
called the degree of the differential equation, when it has been made free from
fractions and negative.
Examples:
( )2
d2 x dx
(i) dt2
+2 dt
+ 7x = 0
d2 x
The highest derivative dt2
is raised to a power 1. So the differential equation is of
degree 1.
√
d2 y dy
(ii) dx2
+ x dx + y = cos x
Explicit Solution:
If the function y = f (x) is the solution of a differential equation of variables x and y,
then the solution is called an explicit solution.
Implicit Solution:
If the function F (x, y) = 0 is the solution of a differential equation of variables x and
y, then it is called an implicit solution.
Example:
x2 + y 2 = c is an implicit solution of the equation 2x dx + 2y dy = 0.
2
General or Complete Solution:
If the solution of any nth order differential equation contains n arbitrary constants,
then the solution is called the general solution of the differential equation.
Particular Solution:
The solution obtained for the definite values of the arbitrary constants of the general
solution is called the particular solution of the differential equation.
Singular Solution:
If any other solution except the general or particular solution of a differential equation
exists, then it is called a singular solution of the differential equation.
Solution:
Given,
( )
dy
ln = ax + by
dx
dy
⇒ = eax+by
dx
dy
⇒ = eax · eby
dx
⇒e−by dy = eax dx
∫ ∫
⇒ eax dx − e−by dy = 0 [Integrating]
eax e−by
⇒ + +C =0
a b
⇒beax + ae−by + A = 0 [A = abc]
Ans.
3
Problem-2: Solve: y dx − x dy = xy dx
Solution:
Given,
y dx − x dy = xy dx
⇒y(1 − x) dx = x dy
1−x dy
⇒ dx =
x y
( )
1 dy
⇒ − 1 dx =
x y
∫ ( ) ∫
1 dy
⇒ − 1 dx = [Integrating]
x y
⇒ ln x − x = ln y + c
( )
x
⇒ ln =x+c
y
Ans.
Another Solution:
y dx − x dy = xy dx
y dx − x dy
⇒ = dx
xy
dx dy
⇒ − = dx
x y
⇒ ln x − ln y = x + c [Integrating]
( )
x
⇒ ln =x+c
y
Ans.
4
Given,
( )
−1 dy
sin =x+y
dx
dy
⇒ = sin(x + y)
dx
dv
⇒ − 1 = sin v
dx Let, x + y = v
dv dy dv
⇒ = 1 + sin v ⇒1+ =
dx dx dx
dv dy dv
⇒ = dx ⇒ = −1
1 + sin v dx dx
1 − sin v
⇒ dv = dx
cos2 v
⇒(sec2 v − sec v tan v)dv = dx
⇒ tan v − sec v = x + c (Integrating)
⇒ tan(x + y) − sec(x + y) = x + c
Ans.
Solution:
Given,
Problem-5: Solve: (x + y) dy + (x − y) dx = 0
5
Solution:
Given,
(x + y) dy + (x − y) dx = 0
⇒ x dy + y dy + x dx − y dx = 0
1
⇒ x dy − y dx + d(x2 + y 2 ) = 0
2
x dy − y dx d(x2 + y 2 )
⇒ + =0
x2 + y 2 2(x2 + y 2 )
x dy−y dx
d(x2 + y 2 )
⇒ x2
( )2 + =0
1 + xy 2(x2 + y 2 )
( )
y
d x d(x2 + y 2 )
⇒ ( )2 + =0
1+ y 2(x2 + y 2 )
x
( )
−1 y 1
⇒ tan + ln(x2 + y 2 ) = c
x 2
Which is the required solution.
Note -1: ( ) ( )
d y x dy − y y x dy − y dx
= dx 2 , d =
dx x x x x2
Note-2:
1 d 2 2 1 dy dy x dx + y dy 1
(x +y ) = (2x+2y ) = x+y = ⇒ d(x2 +y 2 ) = x dx+y dy
2 dx 2 dx dx dx 2
6
( )
dy y y
Problem 1: Solve: dx
= x
+ tan x
[NTRCA(College: 14,10th; School:15th)]
Solution:
Given,
( )
dy y y
= + tan
dx x x
dv vx
⇒v+x = + tan(v)
dx x
dv
⇒v+x = v + tan(v)
dx
dv Let, y = vx
⇒x = tan v dy dv
dx ⇒ =v+x
dx dx dx
⇒ cot v dv =
x
⇒ ln(sin v) = ln x + ln c [Integrating]
⇒ sin v = cx
( )
y
⇒ sin = cx,
x
Which is the required solution.
(x2 + y 2 ) dx = 2xy dy
dy (x2 + y 2 )
⇒ =
dx 2xy
dv x2 + v 2 x2 1 + v2
⇒v+x = =
dx 2x · vx 2v
2
dv 1+v
⇒x = −v
dx 2v
dv 1 − v2
⇒x =
dx 2v Let, y = vx
2v dx
⇒ dv = dy dv
1−v 2 x ⇒ =v+x
2v dx dx dx
⇒ 2 dv + =0
v −1 x
⇒ ln(v 2 − 1) + ln x = ln c [Integrating]
⇒ x(v 2 − 1) = c
( )
y2
⇒x 2 −1 =c
x
( )
⇒ y 2 − x2 = cx
⇒ y 2 − x2 = cx
7
Which is the required solution.
Problem-3: Solve: (x + y) dy + (x − y) dx = 0
[NTRCA(College: 4th)]
Solution:
Given,
(x + y) dy + (x − y) dx = 0
dy x + y
⇒ + =0
dx x − y
dv x − vx
⇒v+x + =0
dx x + vx
dv 1 − v
⇒v+x + =0
dx 1 + v
dv v(1 + v) + 1 − v
⇒x + =0
dx 1+v
dv 1 + v 2 Let, y = vx
⇒x + =0
dx 1+v dy dv
1+v dx ⇒ =v+x
⇒ v dv + =0 dx dx
1+v 2 x
1 v dx
⇒ dv + dv + =0
1 + v2 1 + v2 x
1
⇒ tan−1 v + ln(1 + v 2 ) + ln x = c
2 √
( ) ( )2
y y
⇒ tan−1 + ln + 1 · x = c
x x
( ) √
−1 y
⇒ tan + ln (x2 + y 2 ) = c
x
Which is the required solution.
Example:
y dx + x dy = 0
⇒y dx + x dy = d(xy) = 0
ex cos y dy + ex sin y dx = 0
⇒d(ex sin y) = 0
8
Necessary and sufficient condition for the exactness of the differential equation M dx+
N dy = 0 is
∂M ∂N
=
∂y ∂x
Where,
∂u
M=
∂x
and
∂u
N=
∂y
Solution:
Given,
(2x + 3y + 6) dy = (6x − 2y − 7) dx
⇒(6x − 2y − 7) dx + (−2x − 3y + 6) dy = 0
Here,
M = 6x − 2y − 7, N = −2x − 3y + 6
∂M ∂N
= −2, = −2
∂y ∂x
∂M ∂N
Since, ∂y
= ∂x
, the given differential equation is exact.
∫ ∫
M dx + N dy = c
y constant x free
∫ ∫
⇒ (6x − 2y − 7) dx + (−3y + 6) dy = c
y constant
2 ∫
x
⇒6 · − 2xy − 7x + (−3y + 6) dy = c
2 ∫
⇒3x2 − 2xy − 7x + (−3y + 6) dy = c
3
⇒3x2 − 2xy − y 2 + 6y = c
2
⇒6x − 4xy − 3y 2 − 14x + 12y = c1
2
Ans.
9
Problem-2: Solve: (x3 + 3xy 2 ) dx + (y 3 + 3x2 y) dy = 0
[NTRCA(School – 10th)]
Solution:
Here,
M = x3 + 3xy 2 , N = y 3 + 3x2 y
∂M ∂N
= 6xy, = 6xy
∂y ∂x
∂M ∂N
Since ∂y
= ∂x
, the given differential equation is exact.
∫ ∫
M dx + N dy = c
y constant x free
∫ ∫
⇒ 3 2
(x + 3xy ) dx + y 3 dy = c
y constant
x4 3 y4
⇒ + x2 y 2 + =c
4 2 4
⇒x4 + 6x2 y 2 + y 4 = c1
Ans.
Another form:
dx
+ P (y)x = Q(y)
dy
If Q(x) = 0, then it will be called a first order homogeneous equation; otherwise,
non-homogeneous linear differential equation.
10
Then the Integrating Factor (I.F) will be:
∫
P (x) dx
I.F = e
Solution:
∫ ∫ ∫
P (x) dx P (x) dx
ye = Q(x)e dx
∫
2 2
⇒ yex = xex dx + c
1∫ z
= e dz + c Let, x2 = z, ⇒ 2xdx = dz
2
1 z 1
= e +c ⇒ xdx = dz
2 2
1 x2
= e +c
2
1
+ ce−x
2
⇒y=
2
Which is the required solution.
dy
Problem-2: Solve: (1 + x2 ) dx + y = tan−1 x
[NTRCA(College-6th)]
Solution:
Given,
dy
(1 + x2 ) + y = tan−1 x
dx
11
Which can be written as,
dy y tan−1 x
⇒ + =
dx 1 + x2 1 + x2
1 tan−1 x
Here, P (x) = 1+x2
, Q(x) = 1+x2
∫ ∫ 1
dx −1
Now, I.F. = e P (x) dx = e 1+x2 = etan x
Problem-3: Solve: (1 − x2 ) dx
dy
− xy = 1
[NTRCA(College-14th)]
Solution:
Given,
dy
(1 − x2 ) − xy = 1
dx
Which can be written as,
dy x 1
⇒ − · y =
dx 1 − x2 1 − x2
−x 1
Here, P (x) = 1−x2
, Q(x) = 1−x2
∫ ∫ −x √ √
dx 1 2
Now, I.F. = e P (x) dx
=e 1−x2 = e 2 ln(1−x ) = eln( 1−x2 )
= 1 − x2
Required solution is:
∫ ∫ ∫
P (x) dx
ye Q(x)e P (x) dx dx
=
√ ∫ √
1 − x2
⇒ y 1 − x2 = dx ∫
∫
1 − x2 1
1 Here, √ dx = sin−1 x
= √ dx 1−x 2
1 − x2
= sin−1 x + c
√
⇒ y 1 − x2 = sin−1 x + c
12
Which is the required solution.
dy
Problem-4: Solve: cos2 x + y = tan x
dx
Solution:
Given,
dy
cos2 x + y = tan x
dx
Which can be written as,
dy 1 1
+ 2
·y = · tan x
dx cos x cos2 x
dy
⇒
+ sec2 x · y = sec2 x · tan x
dx
Which is a linear differential equation of order one.
Bernoulli’s Equation:
dy
The differential equation of the form dx
+ P y = Q(x)y n is called a Bernoulli equa-
tion.
13
Now, divide both sides by y n , which gives:
dy
y −n + P (x)y 1−n = Q(x)
dx
Now let:
dz dy
z = y 1−n ⇒ = (1 − n)y −n
dx dx
Which eventually reduced to a linear differential equation of some function of y.
Then, we can easily solve the reduced linear differential equation by known methods.
Solution:
Given,
dy
+ y = ex y 2
dx
Which can be written as,
1 dy 1
⇒ + = ex
y 2 dx y
( )
d 1 1
⇒− − = −ex
dx y y
( )
d 1 1
⇒ − = −ex
dx y y
Now, ∫ ∫
−1 dx
I.F. = e P (x) dx
=e = e−x
Required solution is:
1 −x ∫
· e = −ex · e−x dx
y ∫ 1
Let, u =
= −1 dx = −x + c y
1 du
⇒ = ex (−x + c) = (c − x)ex ⇒ − u = −ex
y dx
1 This is a linear ODE in u
⇒y=
(c − x)ex
14
Or, equivalently:
(c − x)y = e−x Ans.
dy 3
Problem-2: Solve: x dx + y = (xy) , 2 y(1) = 4
[BUET–18]
Solution:
dy 1
y− 2 + y− 2 · = x 2
3 1 1
dx x
Which gives:
( ) 1
d −1 1 x2
y− 2 = −
1
(y 2 ) + −
dx 2x 2
Which is a linear differential equation in y − 2 of order one.
1
Integrating Factor:
∫ −1/2 1
− 2x
= e− 2 ln x = eln x
1 1
I.F. = e dx
=√
x
General Solution is:
∫
− 121 x1/2 1
y ·√ = − · √ dx
x 2 x
Let: u = y − 2
1
∫
1 x
= − dx = − + c du 1 x1/2
2 2 Then: − u=−
1 x dx 2x 2
⇒ √ =− +c
xy 2
Using Initial Condition: x = 1, y = 4
1 1 1 1
√ =− +c⇒ =− +c⇒c=1
1·4 2 2 2
Particular Solution:
1 x
√ =− +1 Ans.
xy 2
Problem-3: Solve: (1 − x2 ) dx
dy
+ xy = xy 2 ; (1 > x)
[NTRCA(College: 10th)]
15
Solution:
Given,
dy
(1 − x2 )
+ xy = xy 2
dx
1 dy x 1 x
⇒ 2 + · =
y dx 1 − x y2 1 − x2
1 dy x 1 x
⇒− − · =−
y dx 1 − x y
2 2 1 − x2
( )
d 1 x 1 −x
⇒ − · =
dx y 1−x y
2 1 − x2
( )
1
This is a linear differential equation of y
of order one.
−x −x
Here, P (x) = , Q(x) =
1 − x2 1 − x2
Integrating Factor:
∫ ∫ −x
P dx dx
I.F = e =e 1−x2
1
∫ −2x
dx
=e 2 1−x2
1 2 √
= e 2 ln(1−x ) = 1 − x2
Similarly, √
(1 − y) x2 − 1 = cy when x > 1
16
Modeling with First Order Differential Equations:
Let the population of a city be x at any fixed time t. Since the rate of increase is
proportional to the quantity,
dx dx
∝x⇒ = kx (1)
dt dt
Separating variables:
dx
= k dt
x
Let at t = 0, the quantity is x0 , and after t = 50, the quantity becomes 2x0 . Then
integrating both sides,
∫ 2x0
dx ∫ 50
= k dt
x0 x 0
[ln x]2x0 50
x0 = k [t]0
⇒ ln 2x0 − ln x0 = k · 50
( )
2x0
⇒ ln = 50k
x0
⇒ ln 2 = 50k
Therefore,
ln 2
k=
50
Now,
At t = 0, let x = x0 and at t = t, x = 3x0 .
∫ 3x0
dx ∫ t
= k dt
x0 x 0
kt = ln(3x0 ) − ln(x0 )
( )
3x0
kt = ln = ln 3
x0
ln 2
From earlier, we had k = 50
, so:
17
50kt = 50 ln 3
t · ln 2 = 50 ln 3
50 ln 3
t=
ln 2
t ≈ 79 (years)
The End
18