You are on page 1of 76

DIFFERENTIAL

EQUATIONS
PREPARED BY: MS NURHAKIMAH BINTI ABD AZIZ
OBJECTIVES
OBJECTIVES
Differential Equations
 DEFINITION

A Differential Equation is an equation containing the derivative

of one or more dependent variables with respect to one or

more independent variables.

 Example:

Dependent variable: 𝑦
𝑑𝑦
+ 𝑥 = 𝑥𝑦 Independent variable: 𝑥
𝑑𝑥
Differential Equations
 INTRODUCTION
 First order differential equation (ODE):
d𝑞 d𝑦 d𝑦
• Involves with first derivative such as , or .
d𝑡 d𝑡 d𝑥

• Example:

𝑑𝑦
= 2𝑥 + 3
𝑑𝑥

𝑑𝑦
= 𝑥 2 + 𝑥 + 𝑥𝑦 + 𝑦
𝑑𝑥
FIRST ORDER DIFFERENTIAL EQUATION
 INTRODUCTION
 First-order dlinear ifferential equation (ODE):
 Any linear first ODE may be written as:
FIRST ORDER DIFFERENTIAL EQUATION
 INTRODUCTION Linear because:

 Example: • the only terms involve 𝑦 are


𝑑𝑦 𝑑𝑦
= 𝑥 2 − 𝑥𝑦 and −𝑥𝑦.
𝑑𝑥
𝑑𝑥
Can be rewritten as: • No terms in 𝑦2, 3 𝑑𝑦 2
𝑦 , 𝑑𝑥 ,etc.
𝑑𝑦
+ 𝑥𝑦 = 𝑥 2
𝑑𝑥
Therefore:
𝑃 𝑥 =𝑥
𝑄 𝑥 = 𝑥2
FIRST ORDER DIFFERENTIAL EQUATION
 GENERAL SOLUTION
 Consider:
d𝑦 𝑥 d𝑦 1
𝑥 +𝑦 =𝑥 − 2 + = 𝑥2
d𝑥 𝑦 d𝑥 𝑦
FIRST ORDER DIFFERENTIAL EQUATION

Example:
Find the general solution of the differential equation:
𝑑𝑦 2 4
+ 𝑦= for 𝑥 ≠ 0.
𝑑𝑥 𝑥 𝑥2

1: To solve a linear differential equation, write it in standard form to identify the functions
𝑃(𝑥) and 𝑄(𝑥).
2: Try: Multiply by 𝑥 2 .
3: LHS – the expression when differentiate 𝑥 2 𝑦 with respect to 𝑥 (implicit differentiation)
using the product rule.
4: Equate with RHS.
5.Integrate both sides with respect to 𝑥.
6.Find general solution.
FIRST ORDER DIFFERENTIAL EQUATION

 Integrating Factor
From previous example, 𝑥 2 is an example of integrating factor: multiplying
by it made the LHS a perfect derivative.
FIRST ORDER DIFFERENTIAL EQUATION

Integrating Factor:
Any First ODE that written in the standard form can be

