Lect
Lect
Differential Equations
𝑑𝑦
Example 1: Solve = 1 + 𝑒 2𝑥
𝑑𝑥
Solution. 𝑑𝑦 = (1 + 𝑒 2𝑥 )𝑑𝑥
Integrate both sides we get
9
Physics department (2023-2024)
Differential Equations
1
𝑦=𝑥+ 𝑒 2𝑥 + 𝐶
2
𝑑𝑦
Example 2: Solve = sin 𝑥
𝑑𝑥
Solution. 𝑑𝑦 = sin 𝑥 𝑑𝑥
Integrate both sides we get
𝑦 = − cos 𝑥 + 𝐶 is a general solution of the given differential
equation.
𝑑𝑦 𝑥
Example 3: Solve =− subject to 𝑦(4) = 3
𝑑𝑥 𝑦
⇒ ∫ 𝑦𝑑𝑦 = ∫ −𝑥𝑑𝑥
𝑥2 + 𝑦2 = 𝐶 is general solution where 𝐶 = 2𝐶1 .
For 𝑥 = 4 &𝑦 = 3
42 + 32 = 𝐶 ⇒ 𝐶 = 25
∴ 𝑥 2 + 𝑦 2 = 25
Example 4 : Solve (1 + 𝑥 2 ) 𝑑𝑦 − 𝑥𝑦 𝑑𝑥 = 0
The arbitrary constant was added in the form “ln C” to facilitate the final
representation.
10
Physics department (2023-2024)
Differential Equations
𝑑𝑦 2
Example 5: Solve 𝑑𝑥 = 2𝑥(1 + 𝑦 2 )𝑒 𝑥
1 2
Solution. 𝑑𝑦 = 2𝑥𝑒 𝑥 𝑑𝑥
1+𝑦 2
1 2
∫ 1+𝑦2 𝑑𝑦 = ∫ 2𝑥𝑒 𝑥 𝑑𝑥 𝑢 = 𝑥 2 & 𝑑𝑢 = 2𝑥𝑑𝑥
1
∫ 1+𝑦2 𝑑𝑦 = ∫ 𝑒 𝑢 𝑑𝑢
tan−1 𝑦 = 𝑒 𝑢 + 𝐶
2
tan−1 𝑦 = 𝑒 𝑥 + 𝐶
2
𝑦 = tan(𝑒 𝑥 + 𝐶) is a general solution of diff. eq.
Example 6: Solve (𝑥 + 1)𝑦𝑑𝑥 + (𝑥 − 1)(𝑦 + 1)𝑑𝑦 = 0
Solution. Divide the differential equation by (𝑥 − 1)𝑦
𝑥+1 𝑦+1
𝑑𝑥 + 𝑑𝑦 = 0 is separable diff. eq.
𝑥−1 𝑦
𝑥+1 𝑦+1
∫ 𝑑𝑥 + ∫ 𝑑𝑦 = 0
𝑥−1 𝑦
𝑥+1+1−1 𝑦+1
∫ 𝑑𝑥 + ∫ 𝑑𝑦 = 0
𝑥−1 𝑦
2 1
∫(1 + 𝑥−1) 𝑑𝑥 + ∫(1 + 𝑦)𝑑𝑦 = 0
𝑥 + 2 ln(𝑥 − 1) + 𝑦 + ln 𝑦 = 𝐶
𝑥 + ln(𝑥 − 1)2 + 𝑦 + ln 𝑦 = 𝐶
𝑥 + 𝑦 + ln(𝑥 − 1)2 𝑦 = 𝐶 is a general solution.
Example 7: Solve (𝑥𝑦 + 𝑦)𝑑𝑥 + (𝑦 2 𝑥 − 𝑦 2 − 𝑥 + 1)𝑑𝑦 = 0
Solution. (𝑥 + 1)𝑦𝑑𝑥 + 𝑦 2 (𝑥 − 1) − (𝑥 − 1)𝑑𝑦 = 0
(𝑥 + 1)𝑦𝑑𝑥 + (𝑦 2 − 1)(𝑥 − 1)𝑑𝑦 = 0
Divide the differential equation by (𝑥 − 1)𝑦
𝑥+1 𝑦2 −1
𝑑𝑥 + 𝑑𝑦 = 0 is separable diff. eq.
𝑥−1 𝑦
𝑥+1 𝑦2 − 1
∫ 𝑑𝑥 + ∫ 𝑑𝑦 = 0
𝑥−1 𝑦
11
Physics department (2023-2024)
Differential Equations
𝑥+1+1−1 1
∫ 𝑑𝑥 + ∫(𝑦 − )𝑑𝑦 = 0
𝑥−1 𝑦
2 1
∫(1 + 𝑥−1) 𝑑𝑥 + ∫(𝑦 − 𝑦)𝑑𝑦 = 0
1
𝑥 + 2 ln(𝑥 − 1) + 𝑦 2 − ln 𝑦 = 𝐶
2
1
𝑥 + ln(𝑥 − 1)2 + 2 𝑦 2 − ln 𝑦 = 𝐶
1 (𝑥−1)2
𝑥 + 2 𝑦 2 + ln =𝐶 is a general solution.
𝑦
Exercises:
𝑑𝑦 1
1) = sin 5𝑥 𝐴𝑛𝑠. 𝑦 = − cos 5𝑥 + 𝐶
𝑑𝑥 5
1 −3𝑥
2) 𝑑𝑥 + 𝑒 3𝑥 𝑑𝑦 = 0 𝐴𝑛𝑠. 𝑦 = 𝑒 +𝐶
3
𝑑𝑦
3) (1 + 𝑥) =𝑥+6 𝐴𝑛𝑠. 𝑦 = 𝑥 + 5 ln|𝑥 + 1| + 𝐶
𝑑𝑥
4) 𝑥𝑦 ′ = 4𝑦 𝐴𝑛𝑠. 𝑦 = 𝐶𝑥 4
𝑑𝑦 𝑦 3
5) = 𝐴𝑛𝑠. 𝑦 −2 = 2𝑥 −1 + 𝐶
𝑑𝑥 𝑥 2
𝑑𝑥 𝑥2 𝑦2
6) = 𝐴𝑛𝑠. − 3 + 3𝑥 ln 𝑥 = 𝑥𝑦 3 + 3𝑥𝐶
𝑑𝑦 1+𝑥
𝑑𝑦
7) = 𝑒 (3𝑥+2𝑦) 𝐴𝑛𝑠. −3𝑒 −2𝑦 = 2𝑒 3𝑥 + 𝐶 𝑤ℎ𝑒𝑟𝑒 𝐶 = 6𝐶1
𝑑𝑥
8)(4𝑦 + 𝑦 𝑥 2 )𝑑𝑦 − (2𝑥 + 𝑥𝑦 2 )𝑑𝑥 = 0 𝐴𝑛𝑠. 2 + 𝑦 2 = 𝐶 (4 + 𝑥 2 ) 𝑤ℎ𝑒𝑟𝑒 𝐶 = 𝑒 2𝐶1
9) 2𝑦(𝑥 + 1)𝑑𝑦 = 𝑥𝑑𝑥 𝐴𝑛𝑠. 𝑦 2 = 𝑥 − ln|𝑥 + 1| + 𝐶
𝑑𝑥 𝑦+1 2 𝑥3 𝑥3
10)𝑦 ln 𝑥 =( ) 𝐴𝑛𝑠. ln 𝑥 −
𝑑𝑦 𝑥 3 9
𝑦2
= + 2𝑦 + ln|𝑦| + 𝐶
2
11) 𝑠𝑒𝑐 2 𝑥 𝑑𝑦 + 𝑐𝑠𝑐𝑦 𝑑𝑥 = 0 𝐴𝑛𝑠. 4 cos 𝑦 = 2𝑥 + sin 2𝑥 + 4𝐶
12) 𝑒 𝑦 sin 2𝑥 𝑑𝑥 + cos 𝑥( 𝑒 2𝑦 − 𝑦) 𝑑𝑦 = 0 𝐴𝑛𝑠. −2 cos 𝑥 + 𝑒 𝑦 − 𝑦𝑒 −𝑦 − 𝑒 −𝑦 = 𝐶
13) (𝑒 𝑦 + 1)2 𝑒 −𝑦 𝑑𝑥 + (𝑒 𝑥 + 1)3 𝑒 −𝑥 𝑑𝑦 = 0 𝐴𝑛𝑠. (𝑒 𝑥 + 1)−2 + 2 (𝑒 𝑦 + 1)−1 = 𝐶
12
Physics department (2023-2024)
Differential Equations
Example:𝑓(𝑥, 𝑦) = 𝑥 − 3√𝑥𝑦 + 5𝑦
Solution: 𝑓(𝑡𝑥, 𝑡𝑦) = 𝑡𝑥 − 3√(𝑡𝑥)(𝑡𝑦) + 5𝑡𝑦
= 𝑡𝑥 − 3𝑡√𝑥𝑦 + 5𝑡𝑦
= 𝑡 3⁄2 √ 𝑥 3 + 𝑦 3
= 𝑡 3⁄2 𝑓(𝑥, 𝑦)
Thus 𝑓(𝑥, 𝑦)is homogeneous With degree 3⁄2.
Example:𝑓(𝑥, 𝑦) = 𝑥 2 + 𝑦 2 + 1
Solution: 𝑓(𝑡𝑥, 𝑡𝑦) = (𝑡𝑥)2 + (𝑡𝑦)2 + 1
= 𝑡 2 𝑥 2 + 𝑡 2 𝑦 2 + 1 ≠ 𝑡 𝑛 𝑓(𝑥, 𝑦)
𝑓(𝑥, 𝑦)is not homogeneous
Example: 𝑓(𝑥, 𝑦) = ln 𝑥 2 − 2 ln 𝑦 = 2 ln 𝑥 − 2 ln 𝑦
Solution: 𝑓(𝑡𝑥, 𝑡𝑦) = 2 ln 𝑡𝑥 − 2 ln 𝑡𝑦
= 2 ln 𝑡 + 2 ln 𝑥 − 2 ln 𝑡 − 2 ln 𝑦
13
Physics department (2023-2024)
Differential Equations
= 2 ln 𝑥 − 2 ln 𝑦
𝑓(𝑡𝑥, 𝑡𝑦) = 𝑡 0 𝑓(𝑥, 𝑦)
Thus the given function is homogeneous With degree zero.
𝑑𝑦 𝑦−𝑥
Example1 : Solve =
𝑑𝑥 𝑦+𝑥
14
Physics department (2023-2024)
Differential Equations
we get
𝑦
𝑑𝑦 −1 𝑑𝑢 𝑢−1
𝑥
= 𝑦 ⇒ 𝑢+𝑥 =
𝑑𝑥
𝑥
+1 𝑑𝑥 𝑢+1
𝑑𝑢 𝑢−1 𝑑𝑢 𝑢−1−𝑢2 −𝑢
𝑥 = −𝑢 ⇒𝑥 =
𝑑𝑥 𝑢+1 𝑑𝑥 𝑢+1
𝑑𝑢 1+𝑢2 (𝑢+1)𝑑𝑢 𝑑𝑥
𝑥 𝑑𝑥 = − 𝑢+1 ⇒ + =0
𝑢2 +1 𝑥
𝑢 𝑑𝑢 𝑑𝑥
∫ 𝑢2 +1 𝑑𝑢 + ∫ 𝑢2 +1 + ∫ 𝑥
=0
1
ln(𝑢2 + 1) + tan−1 𝑢 + ln 𝑥 = ln 𝐶
2
1 𝑦2 𝑦
⇒ ln ( + 1) + tan−1 + ln 𝑥 = ln 𝐶 is a general solution
2 𝑥2 𝑥
𝑑𝑦 3 𝑦 2 +𝑥𝑦
Example2: Solve = where 𝑦(1) = −0.5.
𝑑𝑥 𝑥2
Solution:
15
Physics department (2023-2024)
Differential Equations
16
Physics department (2023-2024)
Differential Equations
𝑥 2 + 𝑦 2 = 𝐶𝑥
17
Physics department (2023-2024)
Differential Equations
𝑢=𝑦/𝑥 𝑦 𝑦
1 – cos(𝑢 − 1) = 𝐶𝑥 sin (𝑢 − 1) ⇒ 1 – cos ( − 1) = 𝐶𝑥 sin ( − 1)
𝑥 𝑥
We have
−2𝑥+5𝑥𝑢 −2+5𝑢
𝑥𝑢′ + 𝑢 = ( = )
2𝑥+𝑥𝑢 2+𝑢
which can be rewritten as
1 −2+5𝑢
𝑢′ = ( −𝑢)
𝑥 2+𝑢
18
Physics department (2023-2024)
Differential Equations
Exercises:
19
Physics department (2023-2024)
Differential Equations
20