Lecture5 1 First Order DE
Lecture5 1 First Order DE
MATH 2394
Engineering Maths
Topic 5: Differential Equations – Part 1
𝑘
𝑦 ′′ = − 𝑥 → 2𝑛𝑑 𝑂𝑟𝑑𝑒𝑟 𝐷𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡𝑖𝑎𝑙 𝐸𝑞𝑢𝑎𝑡𝑖𝑜𝑛.
𝑚
2
RMIT Classification: Trusted
3
RMIT Classification: Trusted
𝑑𝑦
= 𝑓(𝑥, 𝑦)
𝑑𝑥
Where 𝑓 is a given function of two variable 𝑥 and 𝑦(𝑥)
4
RMIT Classification: Trusted
equations
• For the 1st type of First order ODE, linear equations, the ODE
will have the form:
𝑑𝑦
+ 𝑝 𝑥 𝑦 = 𝑔(𝑥)
𝑑𝑥
• The solution method for linear first order ODE is called the
Method of Integrating Factors.
6
Differential Equations – Linear
RMIT Classification: Trusted
equations
• The Method of integrating factors was invented by Leibniz and it
involve an integrating factor 𝜇(𝑥).
𝑑𝑦
+ 𝑝 𝑥 𝑦 = 𝑔(𝑥)
𝑑𝑥
• Now, let us assume this a function 𝜇(𝑥) which exists and satisfy
the following:
𝑑𝑦 ′
𝜇 𝑥 +𝑝 𝑥 𝑦 =𝜇 𝑥 𝑔 𝑥 = 𝜇 𝑥 𝑦
𝑑𝑥
7
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Note that we are theorizing the function 𝜇(𝑥) exists such that:
𝜇 𝑥 𝑔 𝑥 = 𝜇 𝑥 𝑦 ′
→ 𝜇 𝑥 𝑦 = න 𝜇 𝑥 𝑔 𝑥 𝑑𝑥 + 𝐶
1
→𝑦= න 𝜇 𝑥 𝑔 𝑥 𝑑𝑥 + 𝐶
𝜇 𝑥
8
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Next, let us revisit the previous equation:
𝑑𝑦 ′
𝜇 𝑥 +𝑝 𝑥 𝑦 =𝜇 𝑥 𝑔 𝑥 = 𝜇 𝑥 𝑦
𝑑𝑥
→ 𝜇 𝑥 𝑦 ′ + 𝜇 𝑥 𝑝 𝑥 𝑦 = 𝜇′ 𝑥 𝑦 + 𝜇 𝑥 𝑦′
𝑑𝜇 𝑥 ′
→𝜇 𝑥 𝑝 𝑥 =𝜇 𝑥 =
𝑑𝑥
1
→ 𝑝 𝑥 𝑑𝑥 = 𝑑𝜇(𝑥)
𝜇 𝑥
9
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Continue from the previous slide:
1
→ 𝑝 𝑥 𝑑𝑥 = 𝑑𝜇(𝑥)
𝜇 𝑥
𝑑𝜇(𝑥)
→ න𝑝 𝑥 𝑑𝑥 = න
𝜇 𝑥
→ න𝑝 𝑥 𝑑𝑥 + 𝐶 = ln 𝜇
𝑥𝑑 𝑥 𝑝 +𝐶
→𝜇 𝑥 =𝑒 = 𝐴𝑒 𝑝 𝑥 𝑑𝑥
Where 𝐴 = ±𝑒 𝐶
10
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Since we are looking for one integrating factor, and not the most
general one, we shall assume 𝐴 = 1. Thus:
𝜇 𝑥 = 𝑒𝑝 𝑥 𝑑𝑥
𝑒𝑝 𝑥 𝑑𝑥
and integrate both sides.
11
Differential Equations – Linear RMIT Classification: Trusted
equations Example
Example: Use the Integrating Factor method to solve the following
differential equation 𝑦 ′ + 3𝑥 2 𝑦 = 6𝑥 2 .
(1) Step 1: first, we need to identify our 𝑝(𝑥) and 𝑔(𝑥):
𝑝 𝑥 = 3𝑥 2
𝑔 𝑥 = 6𝑥 2
(3) Step 3: Now we shall multiply both sides of the equation by 𝜇(𝑥):
3 3 3
𝑦 ′ 𝑒 𝑥 + 3𝑥 2 𝑒 𝑥 𝑦 = 6𝑥 2 𝑒 𝑥
12
Differential Equations – Linear RMIT Classification: Trusted
equations Example
Example: Use the Integrating Factor method to solve the following
differential equation 𝑦 ′ + 3𝑥 2 𝑦 = 6𝑥 2 .
(5) Step 5: Now we shall integrate both sides:
𝑑 𝑥3 3
න 𝑒 𝑦 𝑑𝑥 = න6𝑥 2 𝑒 𝑥 𝑑𝑥
𝑑𝑥
3 3 3
→ 𝑒 𝑥 𝑦 = න6𝑥 2 𝑒 𝑥 𝑑𝑥 = 2𝑒 𝑥 + 𝐶
(𝑢𝑠𝑒 𝑆𝑢𝑏𝑠𝑡𝑖𝑡𝑢𝑡𝑖𝑜𝑛 𝑅𝑢𝑙𝑒)
3
→ 𝑦 = 2 + 𝐶𝑒 −𝑥
Note that we cannot find the value of 𝐶 without the initial condition. This is the
general solution of 𝑦(𝑥).
13
Differential Equations – Linear RMIT Classification: Trusted
equations Example
Example: Use the Integrating Factor method to solve the following
differential equation 𝑦 ′ + 3𝑥 2 𝑦 = 6𝑥 2 .
14
RMIT Classification: Trusted
Find the exact solution of the equation above with the initial
condition 𝑦 0 = 1.
15
RMIT Classification: Trusted
Separable Equations
equations
• The next type of First-Order Differential Equation is non-linear
differential equation. Within this type, there is a subtype called
Separable Functions which can be solved analytically.
𝑑𝑦
𝑀 𝑥 +𝑁 𝑦 =0
𝑑𝑥
The function is called “separable” because it can be separated into
a function of 𝑥 and a function of 𝑦.
17
Differential Equations – Linear
RMIT Classification: Trusted
equations
• To solve these equation, we shall consider the functions 𝑀(𝑥)
and 𝑁(𝑦) as derivative functions:
𝐻1′ 𝑥 = 𝑀(𝑥)
𝐻2′ 𝑦 = 𝑁(𝑦)
𝑑𝑦
𝐻1′ 𝑥 + 𝐻2′ 𝑦 =0
𝑑𝑥
18
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Observe that since 𝐻2 is a function of 𝑦, we need to invoke the
chain rule when taking its derivative with respective to 𝑥:
𝑑 𝑑 𝑑𝑦 ′
𝑑𝑦
𝐻2 𝑦 = 𝐻2 ∙ = 𝐻2 𝑦
𝑑𝑥 𝑑𝑦 𝑑𝑥 𝑑𝑥
𝑑 𝑑
𝐻 𝑥 + 𝐻 (𝑦) = 0
𝑑𝑥 1 𝑑𝑥 2
𝑑
→ 𝐻1 𝑥 + 𝐻2 𝑦 =0
𝑑𝑥
19
Differential Equations – Linear
RMIT Classification: Trusted
equations
• Integrating both sides and we shall obtain:
𝐻1 𝑥 + 𝐻2 𝑦 = 𝐶
𝐻1 𝑥 = න𝑀 𝑥 𝑑𝑥
𝐻2 𝑦 = න𝑁 𝑦 𝑑𝑦
• Note that the integration of the functions 𝑀(𝑥) and 𝑁 𝑦 are not
always possible analytically.
20
Differential Equations – Separable
RMIT Classification: Trusted
equations Example
𝑑𝑦 𝑥2
Example: Solve the differential equation = and find the particular
𝑑𝑥 𝑦2
(2) Step 2: We can identify the 2 equations 𝐻1′ (𝑥) and 𝐻2′ (𝑦) as:
𝐻1′ 𝑥 = −𝑥 2
𝐻2′ 𝑦 = 𝑦 2
equations Example
𝑑𝑦 𝑥2
Example: Solve the differential equation = and find the particular
𝑑𝑥 𝑦2
22
Differential Equations – Separable
RMIT Classification: Trusted
equations Example
𝑑𝑦 𝑥2
Example: Solve the differential equation = and find the particular
𝑑𝑥 𝑦2
23
Numerical Methods– RMIT Classification: Trusted
Exercises
Given the function 𝑓 𝑥 = 𝑥 3 − 𝑥 2 − 4𝑥 + 4, find a root of this
function with the following methods:
24
RMIT Classification: Trusted
Direction Fields
Direction Field
• Consider the following differential equation:
𝑦′ = 𝑥 + 𝑦
26
RMIT Classification: Trusted
Direction Field
27
RMIT Classification: Trusted
Direction Field
• Because the solution curve passes through the point (0, 1) and
we know that its slope must be 0 + 1 = 1 at that point, hence we
can approximate the solution curve to look like:
28
RMIT Classification: Trusted
Direction Field
• We recognize that this equation is a linear First Order Differential
Equation and we can obtain the exact solution as follow:
𝑦 = −𝑥 − 1 + 2𝑒 𝑥
29
RMIT Classification: Trusted
30
RMIT Classification: Trusted
(b) 𝑦 ′ = 𝑥(2 − 𝑦)
(c) 𝑦 ′ = 𝑥 + 𝑦 − 1
31
RMIT Classification: Trusted
Equation
• In engineering and sciences, first-order differential equations are
typically used to model inductor circuits, population growth and
predator-prey systems, etc.
• The key to obtaining the model for the application problems is to use
the available data to obtain the constants used in the equation to obtain
the solution equation.
33
RMIT Classification: Trusted
• Thus, we have the rate of growth of the Population (𝑃) with respect to
time (𝑡) as:
𝑑𝑃
= 𝑘𝑃
𝑑𝑡
Where 𝑘 is the proportionality constant.
34
RMIT Classification: Trusted
𝑑𝑃 𝑃
= 𝑘𝑃 1 −
𝑑𝑡 𝑀
35
Applications – Population Growth RMIT Classification: Trusted
Example
Example: Suppose a population of cats in a neighborhood grows
according to a logistic model with initial population of 1000 cats. The area
is estimated to have a carrying capacity of 10,000 cats. If the population
grows to 2,500 cats after one year, what will the population be after 4
years?
(1) Step 1: first, recognize that the equation
36
RMIT Classification: Trusted
Applications – Exercise
𝑑𝑃
=𝑘 𝑀−𝑃 𝑡
𝑑𝑡
Where 𝑃 𝑡 is the performance level of the employee, 𝑘 is a proportionality
constant, and 𝑀 is the employee’s skill ceiling.
If Jim, a factory worker, can process 25 units in his first hour and 45 units
in his second hour, what is the maximum number of unit he can processed
in one hour? Assume 𝑃 0 = 0
37
RMIT Classification: Trusted
Questions?