multiplied by an integrating factor 𝐈 = 𝒆‫ 𝒙𝒅 )𝒙(𝐏 ׬‬to find the


general solution.
FIRST ORDER DIFFERENTIAL EQUATION

 Examples:
 Find the general solutions of:
𝑑𝑦
I. + 3𝑦 = 𝑥.
𝑑𝑥

𝑑𝑦
II. 𝑥 − 2𝑦 = 𝑥 4 .
𝑑𝑥
FIRST ORDER DIFFERENTIAL EQUATION

 EXAMPLE
Find the general solution of
𝑑𝑦
I. ( cot 𝑡) + 𝑦 = cosec 𝑡 − sin 𝑡
𝑑𝑡
𝑑𝑦
II. (tan 𝑥) + 𝑦 = 𝑒 2𝑥 tan 𝑥
𝑑𝑥

.
FIRST ORDER DIFFERENTIAL EQUATION

 Particular solution when boundary condition given.


 Examples:
d𝑥
I. Find the particular solution of 𝑡 + 3𝑥 = 𝑡 2 + 1, with initial conditions 𝑥 =
d𝑡

1, 𝑡 = 1.

𝑑𝑦
II. Solve + 𝑦 coth 𝑡 = 2𝑒 3𝑡 that has initial conditions 𝑦 = 0, 𝑡 = 0.
𝑑𝑡
FIRST ORDER DIFFERENTIAL EQUATION

 SPECIMEN 2020
FIRST ORDER DIFFERENTIAL EQUATION
SECOND ORDER DIFFERENTIAL EQUATION
 Solution of linear homogeneous equation – Complementary Function:
 Consider:
𝑑𝑦
− 𝑛𝑦 = 0 RHS is 0.
𝑑𝑥

Constant
coefficients
𝑑𝑦
= 𝑛𝑦
𝑑𝑥
1
න 𝑑𝑦 = න 𝑛 𝑑𝑥
𝑦
ln 𝑦 = 𝑛𝑥 + 𝑐
𝑦 = 𝑒 𝑛𝑥+𝑐
Therefore, 𝑦 = 𝐴𝑒 𝑛𝑥
SECOND ORDER DIFFERENTIAL EQUATION

 The Auxiliary Equation Method


 Equation that derived from homogenous differential equation by
substituting the solutions of the equation.
SECOND ORDER DIFFERENTIAL EQUATION

 Example:
𝑑𝑦
5 +𝑦 =0
𝑑𝑥
Let 𝑦 = 𝐴𝑒 𝑛𝑥
Since it is solution, therefore it must satisfy the original differential equation.
𝑑𝑦
= 𝑛𝐴𝑒 𝑛𝑥
𝑑𝑥

Then, substitute:
5𝑛𝐴𝑒 𝑛𝑥 + 𝐴𝑒 𝑛𝑥 = 0 Dividing by 𝐴𝑒 𝑛𝑥 .

5𝑛 + 1 = 0 Auxiliary equation
1
𝑛 = −5
1
So, the general solution: 𝑦 = 𝐴𝑒 −5𝑥 Also known as COMPLEMENTARY FUNCTION.
SECOND ORDER DIFFERENTIAL EQUATION
 Example

d𝑧
I. − 3𝑧 = 0.
d𝑡

d𝑝
II. − 0.02𝑝 = 0.
d𝑡
SECOND ORDER DIFFERENTIAL EQUATION

 Second order differential equations (ODEs).


 General form of second ODEs with constant coefficients:

 Where a, b and c are constants.


 When 𝑓(𝑥) = 0,

Homogenous differential
equation
SECOND ORDER DIFFERENTIAL EQUATION

 Complementary function:

 The general solution of a homogenous differential equation.

 Always contain two arbitrary constants, as it is 2nd order differential equation.


𝑦𝑐𝑓 𝑥 = 𝐴𝑦1 𝑥 + 𝐵𝑦2 𝑥

where 𝑦1 𝑥 𝑎𝑛𝑑 𝑦2 𝑥 are linearly independent (one is not a multiple of the


other).

 Solved by using substitution:


𝑦 = 𝐴𝑒 𝑛𝑥
SECOND ORDER DIFFERENTIAL EQUATION
 Auxiliary equation for second ODE:
 Quadratic equation that derived from homogenous 2nd ODE and satisfies its
homogenous differential equation.

 Types of solution of quadratic equation (auxiliary equation)

 Type 1 solution: Two real and different roots - 𝑏2 − 4𝑎𝑐 > 0

 Type 2 solution: Two real and equal roots - 𝑏2 − 4𝑎𝑐 = 0

 Type 3 solution: Two complex roots


SECOND ORDER DIFFERENTIAL EQUATION
 Complementary function and auxiliary equation:
 Type 1 solution: Two real and different roots, 𝒏𝟏 and 𝒏𝟐 (𝒏𝟏 ≠ 𝒏𝟐 )

 The general solution (complementary function) of differential equation:

𝑦 = 𝐴𝑒 𝑛1𝑥 + 𝐵𝑒 𝑛2𝑥
where A and B are arbitrary constants.
SECOND ORDER DIFFERENTIAL EQUATION

 Examples:
𝑑2𝑦 𝑑𝑦
I. Find the general solution of 𝑑𝑥 2
+ 3 𝑑𝑥 − 10𝑦 = 0.
𝑑2𝑦 𝑑𝑦
II. Find the general solution of 𝑑𝑥 2
− 5 𝑑𝑥 + 6𝑦 = 0.
Particular solution

𝑑2𝑦 𝑑𝑦
I. Find 𝑦 when 2 𝑑𝑥 2 − 𝑑𝑥 − 3𝑦 = 0, given that 𝑥 = 0 when 𝑦 = 2 and 𝑦 is finite as 𝑥 tends
to infinity.

𝑑2𝑦 𝑑𝑦
II. Find the particular solution of 𝑑𝑥 2
+ 4 𝑑𝑥 + 3𝑦 = 0 subject to the conditions 𝑦 = 0 and
𝑑𝑦
𝑑𝑥
= 1 when 𝑥 = 0.
𝑑2 𝑦 𝑑𝑦
I. Find the general solution of +3 − 10𝑦 = 0.
𝑑𝑥 2 𝑑𝑥
𝑑2 𝑦 𝑑𝑦
I. Find 𝑦 when 2 𝑑𝑥 2 − 𝑑𝑥 − 3𝑦 = 0, given that 𝑥 = 0 when 𝑦 = 2 and 𝑦 is finite as

𝑥 tends to infinity.
𝑑2 𝑦 𝑑𝑦
Find the particular solution of + 4 𝑑𝑥 + 3𝑦 = 0 subject to the conditions 𝑦 = 0
𝑑𝑥 2

𝑑𝑦
and = 1 when 𝑥 = 0.
𝑑𝑥
SECOND ORDER DIFFERENTIAL EQUATION
 Type 2 solution: Two real and equal roots, 𝒏𝟏 = 𝒏𝟐 = 𝒏.

 The general solution (complementary function) of differential equation:

One arbitrary constant


𝑦 = 𝐴𝑒 𝑛𝑥 + 𝐵𝑒 𝑛𝑥 = (𝐴 + 𝐵)𝑒 𝑛𝑥
Note: 2nd ODE must have
𝑦 = 𝐴𝑒 𝑛𝑥 + 𝐵𝑥𝑒 𝑛𝑥 2 arbitrary constants.

𝑦 = (𝐴 + 𝐵𝑥)𝑒 𝑛𝑥

Where A and B are arbitrary constants.


SECOND ORDER DIFFERENTIAL EQUATION
 Examples:
𝑑2𝑦 𝑑𝑦
I. Find the general solution of +8 + 16𝑦 = 0.
𝑑𝑥 2 𝑑𝑥

𝑑2𝑧 𝑑𝑧 𝑑𝑧
II. Find the general solution of +6 + 9𝑧 = 0 for 𝑧 = 0 and = 5 when 𝑡 = 0.
𝑑𝑡 2 𝑑𝑡 𝑑𝑡
𝑑2 𝑦 𝑑𝑦
I. Find the general solution of 𝑑𝑥 2 + 8 𝑑𝑥 + 16𝑦 = 0.
SECOND ORDER DIFFERENTIAL EQUATION
 Type 3 solution: Two complex roots, 𝒂𝟏 ± 𝒊𝒂𝟐
 The general solution (complementary function) of differential equation:

𝑦 = 𝑒 𝒂𝟏 𝑥 (𝐴 cos 𝒂𝟐 𝑥 + 𝐵 sin 𝒂𝟐 𝑥 )

where:
𝒂𝟏 is the real (Re) part of complex number,
𝒂𝟐 is the imaginary (Im) part of complex number,
SECOND ORDER DIFFERENTIAL EQUATION
 Examples:

𝑑2 𝑦 𝑑𝑦 𝑑𝑦
I. Solve −2 + 3𝑦 = 0, given that 𝑦 = 0 and = 6, when 𝑥 = 0.
𝑑𝑥 2 𝑑𝑥 𝑑𝑥

𝑑2𝑥
II. Find the particular solution of + 4𝑥 = 0 in the case for which 𝑥 = 2 and
𝑑𝑡 2
𝑑𝑥
= −2 when 𝑡 = 0.
𝑑𝑡

𝑑2 𝑦 𝑑𝑦
III. Find the particular solution of +2 + 5𝑦 = 0 which satisfies the initial
𝑑𝑥 2 𝑑𝑥
𝑑𝑦
conditions 𝑦 = 0 and = 1 when 𝑥 = 0.
𝑑𝑥
𝑑2 𝑦 𝑑𝑦 𝑑𝑦
I. Solve − 2 𝑑𝑥 + 3𝑦 = 0, given that 𝑦 = 0 and = 6, when 𝑥 = 0.
𝑑𝑥 2 𝑑𝑥
SECOND ORDER DIFFERENTIAL EQUATION
 Non-homogenous differential equation
 For example:
𝑑𝑦
I. Solution of homogenous equation: + 2𝑦 = 0 is 𝑦 = 𝐴𝑒 −2𝑥 .
𝑑𝑥

II. Solution of non-homogenous equation:


 RHS - Linear function :
𝑑𝑦 3 5
+ 2𝑦 = 𝟑𝒙 − 𝟏 is 𝑦 = 𝐴𝑒 −2𝑥 + 𝑥 −
𝑑𝑥 2 4

 RHS - Exponential function:


𝑑𝑦 1
+ 2𝑦 = 𝒆𝟑𝒙 is 𝑦 = 𝐴𝑒 −2𝑥 + 𝑒 3𝑥 Particular integral function
𝑑𝑥 5

 RHS – Trigonometric function:


𝑑𝑦 1 2
+ 2𝑦 = 𝐬𝐢𝐧 𝒙 is 𝑦 = 𝐴𝑒 −2𝑥 − cos 𝑥 + sin 𝑥
𝑑𝑥 5 5
SECOND ORDER DIFFERENTIAL EQUATION
 General solution of non(in)homogeneous 2nd ODE:


𝒚 = 𝒚𝒄𝒇 + 𝒚𝑷𝑰

Where 𝑦𝐶𝐹 is the complementary function (CF) and 𝑦𝑃𝐼 is the particular integral
function (PI).
SECOND ORDER DIFFERENTIAL EQUATION

 Particular Integral Function (PI)

 It depends on the function at the RHS.

 In order to find a suitable PI, we can use the trial function approach.

 The trial function needs match the RHS of the differential equation.

 Possible types the RHS function:

I. Linear function

II. Polynomial function

III. Exponential function

IV. Trigonometric function


SECOND ORDER DIFFERENTIAL EQUATION

 Particular Integral (PI) – Table for trial function.

Right-hand side (RHS) function Trial function

Linear function 𝑎𝑥 + 𝑏

Polynomial function 𝑎𝑛 𝑥 𝑛 + 𝑎𝑛−1 𝑥 𝑛−1 + ⋯ + 𝑎1 𝑥 + 𝑎0


Trigonometric function involving
𝑎 cos 𝑝𝑥 + 𝑏 sin 𝑝𝑥
cos 𝑝𝑥 and/or sin 𝑝𝑥
Exponential function, 𝑒 𝑝𝑥 𝑎𝑒 𝑝𝑥

Sum of different functions Sum of matching functions


SECOND ORDER DIFFERENTIAL EQUATION

 Constant and Linear function.


 The particular integral will also be a constant and linear function.
 Examples:

𝑑2 𝑥 𝑑𝑥
I. +3 − 4𝑥 = 8
𝑑𝑡 2 𝑑𝑡

𝑑2 𝑦 𝑑𝑦
II. −2 − 3𝑦 = 6𝑥 − 2
𝑑𝑥 2 𝑑𝑥
𝑑2 𝑥 𝑑𝑥
I. 𝑑𝑡 2
+3
𝑑𝑡
− 4𝑥 = 8
SECOND ORDER DIFFERENTIAL EQUATION

 Polynomial function of degree 𝑛.


Examples:
Find the general solution of:

𝑑2𝑦 𝑑𝑦
I.
𝑑𝑥 2
+ 3 𝑑𝑥 − 4𝑦 = 3 + 8𝑥 2

𝑑2𝑦 𝑑𝑦
II. + 3 𝑑𝑥 − 10𝑦 = 3𝑥 2
𝑑𝑥 2

Particular solution:

𝑑2𝑦 𝑑𝑦
I. Find the solution of 𝑑𝑥 2
+ 3 𝑑𝑥 − 4𝑦 = 2 + 8𝑥 2 given that when 𝑥 = 0, 𝑦 = 0
𝑑𝑦
and 𝑑𝑥 = 1.
𝑑2𝑦 𝑑𝑦 2
+ 3 − 4𝑦 = 3 + 8𝑥
𝑑𝑥 2 𝑑𝑥
𝑑2𝑦 𝑑𝑦 2
+ 3 − 10𝑦 = 3𝑥
𝑑𝑥 2 𝑑𝑥
𝑑2𝑦 𝑑𝑦
I. Find the solution of +3 − 4𝑦 = 2 + 8𝑥 2 given that when 𝑥 = 0, 𝑦 = 0
𝑑𝑥 2 𝑑𝑥

𝑑𝑦
and = 1.
𝑑𝑥
SECOND ORDER DIFFERENTIAL EQUATION
 Exponential function
 Examples:
Find the general solution of:

𝑑2𝑦 𝑑𝑦
I. +3 − 4𝑦 = 3𝑒 7𝑥
𝑑𝑥 2 𝑑𝑥

𝑑2𝑦 𝑑𝑦
II. + − 2𝑦 = 3𝑒 −𝑥
𝑑𝑥 2 𝑑𝑥

III. 𝑦 ′′ − 4𝑦 ′ + 4𝑦 = 3𝑒 2𝑥

Particular solution:
𝑑2𝑦 𝑑𝑦 𝑑𝑦
Solve − − 2𝑦 = 3𝑒 2𝑥 , given that 𝑦 = 0 and = 11 when 𝑥 = 0.
𝑑𝑥 2 𝑑𝑥 𝑑𝑥
𝑦 ′′ − 4𝑦 ′ + 4𝑦 = 3𝑒 2𝑥
𝑑2𝑦 𝑑𝑦 7𝑥
+ 3 − 4𝑦 = 3𝑒
𝑑𝑥 2 𝑑𝑥
𝑑 2 𝑦 𝑑𝑦 −𝑥
+ − 2𝑦 = 3𝑒
𝑑𝑥 2 𝑑𝑥
𝑦 ′′ − 4𝑦 ′ + 4𝑦 = 3𝑒 2𝑥
𝑑2 𝑦 𝑑𝑦 𝑑𝑦
Solve − 𝑑𝑥 − 2𝑦 = 3𝑒 2𝑥 , given that 𝑦 = 0 and 𝑑𝑥 = 11 when 𝑥 = 0.
𝑑𝑥 2
SECOND ORDER DIFFERENTIAL EQUATION

 Trigonometric function
Examples:
i.

ii.

iii.
Recall back!!!

 Until now, we can solve the following three types of differential equation:

I. First order requiring an integrating factor (IF).

II. Homogenous equation of first and second order differential equations.

 Complementary function, 𝑦𝐶𝐹 .

III. Non homogenous equation of second order differential equation.

 Requiring particular integral function, 𝑦𝑃𝐼 which find using trial function
approach.

 General solution: 𝑦 = 𝑦𝐶𝐹 + 𝑦𝑃𝐼 .


DIFFERENTIAL EQUATION

 Solution of differential equations by substitution:

Substitution method:

 To convert a complex (difficult) form of differential equation to

the standard form.


DIFFERENTIAL EQUATION

 Examples:

𝑑 𝑦 2 𝑑𝑦
I. Solve 𝑥2 2 − 2𝑥 − 10𝑦 = 0 using the substitution 𝑥 = 𝑒 𝑢 .
𝑑𝑥 𝑑𝑥

II. By using the substitution 𝑥 = 𝑡 , show that the equation


𝑑2𝑦 1 𝑑𝑦 𝑑2𝑦
− + 4𝑥 9𝑦 + 6 = 0 can be written as
2
+ 9𝑦 = −6.
𝑑𝑥 2 𝑥 𝑑𝑥 𝑑𝑡 2

Hence find the general solution.


2
𝑑 𝑦 𝑑𝑦
I. Solve 𝑥2 2 − 2𝑥 − 10𝑦 = 0 using the
𝑑𝑥 𝑑𝑥

substitution 𝑥 = 𝑒 𝑢 .
DIFFERENTIAL EQUATION

 Example:

Prove that
DIFFERENTIAL EQUATION
 MAY/JUNE 2011 – PAPER 11 – Q7

You might also like