0% found this document useful (0 votes)
154 views7 pages

Ordinary Differential Equations I Lecture (4) First Order Differential Equations

This document discusses linear first order differential equations and methods for solving them. It introduces: - The general form of a first order linear differential equation. - Using an integrating factor to transform the equation into an exact form that can be solved. - The standard form of a linear differential equation and how to find its general solution. - Bernoulli's equation, which is a special case of a first order differential equation, and how to solve it. - Examples demonstrating how to set up and solve specific linear first order differential equations.

Uploaded by

Wisal muhammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views7 pages

Ordinary Differential Equations I Lecture (4) First Order Differential Equations

This document discusses linear first order differential equations and methods for solving them. It introduces: - The general form of a first order linear differential equation. - Using an integrating factor to transform the equation into an exact form that can be solved. - The standard form of a linear differential equation and how to find its general solution. - Bernoulli's equation, which is a special case of a first order differential equation, and how to solve it. - Examples demonstrating how to set up and solve specific linear first order differential equations.

Uploaded by

Wisal muhammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Ordinary Differential Equations I

Lecture (4)
First Order Differential equations

6. Linear Differential Equation


The general form of the first order linear differential equation in the dependent variable y is
𝑑𝑦
𝑎0 (𝑥) + 𝑎1 (𝑥)y = 𝑎2 (𝑥) …………. (1)
𝑑𝑥

where 𝑎0 (𝑥) ≠ 0

Dividing by 𝑎0 (𝑥) we get


𝑑𝑦 𝑎1 (𝑥) 𝑎2 (𝑥)
+ (𝑥)
y=
𝑑𝑥 𝑎0 𝑎0 (𝑥)

𝑑𝑦
⇒ + 𝑝(𝑥)𝑦 = 𝑄(𝑥) …………. (2)
𝑑𝑥

𝑎1 (𝑥) 𝑎2 (𝑥)
Where 𝑝(𝑥) = 𝑎𝑛𝑑𝑄(𝑥) =
𝑎0 (𝑥) 𝑎0 (𝑥)

The equation (2) is the standard form of the linear differential equation in the dependent variable
y and independent variable x.

every first-order linear differential equation can be solved in a similar fashion by multiplying
both sides of Equation 2 by 𝜇 a suitable function called an integrating factor which is always a
function of independent variable alone.

Suppose that there exist for equation (2) an integrating factor 𝜇(𝑥),a function of x alone, then
𝑑𝑦
𝜇(𝑥) ( + 𝑝(𝑥)𝑦) = 𝜇(𝑥)𝑄(𝑥)
𝑑𝑥

Or
𝜇(𝑥)𝑑𝑦 + (𝜇(𝑥)𝑝(𝑥)𝑦 − 𝜇(𝑥)𝑄(𝑥))𝑑𝑥 = 0 …………. (3)
Must be an exact equation. So, we have

Lecture: Hakima Kh. Ahmed 1


𝜕𝑁 𝑑𝜇
𝑁(𝑥, 𝑦) = 𝜇(𝑥) ⇒ =
𝜕𝑥 𝑑𝑥

and
𝜕𝑀
𝑀(𝑥, 𝑦) = 𝜇(𝑥)𝑝(𝑥)𝑦 − 𝜇(𝑥)𝑄(𝑥) ⇒ = 𝜇(𝑥)𝑝(𝑥)
𝜕𝑦

So, equation (3) is exact if


𝜕𝑁 𝜕𝑀
=
𝜕𝑥 𝜕𝑦
𝑑𝜇
⇒ = 𝜇(𝑥)𝑝(𝑥) …………. (4)
𝑑𝑥

Integrating equation (4) with respect to x, we get

𝜇(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 …… (5)


Integrating equation (3) with respect to x, we get
1
𝑦= [∫ 𝜇(𝑥)𝑄(𝑥) dx] ……. (6)
𝜇(𝑥)

Thus, a formula for the general solution to Equation (2) is provided by Equation (6), where
𝜇(𝑥) is given by Equation (5).

Example (1): solve the following differential equation:


𝑑𝑦 2 𝑑𝑥
𝐴) + 𝑦=𝑥 𝐵) + 2𝑡𝑥 = 𝑥 + 4𝑡 − 2 .
𝑑𝑥 𝑥 𝑑𝑡

