You are on page 1of 57

BDA24303

Differential Equations
Dr Wan Saiful-Islam Wan Salim
Faculty of Mechanical & Manufacturing Engineering
Universiti Tun Hussein Onn Malaysia

1
Course Information
• Course name: Differential Equations
• Course code: BDA 24303
• Credit: 3
• Weekly lecture hours: 2
• Weekly tutorial hours: 2
• Course lecturer: Dr Wan Saiful-Islam Wan Salim
• Course communication: WhatsApp group: BD24303 Sem1 2020-2021
https://chat.whatsapp.com/BBxPkUmJb3S6jcW9ehZl7S
• Author system: https://author.uthm.edu.my/main/

2
Time Table Semester I (2020-2021)

3
Course Information
• Course Learning Outcomes:
1. Engineering Knowledge - Identify the appropriate techniques to find the
solution of first and second order differential equations
2. Engineering Knowledge - Apply the Laplace transform to solve initial and
boundary value problems
3. Engineering Knowledge - Generate the Fourier series for given functions
4. Engineering Knowledge - Solve partial differential equations using
method of separation of variables
5. Life Long Learning - Independently initiate lifelong learning in a guided
PBL assignment or project.
4
Delivery and Assessment Methods
Course Learning Programme Learning Outcomes (PLO) Delivery Method Assessment Method KPI
Outcomes (CLO)
PLO1 PLO6

CLO 1  Lecture & Tutorial Individual assignment, Test 1 & Final Exam 100% students get > 40% marks

CLO 2  Lecture & Tutorial Individual assignment, Test 2 & Final Exam 100% students get > 40% marks

CLO 3  Lecture & Tutorial Test 2 & Final Exam 100% students get > 40% marks

CLO 4  Lecture & Tutorial Final Exam 100% students get > 40% marks

CLO 5  Guided assignment Report & Presentation 100% students get > 40% marks

5
Assessment
• Assignments
• Individual Assignments: 5%
• Group Assignment: 15% (10% report & 5% life-long learning evaluation)
• Tests
• Test 1: 15% (24th November 2020, 8.00pm, F2 Upper Level*)
• Test 2: 15% (29th December 2020, 8:00pm, F2 Upper Level*)
• Final Examination: 50%

* to be confirmed

6
Reference Materials
1. Pal, Srimanta. (2015). Engineering Mathematics. Oxford Univ Press. TA330.P35 2015
2. Bhattacharya, Subhamoy. (2015). Fundamentals of Engineering Mathematics. London: ICE
Publishing. TA330.B42 2015
3. Wirkus, Stephen, Allen. (2015). A Course in Ordinary Differential Equations. CRC Press, Taylor &
Francis Group. QA372.W57 2015
4. Deng, Yuefan. (2015). Lectures, Problems and Solutions for Ordinary Differential Equations. World
Scientific Publishing Co. Pte. Ltd. QA371.D46 2015
5. Rehman, Hamood Ur. (2015). Partial Differential Equations and Mechanics., New York: Magnum
Publishing. QA805.P37 2016
6. Bird, John. (2014). Engineering Mathematics. Routledge, London. TA330.B57 2014

7
General Rules and Regulations
1. Students must attend not less than 80% of contact hours for each course
including Compulsory Attendance Course (Hadir Wajib - HW) and
Attendance Only Course (Hadir Sahaja - HS).
2. Students who do not fulfil item (1) of the above are not allowed to
attend further lectures and are not allowed to sit for any further
assessment. Zero marks (0) will be given to student who fails to comply
with item (1). As for Compulsory Attendance Course (Hadir Wajib - HW),
students who fails to comply with item (1) will be given Failure
Attendance (Hadir Gagal - HG).
3. Students must observe the university dress code and must conduct
themselves in appropriate manner to avoid any disciplinary action.
4. Students must follow safety regulations during learning and teaching.
8
Contents
1. First Order Linear Differential Equations
2. Second Order Linear Differential Equations with Constant
Coefficients
3. Laplace Transforms
4. Fourier Series
5. Partial Differential Equations

