0% found this document useful (0 votes)
8 views23 pages

Seminar 7 Differential Equations

Here are the steps to solve these ordinary differential equations: 1. This is a separable differential equation. Rearrange terms and integrate both sides to obtain the solution. 2. Check if it is exact. Take partial derivatives and see if they are equal. If not exact, find the integrating factor (which depends only on x in this case) and multiply. 3. This is not separable nor exact. Find the integrating factor depending on x and t, multiply and solve as an exact differential equation.

Uploaded by

Daniele Naddeo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views23 pages

Seminar 7 Differential Equations

Here are the steps to solve these ordinary differential equations: 1. This is a separable differential equation. Rearrange terms and integrate both sides to obtain the solution. 2. Check if it is exact. Take partial derivatives and see if they are equal. If not exact, find the integrating factor (which depends only on x in this case) and multiply. 3. This is not separable nor exact. Find the integrating factor depending on x and t, multiply and solve as an exact differential equation.

Uploaded by

Daniele Naddeo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Foundations in Calculus

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𝑥𝑦 & 𝑑𝑦

Knowing that a differential 𝑃 𝑥, 𝑦 𝑑𝑥 + 𝑄 𝑥, 𝑦 𝑑𝑦 can be written as the total differential of a


function 𝑓 𝑥, 𝑦 is important for solving the Ordinary Differential Equation (ODE)
𝑃 𝑥, 𝑦 𝑑𝑥 + 𝑄 𝑥, 𝑦 𝑑𝑦 = 0
Partial Differentiation
Suppose we are are tasked with solving the following ODE
3𝑥 & 𝑦 + 3𝑦 % 𝑑𝑥 + 𝑥 % + 9𝑥𝑦 & 𝑑𝑦 = 0

Since we already know that it simplifies to 𝑑𝑓 = 0

We can solve for it by integrating both sides, giving us


𝑓 𝑥, 𝑦 = 𝐶
𝑥 % 𝑦 + 3𝑥𝑦 % = 𝐶
Ordinary Differential Equations
First order ordinary differential equation
$#
= 𝑓(𝑥, 𝑡)
$)
Alternatively, this can be expressed as
𝑃 𝑥, 𝑡 𝑑𝑥 = 𝑄 𝑥, 𝑡 𝑑𝑡

$# #! *+ ! ) !
=
$) #! ,+ ! ) !
(𝑥 & +𝑐 & 𝑡 & ) 𝑑𝑥 = (𝑥 & −𝑐 & 𝑡 & ) 𝑑𝑡
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𝑥 & 𝑡
$)

Rearrange the terms to obtain


-
#!
𝑑𝑥 = 6𝑡 𝑑𝑡
-
∫ #! 𝑑𝑥 = ∫ 6𝑡 𝑑𝑡
-
− = 3𝑡 & + 𝐶
#
-
𝑥=−
%) ! ,.
Exact Ordinary Differential Equations
First order ordinary differential equation 𝑃 𝑥, 𝑡 𝑑𝑥 + 𝑄 𝑥, 𝑡 𝑑𝑡 = 0
is exact if there exists a function 𝜓(𝑥, 𝑡) such that
!/ !/
𝑃 𝑥, 𝑡 = , 𝑄 𝑥, 𝑡 =
!# !)

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𝑡𝑥 − 9𝑡 & 𝑑𝑡 = 0

Which is not separable


◦ Coefficients of 𝑑𝑥 contain terms of 𝑡
◦ Coefficients of 𝑑𝑡 contain terms of 𝑥
Exact Ordinary Differential Equations
To proceed, we use the following relationship:
!! / !! /
!#!)
= !)!#
Simply put, the order of differentiation does not matter as long as it is done with respect to the
same variables
Above equation can be rewritten into:
! !/ ! !/
=
!) !# !# !)
! !
𝑃 𝑥, 𝑡 = 𝑄 𝑥, 𝑡
!) !#
This simplifies the problem into a partial differential equation
Exact Ordinary Differential Equations
We check whether 2𝑥 + 𝑡 & + 1 𝑑𝑥 + 2𝑡𝑥 − 9𝑡 & 𝑑𝑡 = 0 is exact

