MODULE NO.
5
LINEAR DIFFERENTIAL EQUATIONS
LINEAR DIFFERENTIAL EQUATIONS OF FIRST ORDER
A differential equation 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0 is said to be
linear if its degree is one and if it does not contain a product term
between the dependent variable 𝑦 and its derivative.
The standard forms of linear differential equations are:
𝑑𝑦
i. + 𝑃 𝑥 𝑦 = 𝑄 𝑥 ; where 𝑃 and 𝑄 are functions of 𝑥 alone
𝑑𝑥
𝑑𝑥
ii. + 𝐺 𝑦 𝑥 = 𝐻 𝑦 ; where 𝐺 and 𝐻 are functions of 𝑦 alone
𝑑𝑦
SOLUTION OF LINEAR DIFFERENTIAL EQUATIONS
For the solution of linear differential equations, consider the
following steps:
𝑑𝑦
a. Transform + 𝑃 𝑥 𝑦 = 𝑄 𝑥 into 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0.
𝑑𝑥
𝑑𝑦 + 𝑃 𝑥 𝑦𝑑𝑥 = 𝑄 𝑥 𝑑𝑥
or
𝑃 𝑥 𝑦 − 𝑄(𝑥) 𝑑𝑥 + 𝑑𝑦 = 0
b. Test for exactness.
𝑀=𝑃 𝑥 𝑦−𝑄 𝑥 ; 𝑁 =1
𝜕𝑀 𝜕𝑁
=𝑃 𝑥 ; = 0; differential equation is not exact
𝜕𝑦 𝜕𝑥
c. Determine the integrating factor.
Let 𝐼(𝑥) be the integrating factor hence,
𝑃 𝑥 𝐼 𝑥 𝑦 − 𝑄 𝑥 𝐼(𝑥) 𝑑𝑥 + 𝐼 𝑥 𝑑𝑦 = 0 must be exact
𝜕𝑀 𝜕𝑁 𝑑 𝐼(𝑥)
=𝑃 𝑥 𝐼 𝑥 = =
𝜕𝑦 𝜕𝑥 𝑑𝑥
𝑑
𝐼(𝑥)
𝑃 𝑥 = 𝑑𝑥
𝐼(𝑥)
𝑑 𝐼(𝑥)
න 𝑃 𝑥 𝑑𝑥 = න
𝐼(𝑥)
= ln 𝐼(𝑥)
or
𝑒 ln 𝐼(𝑥) = 𝑒 𝑥𝑑 𝑥 𝑃
𝐼 𝑥 = 𝑒 𝑥𝑑 𝑥 𝑃
d. The solution will be
𝑑𝑦 𝑥𝑑 𝑥 𝑃
𝑒 + 𝑃 𝑥 𝑦𝑒 𝑃 𝑥 𝑑𝑥
= 𝑄 𝑥 𝑒𝑃 𝑥 𝑑𝑥
𝑑𝑥
or
𝑑 𝑦𝑒 𝑃 𝑥 𝑑𝑥
= 𝑄(𝑥)𝑒 𝑃 𝑥 𝑑𝑥
𝑑𝑥
Integrating both sides results to
𝑥𝑑 𝑥 𝑃
𝑦𝑒 𝑃 𝑥 𝑑𝑥 = න𝑄 𝑥 𝑒 𝑑𝑥 + 𝐶
Similarly;
𝑦𝑑 𝑦 𝐺
𝑥𝑒 𝐺 𝑦 𝑑𝑦 = න𝐻 𝑦 𝑒 𝑑𝑦 + 𝐶
EXAMPLES
Solve the following differential equations.
𝑑𝑦
a. + 𝑦 = 𝑒𝑥
𝑑𝑥
Solution:
𝑃 𝑥 = 1 ; 𝑄 𝑥 = 𝑒𝑥
For 𝐼(𝑥)
𝐼 𝑥 = 𝑒 𝑥𝑑 𝑥 𝑃
= 𝑒 1 𝑑𝑥
𝐼 𝑥 = 𝑒𝑥
Hence
𝑦𝑒 𝑥 = න 𝑒 𝑥 𝑒 𝑥 𝑑𝑥 + 𝐶
= න 𝑒 2𝑥 𝑑𝑥 + 𝐶
1 2𝑥
𝑦𝑒 𝑥 = 𝑒 +𝐶
2
1 2𝑥
𝑦𝑒 𝑥
= 𝑒 + 𝐶] 2𝑒 −𝑥
2
2𝑦 = 𝑒 + 𝐶1 𝑒 −𝑥 ← 𝐴𝑛𝑠𝑤𝑒𝑟 ; 𝐶1 = 2𝐶
𝑥
b. 𝑦 − 3𝑥 + 𝑥𝑦 cot 𝑥 𝑑𝑥 + 𝑥𝑑𝑦 = 0
Solution:
𝑑𝑦 1
𝑥 + 𝑦 − 3𝑥 + 𝑥𝑦 cot 𝑥 = 0]
𝑑𝑥 𝑥
𝑑𝑦 𝑦
+ − 3 + 𝑦 cot 𝑥 = 0
𝑑𝑥 𝑥
or
𝑑𝑦 1
+ + cot 𝑥 𝑦 = 3
𝑑𝑥 𝑥
1
𝑃 𝑥 = + cot 𝑥 ; 𝑄 𝑥 = 3
𝑥
For 𝐼(𝑥)
𝐼 𝑥 = 𝑒𝑃 𝑥 𝑑𝑥
1
𝑥 + cot 𝑥 𝑑𝑥
= 𝑒
ln 𝑥 + ln sin 𝑥
=𝑒 = 𝑒 ln 𝑥 sin 𝑥
𝐼 𝑥 = 𝑥 sin 𝑥
Hence
𝑦 𝑥 sin 𝑥 = න 3𝑥 sin 𝑥𝑑𝑥 + 𝐶
𝑢 = 𝑥 ; න 𝑑𝑣 = න sin 𝑥𝑑𝑥
𝑑𝑢 = 𝑑𝑥 ; 𝑣 = − cos 𝑥
𝑦 sin 𝑥 = −3𝑥 cos 𝑥 + 3 න cos 𝑥𝑑𝑥 + 𝐶
𝑥𝑦 sin 𝑥 = −3(𝑥 cos 𝑥 − sin 𝑥) + 𝐶 ← 𝐴𝑛𝑠𝑤𝑒𝑟
𝑑𝑥
c. 𝑦 − 2𝑥 = 3𝑦 2 − 2
𝑑𝑦
Solution:
𝑑𝑥 2
1
𝑦 − 2𝑥 = 3𝑦 − 2]
𝑑𝑦 𝑦
𝑑𝑥 2𝑥 2
− = 3𝑦 −
𝑑𝑦 𝑦 𝑦
2 2
𝐺 𝑦 = − ; 𝐻 𝑦 = 3𝑦 −
𝑦 𝑦
For 𝐼(𝑦)
𝐼 𝑦 = 𝑒𝐻 𝑦 𝑑𝑦
2
𝑦𝑑 𝑦
−
𝐼 𝑦 = 𝑒
= 𝑒 −2 ln 𝑦
1
𝐼 𝑦 = 2
𝑦
Hence
1 2 1
𝑥 2 = න 3𝑦 − 2
𝑑𝑦 + 𝐶
𝑦 𝑦 𝑦
3 2
=න − 3 𝑑𝑦 + 𝐶
𝑦 𝑦
𝑥 1
2
= 3 ln 𝑦 + 2 + 𝐶
𝑦 𝑦
or
𝑥 = 𝑦 2 ln 𝑦 3 + 1 + 𝐶𝑦 2 ← 𝐴𝑛𝑠𝑤𝑒𝑟
EXERCISE NO. 6
Solve the following differential equations.
−𝑥 2
1. 𝑑𝑦 + 2𝑥𝑦𝑑𝑥 = 𝑥𝑒 𝑑𝑥
𝑑𝑦 𝑦
2. + = 𝑥 3 − 3𝑥
𝑑𝑥 𝑥
𝑑𝑦
3. = csc 𝑥 − 𝑦 cot 𝑥
𝑑𝑥
4. 𝑦 − cos 2 𝑥 𝑑𝑥 + cos 𝑥𝑑𝑦 = 0
5. 𝑦 ln 𝑦𝑑𝑥 + 𝑥 − ln 𝑦 𝑑𝑦 = 0
𝑑𝑦
6. 𝑦 cot 𝑥 = 2𝑥 − 𝑥 2 cot 𝑥
𝑑𝑥
𝑑𝑦
7. sin 2𝑥 − 2𝑦 = −2 cos 𝑥
𝑑𝑥
8. 1 + 𝑡 2 𝑑𝑠 + 2𝑡 𝑠𝑡 2 − 3 1 + 𝑡 2 2 𝑑𝑡 = 0 ; when 𝑡 = 0, 𝑠 = 2
𝑑𝑦
9. 𝑥 − 2𝑦 = 𝑥 3 cos 4𝑥 ; when 𝑥 = 𝜋, 𝑦 = 1
𝑑𝑥
𝑑𝑦 2
𝜋
10. − 𝑦 cot 𝑥 = tan 𝑥 ; when 𝑥 = , 𝑦 = 2
𝑑𝑥 4
𝑑𝑦 cos 𝑥
𝜋
11. + 𝑦 cot 𝑥 = 5𝑒 ; when 𝑥 = , 𝑦 = 1
𝑑𝑥 2
𝑑𝑦
12. + 𝑦 = sin 𝑥 ; when 𝑥 = 0, 𝑦 = 1
𝑑𝑥
BERNOULLI’S EQUATIONS
When the differential equation takes the form:
𝑑𝑦
+ 𝑃 𝑥 𝑦 = 𝑄(𝑥)𝑦 𝑛
𝑑𝑥
or
𝑑𝑥
+ 𝐺 𝑦 𝑥 = 𝐻(𝑦)𝑥 𝑛
𝑑𝑦
then it is said to be a Bernoulli’s type of differential equation.
SOLUTION OF A BERNOULLI’S EQUATION
For the solution of Bernoulli’s equation, the procedures are
as follows:
a. Consider the differential equation
𝑑𝑦
+ 𝑃 𝑥 𝑦 = 𝑄 𝑥 𝑦𝑛 → 1
𝑑𝑥
b. Multiply both sides by 𝑦 −𝑛 thus,
−𝑛
𝑑𝑦
𝑦 + 𝑃 𝑥 𝑦 (1− 𝑛) = 𝑄 𝑥 ; which is non − linear
𝑑𝑥
c. Transform into linear form.
Let:
𝑧 = 𝑦 (1 − 𝑛)
𝑑𝑧 −𝑛
𝑑𝑦
= (1 − 𝑛)𝑦
𝑑𝑥 𝑑𝑥
or
1 𝑑𝑧 −𝑛
𝑑𝑦
=𝑦 → (2)
(1 − 𝑛) 𝑑𝑥 𝑑𝑥
d. Substitute (2) in (1)
1 𝑑𝑧
+ 𝑃 𝑥 𝑧 = 𝑄 𝑥 ; which is now linear
(1 − 𝑛) 𝑑𝑥
e. The solution will be;
𝑧𝑒 𝑃 𝑥 𝑑𝑥
= න 𝑄 𝑥 𝑒𝑃 𝑥 𝑑𝑥
𝑑𝑥 + 𝐶
f. Evaluate, then substitute back the original variables.
EXAMPLES
Solve the following differential equations.
𝑑𝑦 𝑦
a. 2 − = 5𝑥 3 𝑦 3
𝑑𝑥 𝑥
Solution:
Multiply both sides by 𝑦 −3 , hence
−3
𝑑𝑦 1 −2
2𝑦 − 𝑦 = 5𝑥 3
𝑑𝑥 𝑥
Let:
𝑧 = −𝑦 −2
𝑑𝑧 −3
𝑑𝑦
= 2𝑦
𝑑𝑥 𝑑𝑥
Hence
𝑑𝑧 𝑧
+ = 5𝑥 3
𝑑𝑥 𝑥
1
𝑃 𝑥 = ; 𝑄 𝑥 = 5𝑥 3
𝑥
For 𝐼(𝑥)
𝐼 𝑥 = 𝑒𝑃 𝑥 𝑑𝑥
1
𝑥𝑑 𝑥
=𝑒
= 𝑒 ln 𝑥
𝐼 𝑥 =𝑥
Thus
𝑧𝑥 = න 5 𝑥 3 𝑥 𝑑𝑥 + 𝐶
= 5 න 𝑥 4 𝑑𝑥 + 𝐶
𝑧𝑥 = 𝑥 5 + 𝐶
or
−𝑦 −2 𝑥 = 𝑥 5 + 𝐶] −𝑦 2
𝑥 = −𝑥 5 𝑦 2 + 𝐶1 𝑦 2 ← 𝐴𝑛𝑠𝑤𝑒𝑟 ; 𝐶1 = −𝐶
b. 𝑑𝑦 + 𝑦𝑑𝑥 = 2𝑥𝑦 −2 𝑒 𝑥 𝑑𝑥
Solution:
𝑦 −2
Multiply both sides by , hence
𝑑𝑥
𝑑𝑦
𝑦 −2 + 𝑦 −1 = 2𝑥𝑒 𝑥
𝑑𝑥
Let:
𝑧 = y −1
𝑑𝑧 −2
𝑑𝑦
= −𝑦
𝑑𝑥 𝑑𝑥
Hence
𝑑𝑧
− + 𝑧 = 2𝑥𝑒 𝑥
𝑑𝑥
or
𝑑𝑧
− 𝑧 = −2𝑥𝑒 𝑥
𝑑𝑥
𝑃 𝑥 = −1 ; 𝑄 𝑥 = −2𝑥𝑒 𝑥
For 𝐼(𝑥)
𝐼 𝑥 = 𝑒 𝑥𝑑 𝑥 𝑃
= 𝑒 −1 𝑑𝑥
𝐼 𝑥 = 𝑒 −𝑥
Thus
𝑧𝑒 −𝑥 = න −2𝑥𝑒 𝑥 𝑒 −𝑥 𝑑𝑥 + 𝐶
= −2 න 𝑥𝑑𝑥 + 𝐶
𝑧𝑒 −𝑥 = −𝑥 2 + 𝐶
or
𝑦 −1 𝑒 −𝑥 = −𝑥 2 + 𝐶](𝑦𝑒 𝑥 )
1 = −𝑥 2 𝑦𝑒 𝑥 + 𝐶𝑦𝑒 𝑥 ← 𝐴𝑛𝑠𝑤𝑒𝑟
3 2 −2𝑦 2
c. 𝑑𝑥 − 2𝑥𝑦𝑑𝑦 = 6𝑥 𝑦 𝑒 𝑑𝑦
Solution:
𝑥 −3
Multiply both sides by , hence
𝑑𝑦
−3
𝑑𝑦 −2 2 −2𝑦 2
𝑥 − 2𝑥 𝑦 = 6𝑦 𝑒
𝑑𝑥
Let:
𝑧 = −𝑥 −2
𝑑𝑧 −3
𝑑𝑥
= 2𝑥
𝑑𝑦 𝑑𝑦
or
1 𝑑𝑧 −3
𝑑𝑥
=𝑥
2 𝑑𝑥 𝑑𝑦
Hence
1 𝑑𝑧 2 −2𝑦 2
+ 2𝑧𝑦 = 6𝑦 𝑒 ](2)
2 𝑑𝑦
𝑑𝑧 2 −2𝑦 2
+ 4𝑧𝑦 = 12𝑦 𝑒
𝑑𝑦
2 −2𝑦 2
𝐺 𝑦 = 4𝑦 ; 𝐻 𝑦 = 12𝑦 𝑒
For 𝐼(𝑦)
𝐼 𝑦 = 𝑒 𝑦𝑑 𝑦 𝐺
= 𝑒 4𝑦𝑑𝑦
2𝑦 2
𝐼 𝑦 =𝑒
Thus
2𝑦 2 2 −2𝑦 2 2𝑦 2
𝑧𝑒 = 12 න 𝑦 𝑒 𝑒 𝑑𝑦 + 𝐶
= 12 න 𝑦 2 𝑑𝑦 + 𝐶
2𝑦 2
𝑧𝑒 = 4𝑦 3 + 𝐶
or
−2 2𝑦 2
−𝑥 𝑒 = 4𝑦 3 + 𝐶](−𝑥 2 )
2𝑦 2
𝑒 = −4𝑥 2 𝑦 3 + 𝐶1 𝑥 2 ← 𝐴𝑛𝑠𝑤𝑒𝑟 ; 𝐶1 = −𝐶
EXERCISE NO. 7
Solve the following differential equations.
𝑑𝑦
1. 𝑥 + 2𝑦 = 𝑥𝑦 2
𝑑𝑥
3Τ2
𝑑𝑥 2𝑥 𝑥
2. − = 𝑦
𝑑𝑦 𝑦 𝑦2
𝑑𝑦 𝑥
3. 𝑥 −𝑦+ =0
𝑑𝑥 2𝑦
𝑑𝑦 𝑦 1 − 2𝑥 𝑦 4
4. + =
𝑑𝑥 3 3
5. 𝑑𝑦 + 𝑦 − 𝑦 2 cos 𝑥 − sin 𝑥 𝑑𝑥 = 0
6. 𝑥𝑑𝑦 − 𝑦 + 𝑥𝑦 3 1 + ln 𝑥 𝑑𝑥 = 0
7. 𝑦 6𝑦 2 − 𝑥 − 1 𝑑𝑥 + 2𝑥𝑑𝑦 = 0 ; when 𝑥 = 0, 𝑦 = 1
8. 𝑥𝑑𝑦 + 𝑦 + 𝑥 2 𝑦 2 𝑑𝑥 = 0; when 𝑥 = 2, 𝑦 = 1
9. 2𝑥𝑦𝑑𝑦 + 𝑦 2 − 2𝑥 𝑑𝑥 = 0; when 𝑥 = 1, 𝑦 = 2
10. 𝑥𝑦 + 𝑥 2 𝑦 3 𝑑𝑦 = 𝑑𝑥; when 𝑥 = 1, 𝑦 = 0