9
Topic 1
First Order Linear Differential Equations
• Ordinary Differential Equations (ODE)
• Linear Differential Equations
• Initial and Boundary Problems
• Types of ODE and Methods of Solution
• Some Applications

10
Ordinary Differential Equations (ODE)
Ordinary Differential Equation
• Def: Any equation involving one or more derivatives or differentiable function of a single independent
variable
• Because the dependent variables depend only on a single independent variable, it is called ordinary
differential equations. If the dependent variable depend on more than one independent variable, its
derivative is called a partial derivative and the equation will be called a partial differential equation.
• For instance, the derivative of a variable x with respect to t is dx/dt
• Here, x is a dependent variable and t is the independent variable and dx/dt is the derivative of x
• We may also have d2x/dt2, which is a higher order derivative of x
• So, a differential equation may look something like:
𝑑𝑥
= 2 + 5𝑡
𝑑𝑡

𝑑2𝑥
= 4𝑡 2
𝑑𝑡 2

• Normally, we would solve the equations by integrating them to express the dependent variables as functions
of the independent variable

11
• Where do ODEs arise? When something of particular interest changes
with time and sometimes space
• Engineering (study of dynamics, vibrations etc.)
• Economics (prediction of economic growth etc.)
• Biology (prediction of cell growth etc.)
• Chemistry (prediction of rate of chemical reaction etc.)
• Physics (movement of atoms is space etc.)

• When did you first encounter a differential equation? Can you


describe its physical meaning?

12
• Differential equations have one or more independent variables and
likewise, one or more dependent variables.
• The independent variables generally are the space coordinates (x,y,z) and
time (t).
• An ordinary differential equation has only one independent variable and is
therefore integrable.
• To consider a very basic differential equation, we go to Newton and the
falling apple. To be accurate, his equation F = ma should be written only for
one direction, the x-direction here.
• F is the gravitational force mg. The acceleration a is 𝑑 2 𝑥 Τ𝑑𝑡 2
• Thus the differential equation becomes 𝑚𝑔 = 𝑚 𝑑 2 𝑥 Τ𝑑𝑡 2
• That is 𝑑 2 𝑥 Τ𝑑𝑡 2 = 𝑔
13
• This simple differential equation can be solved by integrating twice.
𝑑𝑥
= 𝑔𝑥 + 𝐶1 ; 𝑥 𝑡 = 𝑔 𝑥 2 Τ2 + 𝐶1 𝑥 + 𝐶2
𝑑𝑡
• To evaluate C1 and C2, we require two conditions with respect to the independent variable t.
• You know very well the final solution to this from Physics texts:
𝑠 = 𝑢𝑡 + ½ 𝑔𝑡2 where u is the initial velocity
• The integration of a differential equation is possible only when the derivatives are ordinary
derivatives; i.e., derivatives of only one independent variable.
• When there are two, three or four independent variables, partial derivatives enter the picture.
For example if velocity u is a function of both x and y, then we have two derivatives
𝜕𝑢 𝜕𝑢
• and ;
𝜕𝑥 𝜕𝑦
• it is impossible to integrate such an equation unless they are turned into ordinary differential
equations.
• This is exactly what the chapter on solution of PDEs does: change a PDE to ODE by several
different methods.

14
• The first step to solving ODEs is to classify the equation
• What do we base our classification on?
• The ORDER of the equation
• The DEGREE of the equation
• Order of ODE: the order of the highest derivative appearing in the
equation
• Degree of ODE: the exponent to which the highest derivative is raised
when fractions and radicals involving y (the dependent variable) have
been removed from the equation

15
• To identify order of ODE
• Pick the derivative of the dependent variable in the differential equation
• Its highest order is the order of the differential equation

• To identify degree of ODE


• The differential equation must be a polynomial equation in derivatives
• The highest power in the highest order involved is the degree

