Seminar 7 Differential Equations
Seminar 7 Differential Equations
and Probability
YU SHENG LOH
Differential Equations
Partial Differentiation
Differentiation done with respect to one single variable
Keeping the other variables fixed
◦ Can be treated as constants
!" $"
Denoted as instead of
!# $#
𝑓 𝑥, 𝑦 = 𝑥 % 𝑦 + 3𝑥𝑦 %
!" !"
= 3𝑥 & 𝑦 + 3𝑦 % = 𝑥 % + 9𝑥𝑦 &
!# !'
Partial Differentiation
Looking at a simpler example
𝑓 𝑥, 𝑦, 𝑧 = 2𝑥 + 3𝑦 + 4𝑧
!" !" !"
=2 =3 =4
!# !' !(
The total differential of a function 𝑓 𝑥, 𝑦, 𝑧 can be expressed as a sum of its partial differentials
!" !" !"
𝑑𝑓 = 𝑑𝑥 + 𝑑𝑦 + 𝑑𝑧
!# !' !(
Partial Differentiation
𝑓 𝑥, 𝑦, 𝑧 = 2𝑥 + 3𝑦 + 4𝑧
𝑓 1,1,1 = 2 + 3 + 4 = 9, 𝑓 2,2,2 = 4 + 6 + 8 = 18
𝑑𝑓 = 𝑓 2,2,2 − 𝑓 1,1,1 = 9
=2∗1+3∗1+4∗1
=2+3+4=9
Partial Differentiation
The total differential of the function 𝑓 𝑥, 𝑦 = 𝑥 % 𝑦 + 3𝑥𝑦 % is therefore
𝑑𝑓 = 3𝑥 & 𝑦 + 3𝑦 % 𝑑𝑥 + 𝑥 % + 9𝑥𝑦 & 𝑑𝑦
$# #! *+ ! ) !
=
$) #! ,+ ! ) !
(𝑥 & +𝑐 & 𝑡 & ) 𝑑𝑥 = (𝑥 & −𝑐 & 𝑡 & ) 𝑑𝑡
Separable Ordinary Differential Equations
Separable first order ordinary differential equation
◦ 𝑑𝑥 terms are only in terms of 𝑥 and
◦ 𝑑𝑡 terms are only in terms of 𝑡
𝑃 𝑥 𝑑𝑥 = 𝑄 𝑡 𝑑𝑡
Solution is then obtained by integrating both sides with respect to their integration variables
∫ 𝑃 𝑥 𝑑𝑥 = ∫ 𝑄 𝑡 𝑑𝑡
Separable Ordinary Differential Equations
$#
Solve = 6𝑥 & 𝑡
$)
Recall that the sum of all partial derivatives of a function equals to the derivative of the function
Such a differential equation can therefore be written as
𝑑𝜓 = 0
And the solution is
𝜓 𝑥, 𝑡 = 𝐶
Exact Ordinary Differential Equations
$#
Solve 2𝑡𝑥 − 9𝑡 & + 2𝑥 + 𝑡 & + 1 =0
$)
! !
2𝑥 + 𝑡 & + 1 = 2𝑡, 2𝑡𝑥 − 9𝑡 & = 2𝑡
!) !#
Since both partial derivatives are equal, it is therefore an exact differential equation
Where 𝑓(𝑡) and 𝑔(𝑥) are some undetermined functions exclusively of 𝑡 and 𝑥, respectively
Exact Ordinary Differential Equations
Comparing terms from both equations, we can see that
𝑓 𝑡 = −3𝑡 %
𝑔 𝑥 = 𝑥& + 𝑥
Therefore, 𝜓 𝑥, 𝑡 = 𝑥 & + 𝑥 + 𝑡 & 𝑥 − 3𝑡 % and the solution to the ordinary differential equation
is:
𝑥 & + 𝑥 + 𝑡 & 𝑥 − 3𝑡 % = 𝐶
Integrating Factor
If an ordinary differential equation 𝑃 𝑥, 𝑡 𝑑𝑥 + 𝑄 𝑥, 𝑡 𝑑𝑡 = 0 is not exact i.e. 𝜕𝑃⁄𝜕𝑡 ≠ 𝜕𝑄⁄𝜕𝑥
It can be converted into an exact equation by multiplying by an integrating factor 𝛼(𝑥, 𝑡) to get
𝑃 𝑥, 𝑡 𝛼(𝑥, 𝑡) 𝑑𝑥 + 𝑄 𝑥, 𝑡 𝛼(𝑥, 𝑡) 𝑑𝑡 = 0
!/ !/
Such that 𝑃 𝑥, 𝑡 𝛼 𝑥, 𝑡 = and 𝑄 𝑥, 𝑡 𝛼 𝑥, 𝑡 =
!# !)
In general, we try to find an integrating factor that is a function of only 𝑥 (𝛼(𝑥)) or 𝑡 (𝛼(𝑡))
Integrating Factor
For example, the differential equation 𝑡 𝑑𝑥 + 2𝑥 𝑑𝑡 = 0 is separable but not exact
- !2 !0
If − = 𝑢(𝑡), then 𝑒 ∫ 4 ) $)
is an integrating factor
0 #,) !# !)
- !0 !2
Similarly, if − = 𝑣(𝑥), then 𝑒 ∫ 5 # $#
is an integrating factor
2 #,) !) !#
Integrating Factor
The differential equation 2𝑥 𝑑𝑥 + 𝑥 & − 𝑡 𝑑𝑡 = 0 is not exact because
! !
2𝑥 = 0, 𝑥 & − 𝑡 = 2𝑥
!) !#
The first is suitable as an integrating factor because it can be expressed only in terms of 𝑡,
whereas the second is not suitable as it is in terms of both 𝑥 and 𝑡
Integrating Factor
Integrating factor 𝛼(𝑥, 𝑡) to use is 𝑒 ∫ -$) = 𝑒 )
◦ There is no need to be concerned with the constants for the integrating factor
◦ These will come in automatically later
$#
2. Solve cos 𝑥 + 𝑥 cos 𝑡 + sin 𝑡 − 𝑡 sin 𝑥 =0
$)