Solution:
𝒅𝒚 𝟐
A) + 𝒚=𝒙
𝒅𝒙 𝒙
2
𝑝(𝑥) = 𝑄(𝑥) = 𝑥
𝑥
2
𝜇(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 ∫𝑥 𝑑𝑥 = 𝑥 2
1 1 1 1 𝑥4 1 𝑐
𝑦= [∫ 𝜇(𝑥)𝑄(𝑥) dx] = [ 𝑥 2 (𝑥)dx] =
2 ∫
[ 𝑥 3 dx] =
2 ∫ 2
[ + 𝑐] = 𝑥 2 +
𝜇(𝑥) 𝑥 𝑥 𝑥 4 4 𝑥2
𝒅𝒙
𝑩) + 𝟐𝒕𝒙 = 𝒙 + 𝟒𝒕 − 𝟐
𝒅𝒕

𝑑𝑥
+ (2𝑡 − 1)𝑥 = 4𝑡 − 2
𝑑𝑡

𝑝(𝑡) = (2𝑡 − 1) 𝑄(𝑡) = 4𝑡 − 2

Lecture: Hakima Kh. Ahmed 2


2 −𝑡
𝜇(𝑡) = 𝑒 ∫ 𝑝(𝑡)𝑑𝑡 = 𝑒 ∫(2𝑡−1)𝑑𝑡 = 𝑒 𝑡

1
𝑥= [∫ 𝜇(𝑡)𝑄(𝑡) dt]
𝜇(𝑡)
1 2 −𝑡 1 2 −𝑡 1 2 −𝑡
𝑥= 2 [∫ 𝑒 𝑡 (4𝑡 − 2)dt] = 2 [2 ∫(2𝑡 − 1)𝑒 𝑡 dt] = 2 [2𝑒 𝑡 + 𝑐]
𝑒 𝑡 −𝑡 𝑒 𝑡 −𝑡 𝑒 𝑡 −𝑡

2
Example 2: find the general solution of the equation 𝑦𝑑𝑥 + (3 − 𝑦)𝑥𝑑𝑦 = − 𝑑𝑦.
𝑦

Solution:

Since the product 𝑦 𝑑𝑦 appear here, the equation is not linear in y. it is however linear in x.

therefor we arrange the terms as in


𝑑𝑥 3 2
+ ( − 1) 𝑥 = −
𝑑𝑦 𝑦 𝑦2

Now
3 2
𝑝(𝑦) = ( − 1) , 𝑄(𝑦) = −
𝑦 𝑦2
3
∫(𝑦−1)𝑑𝑦
𝜇(𝑦) = 𝑒 ∫ 𝑝(𝑦)𝑑𝑦 = 𝑒 = 𝑒 3 ln(𝑦)−𝑦 = 𝑦 3 𝑒 −𝑦
1
𝑥= [∫ 𝜇(𝑦)𝑄(𝑦) dy]
𝜇(𝑦)
1 3 −𝑦
2 1
= 3 −𝑦
[∫ 𝑦 𝑒 (− 2
) dy] = 3 −𝑦
[−2 ∫ 𝑦𝑒 −𝑦 𝑑𝑦]
𝑦 𝑒 𝑦 𝑦 𝑒

Let 𝑢 = 𝑦 → 𝑑𝑢 = 𝑑𝑦

𝑑𝑣 = 𝑒 −𝑦 𝑑𝑦 → 𝑣 = −𝑒 −𝑦
1 1
⇒𝑥 = [−2(−𝑦𝑒 −𝑦 + ∫ 𝑒 −𝑦 𝑑𝑦)] = [−2(−𝑦𝑒 −𝑦 − 𝑒 −𝑦 + 𝑐)]
𝑦 3 𝑒 −𝑦 𝑦 3 𝑒 −𝑦