16
• Exercise: State the order and degree of the following differential equations
Differential equation Order Degree
𝑑𝑦
= 𝑒𝑥
𝑑𝑥
𝑑2𝑦
+ 6𝑦 = 0
𝑑𝑥 2
𝑑3 𝑦 3 2
𝑑2 𝑦
+𝑥 =0
𝑑𝑥 3 𝑑𝑥 2
3 *hint: look at the power of the highest order of y
𝑑3𝑦 2
𝑑2 𝑦
+𝑥 =0
𝑑𝑥 3 𝑑𝑥 2
𝑦′′ 3Τ2
=𝑘
𝑦 + 𝑦′′ 2
Clear fractions and radicals
2
𝑘 2 𝑦′′ 4 − 𝑦 ′′ 3 + 2𝑘 2 𝑦𝑦 ′′ + 𝑘 2 𝑦 2 = 0 17
Differential equation Order Degree
2
𝑑2 𝑦 𝑑𝑦
+ − sin2 𝑦 = 0
𝑑𝑥 2 𝑑𝑥
2
𝑑𝑦 𝑑𝑦
+ − sin2 𝑦 = 0
𝑑𝑥 𝑑𝑥
𝑑𝑦 𝑑𝑦 Not defined
+ sin =0 (Reason: not a polynomial in y)
𝑑𝑥 𝑑𝑥
2 3
𝑑2 𝑦 𝑑𝑦
+ = 𝑦 + sin 𝑥
𝑑𝑥 2 𝑑𝑥
For this, we need to remove the radical
2 3
𝑑2 𝑦 𝑑𝑦 2
+ = 𝑦 + sin 𝑥
𝑑𝑥 2 𝑑𝑥
18
Linear Differential Equations
• The linearity of the equation depends on how the variable y appears
in the equation
• A linear equation exist when the dependent variable (y) and its
derivatives only exist as first degree.
• Example: y (linear), dy/dx (linear), y2 (non-linear), dy2/dx (non-linear)
• The coefficients multiplying the variables are either constants or
functions of the independent variable (e.g. function of t)
• If y (dependent variable) or its derivatives appear in the coefficient,
the equation is non-linear

19
• Exercise
𝑑2 𝑦
• linear or non-linear? 𝑑𝑥 2
+3
𝑑𝑦
𝑑𝑥
+ 2𝑦 = 0

𝑑𝑦 𝑑 𝑦 2 𝑑𝑦
+𝑦 =0 Linear 𝑥2 2 +𝑥 + 𝑥 2 − 𝑛2 𝑦 = 0
𝑑𝑡 𝑑𝑥 𝑑𝑥

𝑑𝑥 𝑑2 𝑦
+ 𝑥2 = 0 Non-linear +𝑦
𝑑𝑦
−𝑦 =0
𝑑𝑡 𝑑𝑥 2 𝑑𝑥

𝑑𝑦
+ 𝑡2 = 0 Linear 𝑥 ′′ + 𝑥 = 0
𝑑𝑡

𝑑𝑦
𝑦 + 𝑡2 = 0 Non-linear
𝑑𝑡

20
𝑥 ′′ + 2𝑥 ′ + 𝑥 = 0
*Exception (special case)
1
Exception is made for time
𝑥′ + = 0
𝑥 variable.
𝑥′ + 𝑥2 = 0 We can have any function of time
𝑥 ′′ + sin 𝑥 = 0 (t) appear in the equation but still
have an equation that is linear in
𝑥𝑥 ′ = 1
x
Multiple variable problem Example
𝑥 ′ + 𝑦′ = 0
𝑥 ′′ + 2𝑥 ′ + 𝑥 = sin 𝑡 is linear in x
𝑥𝑦 ′ = 1
𝑥 ′ + 𝑡 2 𝑥 = 0 is linear in x

21
Homogeneous vs Non-homogeneous Equations
• All terms in the equation are proportional to a derivative of the
dependent variable (y)
• There is no term that contain a function of other variables alone in
the equation
• To check if the equation is homogeneous (say y is the dependent
variable):
1. Put all terms which involve y on the left-hand side
2. If there is nothing of the right-hand side, the equation is homogeneous
3. If there are terms involving t (or constants) on the right-hand side, then the
equation is non-homogeneous

