Lecture Notes Differential Equation - First Order ODE
Lecture Notes Differential Equation - First Order ODE
DIFFERENTIAL EQUATIONS
CHAPTER 1
CONTENTS PAGE
2
1.1 BASIC DEFINITIONS AND TERMINOLOGIES
➢ Differential equation
Examples:
Examples:
u – dependent variable
x, y – independent variables
3
u – dependent variable
x, t – independent variables
u – dependent variable
x, y – independent variables
𝜕2𝑢 𝜕2𝑢 𝜕𝑢
2
+ + = 𝑒 𝑥𝑦 => 𝑢𝑥𝑥 + 𝑢𝑥𝑦 + 𝑢𝑦 = 𝑒 𝑥𝑦
𝜕𝑥 𝜕𝑥𝜕𝑦 𝜕𝑦
Dependent Variable:
Independent Variable:
4
➢ Degree of Differential Equation
More examples:
𝑑𝑦 2
a) ( ) + 𝑦 = sin 𝑥 Order : Degree:
𝑑𝑥
𝜕2 𝑢
b) + 𝑢2 = cos 𝑡 Order : Degree:
𝜕𝑡 2
𝜕2 𝑤 𝜕𝑤 2
c) +( ) + 𝑤 = 𝑒𝑥 Order : Degree:
𝜕𝑥 2 𝜕𝑥
4
𝜕3 𝑧 𝜕𝑧 2
d) ( ) +( ) +𝑧 =0 Order : Degree:
𝜕𝑦 3 𝜕𝑦
5
Examples:
Linear
Nonlinear – because
dy
the derivative is
dx
not of degree 1
Nonlinear – why?
Nonlinear – why?
6
Examples :
𝑑2 𝑦 𝑑𝑦 Initial Conditions:
+ 2 + 𝑦 + sin 𝑥
𝑑𝑥 2 𝑑𝑥
𝑦(0) = 0 ; 𝑦 ′ (0) = 1
𝑑2 𝑦 𝑑𝑦 Boundary Conditions:
+ 2 + 𝑦 + sin 𝑥
𝑑𝑥 2 𝑑𝑥
𝑦(0) = 1 ; 𝑦(1) = 2
7
1.2 FIRST ORDER ORDINARY DIFFERENTIAL
EQUATIONS (ODE)
How to identify?
𝑑𝑦
Suppose 𝑓(𝑥, 𝑦) = 𝑑𝑥 = 𝑢(𝑥 )𝑣(𝑦)
𝑑𝑦
= 𝑢(𝑥)𝑑𝑥
𝑣(𝑦)
1
∫ 𝑑𝑦 = ∫ 𝑢(𝑥)𝑑𝑥
𝑣(𝑦)
8
Before we proceed with the complete examples, let’s try to rewrite the
following functions into separable form:
9
Example 1:
𝑑𝑦 𝑦 cos 𝑥
= , 𝑦(0) = 1
𝑑𝑥 1 + 2𝑦 2
Solution:
𝑑𝑦
Show that the differential equation = (𝑥 + 𝑦)2 can be reduced to a separable
𝑑𝑥
equation by using substitution 𝑧 = 𝑥 + 𝑦. Then obtain the solution for the original
differential equation.
Solutions:
11
Questions from past year Test 1:
12
1.2.2 HOMOGENOUS EQUATION
How to identify?
𝑑𝑦
Suppose 𝑓(𝑥, 𝑦) = , 𝑓(𝑥, 𝑦) is homogenous if
𝑑𝑥
Method of Solutions:
13
Example 1:
a) 𝑑𝑦 𝑥 2 + 𝑦2
=
𝑑𝑥 (𝑥 − 𝑦)(𝑥 + 𝑦)
b) 𝑑𝑦
𝑥 − 𝑦 = 𝑥 √𝑥 2 + 𝑦 2
𝑑𝑥
Solutions:
a) 𝑑𝑦 𝑥 2 + 𝑦2
𝑓(𝑥, 𝑦) = =
𝑑𝑥 (𝑥 − 𝑦)(𝑥 + 𝑦)
𝑓(𝜆𝑥, 𝜆𝑦) =
b) 𝑑𝑦 𝑦
𝑓(𝑥, 𝑦) = = + √𝑥 2 + 𝑦 2
𝑑𝑥 𝑥
14
Example 2:
Note: 15
Non-homogenous can be reduced to a homogenous equation by
using the right substitution.
Example 3:
16
Questions from past year Test 1
17
1.2.3 EXACT EQUATION
How to identify?
𝑀(𝑥,𝑦)
Suppose 𝑓 (𝑥, 𝑦) = − ,
𝑁(𝑥,𝑦)
𝑑𝑦 𝑀(𝑥, 𝑦)
=−
𝑑𝑥 𝑁(𝑥, 𝑦)
=> ⏟
𝑀(𝑥, 𝑦) 𝑑𝑥 + ⏟
𝑁(𝑥, 𝑦) 𝑑𝑦 = 0
𝜕𝑢 𝜕𝑢
𝜕𝑥 𝜕𝑦
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
𝜕𝑀 𝜕𝑁
=
𝜕𝑦 𝜕𝑥
v) Compare (3) and (4) to get value for 𝜙1 (𝑦) and 𝜙2 (𝑥).
vii) Replace 𝜙1 (𝑦) into (3) OR 𝜙2 (𝑥) into (4).
viii) If there are any initial conditions given, substitute the conditions
into the solution.
ix) Write down the solution in the form
19
𝑢(𝑥, 𝑦) = 𝐴, where A is a constant
Example 1:
Solve (2𝑥𝑦 + 3) 𝑑𝑥 + (𝑥 2 − 1) 𝑑𝑦 = 0
20
21
Exercise :
Note:
Some non-exact equation can be turned into exact
equation by multiplying it with an integrating factor.
22
Example 2:
Solutions:
23
24
Questions from Past Year Test 1
25
1.2.4 LINEAR EQUATION
How to identify?
𝑑𝑦
(𝟏) + 𝒑(𝒙) 𝑦 = 𝒒(𝒙) (1)
𝑑𝑥
Must be + here!!
Method of Solution :
26
Example 1:
𝑑𝑦 1+𝑥 𝑒𝑥
+( )𝑦 =
𝑑𝑥 𝑥 𝑥
Solution:
27
iv) Final answer
𝑒𝑥 𝐶
𝑦= + 𝑥
2𝑥 𝑥𝑒
Note:
Non-linear DE can be converted into linear DE by using
the right substitution.
Example 2:
𝑑𝑦
𝑥2𝑦 − 𝑥𝑦 2 = 1; 𝑦(1) = 1
𝑑𝑥
Solutions:
𝒅𝒚
i) Differentiate 𝒛 = 𝒚𝟐 to get and replace into the non-linear
𝒅𝒙
equation.
28
ii) Change the equation into the general form of linear equation
& determine 𝒑(𝒙) and 𝒒(𝒙)
29
iv) Find 𝒚
30
Questions from Past Year Test 1
31
1.2.5 BERNOULLI EQUATION
How to identify?
where 𝑛 ≠ 0, 𝑛 ≠ 1
To reduce the equation to a linear equation, use substitution
𝑧 = 𝑦1−𝑛 (2)
Method of Solution :
i) Divide ( 1 ) with 𝑦 𝑛
𝑑𝑦 (3)
𝑦 −𝑛 + 𝑏(𝑥) 𝑦1−𝑛 = 𝑐(𝑥)
𝑑𝑥
𝑑𝑦
ii) Differentiate ( 2 ) wrt 𝑥 ( to get )
𝑑𝑥
𝑑𝑧 𝑑𝑦
= (1 − 𝑛)𝑦 −𝑛
𝑑𝑥 𝑑𝑥
1 𝑑𝑧 𝑑𝑦 (4)
= 𝑦 −𝑛
(1 − 𝑛) 𝑑𝑥 𝑑𝑥
Solve
𝑑𝑦 1
+ 𝑦 = 𝑒 𝑥 𝑦4
𝑑𝑥 3
Solutions:
33
Questions from Past Year Final
34
1.3 APPLICATIONS OF THE FIRST ORDER ODE
35
Example 1:
𝑑𝑇
= −𝑘(𝑇 − 𝑇𝑠 )
𝑑𝑡
Solution:
36
iii) Use the conditions given to find 𝐴 and 𝑘
iv) 𝑡 = 20, 𝑇 = ?
37
Exercise:
3. (Past Final)
4. (Past final)
38
1.3.2 Natural Growth and Decay
Example 1:
Solution:
39
2) Solve the DE
40
Questions from Past Year Final
41
42
1.3.3 Electric Circuits - RC
𝑑𝐼 𝑅 𝐸0
+ 𝐼=
𝑑𝑡 𝐿 𝐿
𝑅 𝐸0
Hence, 𝑝(𝑡) = , 𝑞 (𝑡) =
𝐿 𝐿
𝑅
∫( 𝐿 ) 𝑑𝑡
𝜇 (𝑡) = 𝑒
𝑅𝑡⁄
=𝑒 𝐿
𝑑 𝑅𝑡⁄ 𝑅𝑡 𝐸0
(𝑒 𝐿 𝐼) = (𝑒 ⁄𝐿 ) ( )
𝑑𝑡 𝐿
43
iv) Integrate the equation to find 𝑰
𝑅𝑡⁄ 𝑅𝑡⁄ 𝐸0
(𝑒 𝐿 𝐼) = ∫ (𝑒 𝐿) ( ) 𝑑𝑡
𝐿
1 𝑅𝑡⁄ 𝐸0 𝐿 𝐸0 −𝑅𝑡
𝐼 = 𝑅𝑡⁄ [(𝑒 𝐿) ( ) ( ) + 𝐶] = + 𝐶𝑒 ⁄𝐿
𝑒 𝐿 𝐿 𝑅 𝑅
𝑑𝐼
𝐿 + 𝑅𝐼 = 𝐸0 sin 𝑤𝑡
𝑑𝑡
i) Write into the linear equation form and determine 𝒑(𝒕) and
𝒒(𝒕)
𝑑𝐼 𝑅 𝐸0
+ 𝐼= 𝑠𝑖𝑛 𝑤𝑡
𝑑𝑡 𝐿 𝐿
𝑅 𝐸0
Hence, 𝑝(𝑡) = , 𝑞 (𝑡) = sin 𝑤𝑡
𝐿 𝐿
𝑅
∫( 𝐿 ) 𝑑𝑡
𝜇 (𝑡) = 𝑒
𝑅𝑡
= 𝑒 ⁄𝐿
iii) Write down the equation with the integrating factor
𝑑 𝑅𝑡⁄ 𝑅𝑡 𝐸0
(𝑒 𝐿 𝐼) = (𝑒 ⁄𝐿 ) 𝑠𝑖𝑛 𝑤𝑡
𝑑𝑡 𝐿
44
iv) Integrate the equation to find 𝑰
1 𝐸0 𝑅𝑡
𝐼=( 𝑅𝑡 )( ) ∫ (𝑒 ⁄𝐿 ) 𝑠𝑖𝑛 𝑤𝑡 𝑑𝑡 (1)
𝑒 ⁄𝐿 𝐿
Example 1:
Example 2:
Consider the circuit given in the figure with R=4, L=2, and V=cos 3t. Find
the current, I(t) .
45
Vertical Motion – Newton’s Second Law of Motion
46
Example 1:
47
Example 2:
𝑑𝑣
= 𝑔 − 𝑘𝑣 2 .
𝑑𝑡
If the particle starts off from rest, show that the velocity of that particle at
any time t is given by:
𝜆(𝑒 2𝜆𝑘𝑡 − 1)
𝑣=
(𝑒 2𝜆𝑘𝑡 + 1)
𝑔
such that 𝜆 = √ . Then, find the velocity as the time approaches infinity.
𝑘
Solutions:
48
49