1 2 2 𝐶
= [(2𝑦𝑒 −𝑦 + 2𝑒 −𝑦 + 𝐶] = + +
𝑦 3 𝑒 −𝑦 𝑦2 𝑦3 𝑦 3 𝑒 −𝑦

7. Bernoulli’s Equation
The first order first degree differential equation of the form

𝑑𝑦
+ 𝑝𝑦 = 𝑄𝑦 𝑛 , 𝑛 ≠ 0,1 …………. (1)
𝑑𝑥

Lecture: Hakima Kh. Ahmed 3


where 𝑝 and 𝑄 are function of 𝑥 is known as Bernoulli’s Equation.

𝑑𝑦
When n = 0, it reduces to a linear differential equation( + 𝑝(𝑥)𝑦 = 𝑄(𝑥)) when n = 1, it
𝑑𝑥

𝑑𝑦
reduces to variable separable type( = (−𝑝(𝑥) + 𝑄(𝑥)𝑦)). For any other value of n, the
𝑑𝑥

equation is non-linear. In this case, the equation (1) can be re-written as

In this case, the equation (1) can be re-written as


𝑑𝑦
𝑦 −𝑛 + 𝑝𝑦1−𝑛 = 𝑄 …………. (2)
𝑑𝑥

Let 𝑢 = 𝑦1−𝑛 …………. (3)


1 𝑑𝑢 𝑑𝑦
∴ = 𝑦 −𝑛 …………. (4)
1−𝑛 𝑑𝑥 𝑑𝑥

Substituting equation (3) and equation (4) in equation (2), we get


1 𝑑𝑢
+𝑝𝑢 =𝑄
1−𝑛 𝑑𝑥
𝑑𝑢
+ (1 − 𝑛) 𝑝 𝑢 = (1 − 𝑛)𝑄(𝑥)
𝑑𝑥

Which is linear equation with dependent variable u and hence can be solved.
𝑑𝑦
Example (1): solve cos(𝑥) − sin(𝑥) 𝑦 = 𝑦 3 𝑐𝑜𝑠 2 (𝑥) .
𝑑𝑥

Solution:
𝑑𝑦
cos(𝑥) − sin(𝑥) 𝑦 = 𝑦 3 𝑐𝑜𝑠 2 (𝑥)
𝑑𝑥

Dividing the equation by 𝑐𝑜𝑠(𝑥), we get


𝑑𝑦 sin(𝑥)
− 𝑦 = cos(𝑥) 𝑦 3 …………. (*)
𝑑𝑥 cos(𝑥)

This is Bernoulli’s form.


Multiplying by 𝑦 −3 , we get
𝑑𝑦 sin(𝑥)
𝑦 −3 − 𝑦 −2 = cos(𝑥)
𝑑𝑥 cos(𝑥)

Let 𝒖 = 𝒚−𝟐
𝒅𝒖 𝒅𝒚 𝒅𝒚 𝟏 𝒅𝒖
∴ = −𝟐𝒚−𝟑 ⟹ 𝒚−𝟑 =−
𝒅𝒙 𝒅𝒙 𝒅𝒙 𝟐 𝒅𝒙

∴The equation (*) becomes

Lecture: Hakima Kh. Ahmed 4


1 𝑑𝑢 sin(𝑥)
− − 𝑢 = cos(𝑥)
2 𝑑𝑥 cos(𝑥)
𝑑𝑢 sin(𝑥)
+2 𝑢 = −2 cos(𝑥)
𝑑𝑥 cos(𝑥)

This is first order linear equation


sin(𝑥)
𝑝(𝑥) = 2 𝑄(𝑥) = −2 cos(𝑥)
cos(𝑥)
sin(𝑥)
∫2 𝑑𝑥
𝜇(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 =𝑒 cos(𝑥) = 𝑒 −2 ln(𝑐𝑜𝑠(𝑥)) = (cos(𝑥))−2
1 1
𝑢= [∫ 𝜇(𝑥)𝑄(𝑥) dx] = [∫(𝑐𝑜𝑠(𝑥))−2 (−2 𝑐𝑜𝑠(𝑥) )𝑑𝑥]
𝜇(𝑥) (𝑐𝑜𝑠(𝑥))−2

= 𝑐𝑜𝑠 2 (𝑥) [−2 ∫(𝑐𝑜𝑠(𝑥))−1 𝑑𝑥] = 𝑐𝑜𝑠 2 (𝑥) [−2 ∫ 𝑠𝑒𝑐(𝑥) 𝑑𝑥]

= 𝑐𝑜𝑠 2 (𝑥) [−2 𝑙𝑛(𝑠𝑒𝑐(𝑥) + 𝑡𝑎𝑛(𝑥)) + 𝑐]


𝑢 = −2 𝑙𝑛(𝑠𝑒𝑐(𝑥) + 𝑡𝑎𝑛(𝑥)) 𝑐𝑜𝑠 2 (𝑥) + 𝑐 𝑐𝑜𝑠 2 (𝑥)
The general solution is
𝑦 −2 = −2 𝑙𝑛(𝑠𝑒𝑐(𝑥) + 𝑡𝑎𝑛(𝑥)) 𝑐𝑜𝑠 2 (𝑥) + 𝑐 𝑐𝑜𝑠 2 (𝑥)
Example (2): Solve 𝑦 ′ = 5𝑦 + 𝑒 −2𝑥 𝑦 −2
Solution
𝑦 ′ − 5𝑦 = 𝑒 −2𝑥 𝑦 −2 ………..(*)

This is Bernoulli’s form.


Multiplying by 𝑦 2 , we get
𝑦 2 𝑦 ′ − 5𝑦 3 = 𝑒 −2𝑥
Let 𝒖 = 𝒚𝟑
𝒅𝒖 𝟏 𝒅𝒖
∴ = 𝟑𝒚𝟐 𝒚′ ⟹ 𝒚𝟐 𝒚′ =
𝒅𝒙 𝟑 𝒅𝒙

∴The equation (*) becomes


1 𝑑𝑢
− 5𝑢 = 𝑒 −2𝑥
3 𝑑𝑥
𝑑𝑢
− 15 𝑢 = 3𝑒 −2𝑥
𝑑𝑥

This is first order linear equation


𝑝(𝑥) = −15 𝑄(𝑥) = 3𝑒 −2𝑥

Lecture: Hakima Kh. Ahmed 5


𝜇(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 ∫ −15 𝑑𝑥 = 𝑒 −15𝑥
1 1
𝑢= [∫ 𝜇(𝑥)𝑄(𝑥)dx] = −15𝑥 [3 ∫(𝑒 −15𝑥 3𝑒 −2𝑥 )dx]
𝜇(𝑥) 𝑒
1 1 3𝑒 −17𝑥
= −15𝑥
[3 ∫ 𝑒 −17𝑥 dx] = −15𝑥
[− + 𝑐]
𝑒 𝑒 17
3
𝑢=− 𝑒 −2𝑥 + 𝑐𝑒 15𝑥
17

Since 𝑢 = 𝑦 3 , the general solution is


3
𝑦3 = − 𝑒 −2𝑥 + 𝑐𝑒 15𝑥
17

Note: If equation is of type


𝑑𝑦
𝑔′ (𝑦) + 𝑝(𝑥)𝑔(𝑦) = 𝑄(𝑥)
𝑑𝑥

where P, Q are functions of x


Then put
Let 𝒗 = 𝒈(𝒚)
𝒅𝒗 𝒅𝒚
⇒ = 𝒈′ (𝒚)
𝒅𝒙 𝒅𝒙

∴ equation becomes
𝑑𝑣
+ 𝑝(𝑥)𝑣 = 𝑄(𝑥)
𝑑𝑥

which is linear differential equation with dependent variable v and hence can be solved.
𝑑𝑦 2
Example (1): solve 2𝑦𝑐𝑜𝑠(𝑦 2 ) − sin(𝑦 2 ) = (1 + 𝑥)2
𝑑𝑥 𝑥+1

Solution:
𝑑𝑦 2
2𝑦𝑐𝑜𝑠(𝑦 2 ) − sin(𝑦 2 ) = (1 + 𝑥)2
𝑑𝑥 𝑥+1

Let 𝒗 = 𝒔𝒊𝒏(𝒚𝟐 )
𝒅𝒗 𝒅𝒚
⇒ = 𝟐𝒚𝒄𝒐𝒔(𝒚𝟐 )
𝒅𝒙 𝒅𝒙

∴ equation becomes
𝑑𝑣 2
− 𝑣 = (1 + 𝑥)2
𝑑𝑥 𝑥+1

This is linear equation, here


1
𝑝(𝑥) = −2 𝑄(𝑥) = (1 + 𝑥)2
𝑥+1

Lecture: Hakima Kh. Ahmed 6


−2
1
𝜇(𝑥) = 𝑒 ∫ 𝑝(𝑥)𝑑𝑥 = 𝑒 ∫𝑥+1𝑑𝑥 = 𝑒 −2 𝑙𝑛(𝑥+1) = (1+𝑥)2
1 1 1
𝑣= [∫ 𝜇(𝑥)𝑄(𝑥)dx] = [∫ (1 + 𝑥)2 𝑑𝑥]
𝜇(𝑥) 1 (1 + 𝑥) 2
( 2 )
(1 + 𝑥)
= (1 + 𝑥)2 [∫ 𝑑𝑥] = (1 + 𝑥)2 [𝑥 + 𝑐]
𝑣 = 𝑥(1 + 𝑥)2 + 𝑐(1 + 𝑥)2
Since 𝑣 = sin(𝑦 2 ), then the general solution is
sin(𝑦 2 ) = 𝑥(1 + 𝑥)2 + 𝑐(1 + 𝑥)2
Exercise:
Q (1) Solve the following linear equation:
𝑑𝑦 1 𝑑𝑦 3𝑥 2 𝑦 1+𝑥 2
1) (1 + 𝑥 2 ) + 4𝑥𝑦 = (1+𝑥 2) 3) + =
𝑑𝑥 𝑑𝑥 1+𝑥 3 1+𝑥 3

2) 𝑦 ′ − sin(2𝑥) = 𝑦𝑐𝑜𝑡(𝑥) 4) (𝑥 + 2𝑦 2 )
𝑑𝑦
=𝑦
𝑑𝑥
𝑑𝑦
5) (1 + 𝑥 2 )𝑡𝑎𝑛−1 (𝑥) + 𝑦 = 𝑥 given that 𝑦 = −1 when 𝑥 = −1
𝑑𝑥

Q (2) Solve the following equations:


1. (𝑦𝑙𝑛(𝑥) − 2)𝑦 𝑑𝑥 − 𝑥𝑑𝑦 = 0 𝑑𝑦
2. (1 − 𝑥 2 ) − 𝑥𝑦 = 𝑥 2 𝑦 2
𝑑𝑥

3. 𝑑𝑦 − 2𝑦𝑡𝑎𝑛(𝑥)𝑑𝑥 − 𝑦 2 𝑡𝑎𝑛2 (𝑥)𝑑𝑥 = 0 4. 𝑥


𝑑𝑦
+ 𝑦 = 𝑦 2 ln(𝑥)
𝑑𝑥
𝑑𝑦
5. 3x(1 − x 2 )𝑦 2 + (2𝑥 2 − 1)𝑦 3 = 𝑎𝑥 3
𝑑𝑥

References
Dennis G. Zill, (2016), A First Course in Differential Equations with Modeling Application
(11𝑡ℎ Edition).
William E. Boyce, Richard C. Diprima, Douglas B. Meade, (2017) Elementary Differential
Equations and Boundary Value Problems (11𝑡ℎ Edition)

Lecture: Hakima Kh. Ahmed 7

You might also like