22
• Examples (homogeneous equations)

𝑥 ′′ + 2𝑥 ′ + 𝑥 = 0 Homogeneous

𝑑2 𝑦 𝑑𝑦
+ 2 + 𝑦 = sin 𝑥 Non-homogeneous
𝑑𝑥 2 𝑑𝑥

𝑑𝑦
+ 𝑡𝑦 = 0
𝑑𝑡

𝑦′ + 𝑡 2𝑦 = 𝑡 + 𝑡 2

23
Notes on linearity
• Most ODEs in engineering are linear with constant coefficients
• Many non-linear models can be approximated by linear models, at
least for small amplitude disturbances
• Amplitude does not affect qualitative behavior of linear systems
• Coefficients in ODEs are usually constants
• Nevertheless, in some cases non-linearity are important

24
Initial and Boundary Value Problems
• To complete the solution of and ODE, we need initial or boundary
values
• Temporal domain: concerns time
• Spatial domain: concerns space
• Problems that involve time require initial values. So the initial
conditions have to be specified with the ODE. We call this an initial
value problem
• Problems that involve space can be represented by ODE. However, we
need to specify what is happening at the ends of the space domain.
We call this a boundary value problem

25
• Examples (initial & boundary value ODEs)

𝑑𝑣
=𝑔 ; 𝑣 0 = 𝑣0
𝑑𝑡
(1st order, Linear, Initial value problem)

𝑑2 𝑚
=𝑤 ; 𝑚 0 = 0, 𝑚 𝑙 = 0
𝑑𝑥 2
(2nd order, Linear, Boundary value problem)

𝑑2 𝜃 𝑑𝜃
= 𝜔2 sin 𝜃 ; 𝜃 0 = 𝜃0 , 0 =0
𝑑𝑡 2 𝑑𝑡
(2nd order, Non-linear, Initial value problem)

26
Types of ODE and Methods of Solution
• We now look at different forms of ODEs and methods to solve them
• These ODEs are of 1st degree
• Lets say the ODEs are functions of x and y
𝑑𝑦
• Thus, = 𝐹 𝑥, 𝑦
𝑑𝑥
𝑑𝑦
• e.g. + 2𝑦 = 2𝑥
𝑑𝑥
• They may also exist in the form 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0
𝑑𝑦 2 1
• e.g. 2𝑥 + 𝑦 𝑑𝑥 + 3𝑥𝑦 𝑑𝑦 = 0 → =− +
𝑑𝑥 3𝑦 3𝑥

27
Linearity Rule
• Before we proceed with the methods of solution, we look at an
important property of linear equations, rule of linearity for derivatives
• If a linear homogeneous ODE has solutions 𝑦 = 𝑓(𝑡) and 𝑦 = 𝑔(𝑡),
then 𝑦 = 𝑎 × 𝑓(𝑡) + 𝑏 × 𝑔(𝑡) where 𝑎 and 𝑏 are constants is also a
solution.
• Example
𝑑2 𝑦
Lets say + 𝑦 = 0 has solutions 𝑦 = sin 𝑡 and 𝑦 = cos 𝑡
𝑑𝑡 2
Now prove that the above is true i.e. 𝑦 = 𝑎 × sin 𝑡 + 𝑏 × cos 𝑡