! !
2𝑥 + 𝑡 & + 1 = 2𝑡, 2𝑡𝑥 − 9𝑡 & = 2𝑡
!) !#
Since both partial derivatives are equal, it is therefore an exact differential equation

∫ 2𝑥 + 𝑡 & + 1 𝑑𝑥 = 𝑥 & + 𝑥𝑡 & + 𝑥 + 𝑓(𝑡)


∫ 2𝑡𝑥 − 9𝑡 & 𝑑𝑡 = 𝑡 & 𝑥 − 3𝑡 % + 𝑔(𝑥)

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

If we multiply by 𝛼 𝑥, 𝑡 = 𝑡, then it becomes 𝑡 & 𝑑𝑥 + 2𝑥𝑡 𝑑𝑡 = 0


! & !
𝑡 = 2𝑡, 2𝑥𝑡 = 2𝑡, which is exact
!) !#

∫ 𝑡 & 𝑑𝑥 = 𝑥𝑡 & + 𝑓(𝑡), ∫ 2𝑥𝑡 𝑑𝑡 = 𝑥𝑡 & + 𝑔(𝑥)

The solution is therefore 𝑥𝑡 & = 𝐶


Integrating Factor
Given an inexact ordinary differential equation 𝑃 𝑥, 𝑡 𝑑𝑥 + 𝑄 𝑥, 𝑡 𝑑𝑡 = 0

- !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𝑥
!) !#

To identify the integrating factor, we check:


- !2 !0 &#*6 - !0 !2 6*&# &#
− = = 1, − = =−
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

The differential equation then becomes


2𝑥𝑒 ) 𝑑𝑥 + 𝑥 & − 𝑡 𝑒 ) 𝑑𝑡 = 0

∫ 2𝑥𝑒 ) 𝑑𝑥 = 𝑥 & 𝑒 ) + 𝑓(𝑡)


Integrating Factor
∫ 𝑥 & − 𝑡 𝑒 ) 𝑑𝑡 = 𝑥 & 𝑒 ) − ∫ 𝑡𝑒 ) 𝑑𝑡 + 𝑔(𝑥)
= 𝑥 & 𝑒 ) − 𝑡𝑒 ) − ∫ 𝑒 ) 𝑑𝑡 + 𝑔(𝑥)
= 𝑥 & 𝑒 ) − 𝑡𝑒 ) − 𝑒 ) + 𝑔(𝑥)
= 𝑥 & 𝑒 ) − 𝑒 ) 𝑡 − 1 + 𝑔(𝑥)

The solution is therefore 𝑥 & 𝑒 ) − 𝑒 ) 𝑡 − 1 = 𝐶


𝑥 & = 𝑒 *) 𝐶 + (𝑡 − 1 𝑒 ) )
𝑥 = ±𝑒 *)/& 𝐶 + (𝑡 − 1𝑒) )
Solving an Ordinary Differential Equation
1. Check if it is separable
2. Check if it is exact
◦ Find the partial derivative of P with respect to t
◦ Find the partial derivative of Q with respect to x
3. If it is not separable and not exact, find the integrating factor
! &' &"
◦ If − = 𝑢(𝑡), then 𝑒 ∫ ) % *%
is an integrating factor
" #,% &# &%
! &" &'
◦ If ' #,% &%
− &#
= 𝑣(𝑥), then 𝑒 ∫ + # *#
is an integrating factor
◦ Multiply the differential equation by the integrating factor
◦ The differential equation is now an exact differential equation

Solve 2𝑥 & 𝑦 + 𝑦 & 𝑑𝑥 + 𝑥 & 𝑦 & − 𝑥𝑦 𝑑𝑦 = 0


Practice Questions
$# )#"
1. Solve =
$) -,) !

$#
2. Solve cos 𝑥 + 𝑥 cos 𝑡 + sin 𝑡 − 𝑡 sin 𝑥 =0
$)

3. Solve 2𝑥 & 𝑦 + 𝑦 & 𝑑𝑥 + 𝑥 & 𝑦 & − 𝑥𝑦 𝑑𝑦 = 0

You might also like