28
𝑑2 𝑦
+ 𝑦 = 0 has solutions 𝑦 = sin 𝑡 and 𝑦 = cos 𝑡 Similarly for equation (1b)
𝑑𝑡 2
Prove that this is a linear equation. 𝑑 𝑑 cos 𝑡
+ cos 𝑡 = 0
𝑑𝑡 𝑑𝑡
Solution: 𝑑
Replace 𝑦 = sin 𝑡 and 𝑦 = cos 𝑡 into equation −sin 𝑡 + cos 𝑡 = 0
𝑑𝑡
𝑑 2 sin 𝑡
+ sin 𝑡 = 0 … (1a) − cos 𝑡 + cos 𝑡 = 0
𝑑𝑡 2
𝑑 2 cos 𝑡
+ cos 𝑡 = 0 … (1b) • Therefore, 𝑦 = sin 𝑡 + cos 𝑡 is also a
𝑑𝑡 2 solution
• Comparing with 𝑦 = 𝑎 × 𝑓(𝑡) + 𝑏 ×
From (1a) 𝑔 𝑡 , 𝑓 𝑡 = sin 𝑡 and 𝑔(𝑡) = cos 𝑡
𝑑 𝑑 sin 𝑡
+ sin 𝑡 = 0 with 𝑎 = 1 and 𝑏 = 1
𝑑𝑡 𝑑𝑡
𝑑
cos 𝑡 + sin 𝑡 = 0 • Thus, this is a linear equation and
𝑑𝑡
obeys the linearity rule.
− sin 𝑡 + sin 𝑡 = 0

29
Solutions of Linear, 1st Order ODEs
• There are FOUR types of first order, linear differential equations
Type of ODE 𝑭 𝒙, 𝒚

𝑑𝑦
Separable ODE =𝑓 𝑥 𝑔 𝑦
𝑑𝑥
𝑑𝑦 𝑦
Homogeneous ODE =𝑓
𝑑𝑥 𝑥

𝑑𝑦 𝑀 𝑥, 𝑦
Exact ODE =−
𝑑𝑥 𝑁 𝑥, 𝑦

𝑑𝑦
Linear inexact ODE +𝑃 𝑥 𝑦 =𝑄 𝑥
𝑑𝑥

30
Separable ODEs
• Form of ODE:
𝑑𝑦
= 𝑓(𝑥)𝑔(𝑦)
𝑑𝑥

• Method of solution:
1. Rearrange the equation so that variable 𝑥 and its differential 𝑑𝑥 is on one
side and 𝑦 and 𝑑𝑦 on the other
2. Direct integrate both sides for solution
3. The general solution will have arbitrary constant

31
• Example 1 (Separable ODE)

𝑑𝑦
Find the general solution for = 𝑥 + 𝑥𝑦
𝑑𝑥

𝑥2ൗ
2
Answer: 𝑦 = 𝐴𝑒 − 1 where A is an arbitrary constant

32
• Example 2

𝑑𝑦 2𝑥𝑦
Find the general solution for =
𝑑𝑥 𝑥 2 +4

Answer: 𝑦 = 𝐴 𝑥 2 + 4 where A is an arbitrary constant


33
• Example 3

𝑑𝑦
Find the general solution for = −𝑥𝑒 𝑦
𝑑𝑥

𝑥2
Answer: 𝑦 = − ln + 𝐶 where C is an arbitrary constant
2

34
• Exercise (Separable ODEs)

Find the general solution to the following differential equations:

𝑑𝑦 𝑒𝑥
= Answer: 𝑦 = ln 1 + 𝑒 𝑥 + 𝐶
𝑑𝑥 1+𝑒 𝑥

𝑑𝑧 1 1 𝑡 1
= Answer: 𝑧 = ln + 𝐴, where 𝐴 = 𝐶2 − 𝐶3 − 2𝐶1
𝑑𝑡 𝑡 𝑡+2 2 𝑡+2 2

𝑑𝑦 1−𝑦
= Answer:
𝑑𝑥 1+𝑦

35
Homogeneous ODE
• Form of ODE:

𝑑𝑦 𝐴 𝑥, 𝑦 𝑦
= =𝑓
𝑑𝑥 𝐵 𝑥, 𝑦 𝑥

where 𝐴 𝑥, 𝑦 and 𝐵 𝑥, 𝑦 are homogeneous functions of the same degree


• To check if the function is homogeneous, we multiply through the equation
with a real number λ check the value
• A function 𝑓 𝑥, 𝑦 is homogeneous of n degree if for any λ, it obeys
𝑓 𝜆𝑥, 𝜆𝑦 = 𝜆 𝑛 𝑓 𝑥, 𝑦
36
• Method of solution:
1. Check of the equation is homogeneous
2. Reduce the homogeneous equation to a separable equation by 𝑑𝑦
making substitution 𝑦 = 𝑢𝑥 and thus the product differentiation =
𝑑𝑢 𝑑𝑥
𝑢+𝑥 (product rule for differentiation)
𝑑𝑥
𝑑𝑦 𝑦
i.e. ณ =𝑓
𝑑𝑥 𝑥
𝑑𝑢 𝐹 𝑢
𝑢+𝑥
𝑑𝑥

𝑑𝑢
𝑥
3. This will give us a separable equation =𝐹 𝑢 −𝑢
𝑑𝑥
4. Integrate both sides to solve the equation

37
• Example 1 (Homogeneous ODE)
• Check if the following equation is homogeneous and write it in the form of a separable ODE

𝑑𝑦 𝐴 𝑥, 𝑦 𝑥 2 𝑦 − 𝑥𝑦 2
= = 3
𝑑𝑥 𝐵 𝑥, 𝑦 𝑥 + 𝑦3

*A function 𝑓 𝑥, 𝑦 is homogeneous of n degree if for any λ, it obeys 𝑓 𝜆𝑥, 𝜆𝑦 = 𝜆 𝑛 𝑓 𝑥, 𝑦

𝐴 𝜆𝑥, 𝜆𝑦 3=2 𝜆𝑥 2 3𝜆𝑦 2 − 𝜆𝑥 𝜆𝑦 2


= 𝜆3 𝑥 𝑦 − 𝜆 𝑥𝑦
= 𝜆 𝐴 𝑥, 𝑦

𝐵 𝜆𝑥, 𝜆𝑦 3= 3𝜆𝑥 33+ 𝜆𝑦 3


= 𝜆3 𝑥 + 𝑦
= 𝜆 𝐵 𝑥, 𝑦

Therefore, A and B are both homogeneous functions of 3rd degree (n = 3)


The ODE above is a homogeneous equation and can be reduced to a separable equation

38
• To separate the equation
𝑑𝑦 𝐴 𝑥,𝑦 𝑥 2 𝑦−𝑥𝑦 2
= =
𝑑𝑥 𝐵 𝑥,𝑦 𝑥 3 +𝑦 3

𝑑𝑦 𝑑𝑢
Make substitution 𝑦 = 𝑢𝑥 and =𝑢+𝑥 for the above equation (product rule)
𝑑𝑥 𝑑𝑥
𝑑𝑢
𝑢+ 𝑥 =𝐹 𝑢
𝑑𝑥
𝑑𝑢
𝑥 =𝐹 𝑢 −𝑢
𝑑𝑥

This is now a separable equation and can be integrated


1 1
‫ 𝑢 𝐹 ׬‬−𝑢 𝑑𝑢 = ‫𝑥𝑑 𝑥 ׬‬ - Answer

39
• Example 2
Find the general solution to the homogeneous ODE

𝑑𝑦 𝑥 + 𝑦
=
𝑑𝑥 𝑥

Answer: 𝑥 ln 𝑥 + 𝑥𝐶
40
• Example 3
Find the particular solution of the following differential equation that
satisfies the initial condition 𝑦 1 = 2

𝑑𝑦 𝑦 2 + 𝑥 2
=
𝑑𝑥 2𝑥𝑦

Answer: 𝑦 2 = 3𝑥 + 𝑥 2
41
• Exercise (Homogeneous ODE)
Find the general solution to the following equations:

𝑑𝑦 𝑥 2 +3𝑦 2
1. = Answer: 𝑥 2 + 𝑦 2 − 𝐶𝑥 3 = 0
𝑑𝑥 2𝑥𝑦

𝑑𝑦 𝑦 𝑦
2. = + tan Answer: 𝑦 = 𝑥 sin−1 𝐴𝑥
𝑑𝑥 𝑥 𝑥

𝑑𝑦 𝑦−𝑥 1 𝑦 2 𝑦
3. = Answer: ln + 1 + tan−1 = − ln 𝑥 + 𝐶
𝑑𝑥 𝑦+𝑥 2 𝑥 𝑥

42
Exact ODEs
• Form of ODE:
𝑑𝑦 𝑀 𝑥, 𝑦
=−
𝑑𝑥 𝑁 𝑥, 𝑦

𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0

𝜕𝑀 𝜕𝑁
• The equation is an exact differential equation if and only if =
𝜕𝑦 𝜕𝑥
𝜕𝑀 𝜕𝑁
• If ≠ , it is called and inexact equation
𝜕𝑦 𝜕𝑥

43
• Method of solution:
𝑑𝑦
1. Rearrange the equation into the form: 𝑀 𝑥, 𝑦 + 𝑁 𝑥, 𝑦 =0
𝑑𝑥
2. Check the exactness of equation
3. *Substitute into the general solution given by:

𝜕 ‫𝑥 𝑀 ׬‬, 𝑦 𝑑𝑥
න 𝑀 𝑥, 𝑦 𝑑𝑥 − න − 𝑁 𝑥, 𝑦 𝑑𝑦 = 𝐶
𝜕𝑦

44
• Example 1 (Exact ODE)
Solve the following differential equation:
𝑑𝑦
𝑥 + 3𝑥 + 𝑦 = 0
𝑑𝑥

3 2
Answer: 𝑥 + 𝑥𝑦 = 𝐶
2

45
• Example 2
Solve the following differential equation:
2𝑥𝑦 𝑑𝑥 + 𝑥 2 + 3𝑦 2 𝑑𝑦 = 0

Answer: 𝑥 2 𝑦 + 𝑦 3 = 𝐶

46
• Exercise
• Prove that the following ODE is exact
• Find the general solution for the equation

2 2
𝑑𝑦
2𝑥𝑦 + 1 + 𝑥 + 3𝑦 =0
𝑑𝑥

Answer: 𝑥 2 𝑦 + 𝑥 + 𝑦 3 = 𝐶

47
Linear In-exact ODE
• Form of ODE
𝑑𝑦
+𝑃 𝑥 𝑦 =𝑄 𝑥
𝑑𝑥

𝜕𝑀 𝜕𝑁
• When ≠ for an ODE in the form 𝑀 𝑥, 𝑦 𝑑𝑥 + 𝑁 𝑥, 𝑦 𝑑𝑦 = 0,
𝜕𝑦 𝜕𝑥
we have an inexact equation
• This type of equation can be made exact by multiplying by an
integrating factor 𝜇 𝑥 which is always a function of x alone
48
Notes of the integrating factor
An integrating factor must be such that:
𝑑𝑦 𝑑
𝜇 𝑥 +𝜇 𝑥 𝑃 𝑥 𝑦= 𝜇 𝑥 𝑦 =𝜇 𝑥 𝑄 𝑥
𝑑𝑥 𝑑𝑥

which may then be integrated directly to give:


𝜇 𝑥, 𝑦 = ‫𝑥𝑑 𝑥 𝑄 𝑥 𝜇 ׬‬

The required integrating factor 𝜇 𝑥 is determined by the first equality:


𝑑 𝜇𝑥 𝑑𝑦 𝑑𝜇 𝑑𝑦
= 𝜇 + 𝑦 = 𝜇 + 𝜇𝑃𝑦
𝑑𝑥 𝑑𝑥 𝑑𝑥 𝑑𝑥

which gives the relation


𝑑𝜇
=𝜇 𝑥 𝑃 𝑥
𝑑𝑥

𝜇 𝑥 = 𝑒𝑥𝑝 ‫𝑃 ׬ 𝑒 𝑟𝑜 𝑥𝑑 𝑥 𝑃 ׬‬ 𝑥 𝑑𝑥

𝑦 𝑥 = 𝑒− ‫𝑃 ׬‬ 𝑥 𝑑𝑥
‫𝑃 ׬𝑒 ׬‬ 𝑥 𝑑𝑥
𝑄 𝑥 𝑑𝑥 + 𝐶

49
• Method of solution:
𝑑𝑦
1. Rearrange the equation in the form + 𝑝 𝑥 𝑦 = 𝑓 𝑥
𝑑𝑥
2. Identify 𝑝 𝑥 from the equation
3. Find the integrating factor 𝜇 𝑥 = 𝑒 ‫𝑥𝑑 𝑥 𝑝 ׬‬
4. Multiply the differential equation by 𝜇 𝑥 , i.e.
𝑑𝑦
𝜇 𝑥 +𝜇 𝑥 𝑝 𝑥 𝑦=𝜇 𝑥 𝑓 𝑥
𝑑𝑥
5. The left side is now equal to the derivative of the product of 𝜇 𝑥 and 𝑦
6. Integrate both sides of the equation to obtain solution.
*After integrating, the LHS will simply be the product of 𝜇 𝑥 and 𝑦

50
• Example 1 (Linear inexact equation)
Solve
𝑑𝑦 2
+ 𝑦 =𝑥−1
𝑑𝑥 𝑥

1 2 1 𝐶
Answer: 𝑦 = 𝑥 − 𝑥 + 2
4 3 𝑥

51
• Example 2
Solve
𝑑𝑦
𝑥 − 4𝑦 = 𝑥 6 𝑒 𝑥
𝑑𝑥

Answer: 𝑦 = 𝑥 5 𝑒 𝑥 − 𝑥 4 𝑒 𝑥 + 𝐶𝑥 4
52
• Exercise
Solve the following ODEs

𝑑𝑦
+ 2𝑥𝑦 = 4𝑥
𝑑𝑥

2 2 𝑑𝑦
3𝑥𝑦 + 𝑦 + 𝑥 + 𝑥𝑦 =0
𝑑𝑥

53
Some Applications
Population Growth
• P = population t = time [days]
• Rate of change of population with respect to time (i.e. population growth)
is proportional to the number of population
𝑑𝑃
= 𝑘𝑃
𝑑𝑡
• This is a separable differential equation
1
‫𝑡𝑑𝑘 ׬ = 𝑃𝑑 𝑃 ׬‬
ln 𝑃 = 𝑘𝑡 + 𝑐1
𝑃 = 𝑒 𝑘𝑡+𝑐1 = 𝑒 𝑘𝑡 𝑒 𝑐1 = 𝐶𝑒 𝑘𝑡
𝑃 = 𝐶𝑒 𝑘𝑡 (general solution)

54
• Now we may find the particular From the second initial condition
solution if the initial conditions 200 = 100𝑒 𝑘 50
are given 2 = 𝑒 50𝑘
• For example: ln 2 = 50𝑘
𝑃 0 = 100, i.e. at 𝑡 = 0, 𝑃 = 100 ln 2
𝑘=
𝑃 50 = 200, i.e. at 𝑡 = 50, 𝑃 = 200 50
The particular solution is:
So, from 𝑃 = 𝐶𝑒 𝑘𝑡 ln 2
𝑡
100 = 𝐶𝑒 𝑘 0 = 𝐶 𝑃 𝑡 = 100𝑒 50

Therefore, 𝑃 = 100𝑒 𝑘𝑡
55
Example 1
The population of Parit Raja can be modelled by the equation:
𝑑𝑃
= 𝑘𝑃
𝑑𝑡
Where P is population, t is time (in years) and k is a constant. Based on
national yearly census, the population was found to increase from
11000 in 2009 to 18000 in 2019. Predict the year when the population
of Parit Raja reaches double of that in 2019.

56
• Exercise x = maximum
A projectile is shot vertically upwards from v=0
the earth’s surface with air resistance equal
to kv2g [m/s2], where v is the velocity [m/s],
g is gravitational acceleration [m/s2] and k
is a constant. If the initial velocity of the h
projectile is U, find the maximum height
achieved by the projectile.
Take distance to be x v=U
1
Answer: ℎ = ln 1 + 𝑘𝑢2 meter
2𝑘𝑔

57

You might also like