You are on page 1of 43

Differential

Equations
BDA 24303nd
Chapter 2 – 2 Order Linear Differential
Equation with Constant
Coefficients
By:
Assoc. Prof Ir. Ts. Dr Bukhari bin Manshoor
Dept. of Mechanical Engineering
Faculty of Mechanical & Manufacturing Engineering

© Dr. Bukhari bin Manshoor


2nd Order Linear Differential Equation with
Constant Coefficient
● Homogeneous equation.
● Non-homogeneous equation.
● Methods of solving non-homogeneous equation:
- Method of undetermined coefficients.
- Method of variation of parameters.
● Applications in mechanical motions:
- Free oscillations.
- Force oscillations.
Linear of 2nd ODEs
● 2nd order differential equation is called linear if it can be written as;

𝑦 ′ ′ +𝑝 ( 𝑥 ) 𝑦 ′ +𝑞 ( 𝑥 ) 𝑦=𝑟 ( 𝑥 )
● Otherwise, it is non-linear.
● The equation are called homogeneous if
● If , the equation is called non-homogeneous.
● Example of the equations;
′′ −𝑥
𝑦 +4 𝑦=𝑒 sin 𝑥 ---------- Non-homogeneous linear differential equation

′′ ′
( 1− 𝑥 ) 𝑦 − 2 𝑥 𝑦 +6 𝑦 =0 ---------- Homogeneous linear differential equation

𝑥 ( 𝑦 ′ ′ 𝑦 + 𝑦 ′ 2 )+ 2 𝑦 ′ 𝑦=0 ---------- Non-linear differential equation


● The backbone of solution structure for homogeneous equation is the superposition principle
or linearity principle.
Homogeneous Equation – Superposition Principle
● A fundamental says that if we know the solution, and of the linear homogenous
equation, then any linear combination of
𝑦 =𝑦 1 𝐶 1 + 𝑦 2 𝐶 2
is also a solution for any constants and .
● Suppose we wish to solve the 2nd order homogeneous differential equation;
𝑦 ′ ′ + 𝑎 𝑦 ′ +𝑏𝑦 =0 a and b are constants.
● Assume is a solution to the equation above.
● Two differentiations of this exponential function give;

𝑦 ′ =𝑟 𝑒𝑟𝑥 𝑦 ′ ′ =𝑟 2 𝑒 𝑟𝑥
● Substitute into the differential equation, and divide by ;

( 𝑟 2 𝑒 𝑟𝑥 ) 𝑎 ( 𝑟 𝑒 𝑟𝑥 ) 𝑏 ( 𝑒 𝑟𝑥 )
𝑟𝑥
+ 𝑟𝑥
+ 𝑟𝑥
=0
𝑒 𝑒 𝑒
● We obtain the characteristic equation (or auxiliary equation) of the differential eqn.
2
𝑟 +𝑎𝑟 +𝑏=0
● Thus, is a solution to the equation if and only if is a solution to the algebraic
equation.
● The characteristic equation obtained is a quadratic equation with roots

− 𝑎+ √ 𝑎 − 4 𝑏 − 𝑎− √ 𝑎 − 4 𝑏
2 2
𝑟 1= and 𝑟 2=
2 2
● Therefore, the solution to the equation are;
𝑟1 𝑥 𝑟2 𝑥
𝑦 1 =𝑒 and 𝑦 2 =𝑒
● There are 3 cases to consider which depend on the value of the discriminant
2
Case 1: 𝑎 − 4 𝑏>0 ----- two real roots.

2
Case 2: 𝑎 − 4 𝑏= 0 ----- a real double roots.

Case 3: 𝑎 2 − 4 𝑏<0 ----- complex conjugate roots. Back


Case 1: a2 – 4b > 0
● In this case the characteristic equation has two real and unequal roots, and
● Two linearly independent solutions to the differential equation on any interval are
𝑟1 𝑥 𝑟2 𝑥
𝑦 1 =𝑒 and 𝑦 2 =𝑒
since and are defined (and real) for all x and their quotient is not constant ( is not
a constant multiple of ).
● The corresponding general solution is,
𝑟1𝑥 𝑟2𝑥
𝑦 =𝐶 1 𝑒 +𝐶 2 𝑒
Example:
𝑦 ′ ′ − 𝑦 ′ −6 𝑦=0 Find the general solution of the differential equation.

- Let the solution of the differential equation is i.e. and


- Substitute into the differential equation, and divide by ;
𝑟 2 𝑒 𝑟𝑥 𝑟 𝑒𝑟𝑥 6 𝑒 𝑟𝑥
𝑟𝑥
− 𝑟𝑥 − 𝑟𝑥 =0
𝑒 𝑒 𝑒
- The characteristic equation of the differential eqn.; From the characteristic equation;
2
𝑟 −𝑟 −6=0 𝑎=− 1𝑏=− 6
- The roots for this characteristic equation are;
− 𝑎+ √ 𝑎 − 4 𝑏 − ( −1 )+ √ ( − 1 ) − 4 ( − 6 )
2 2
𝑟 1= = =3
2 2
----- two real roots.
− 𝑎− √ 𝑎 − 4 𝑏 − (− 1 ) − √ ( −1 ) − 4 ( −6 )
2 2
𝑟 2= = =−2
2 2
3𝑥 −2 𝑥
- The general solution is; 𝑦 =𝐶 1 𝑒 + 𝐶 2 𝑒
Case 2: a2 – 4b = 0
● In this case the auxiliary equation has two real and equal roots, and
− 𝑎+ √ 0 − 𝑎 − 𝑎− √ 0 −𝑎
𝑟 1= = 𝑟 2= =
2 2 2 2
● Then, we have one solution.

𝑦 1 =𝑒 𝑟𝑥 with 𝑟 = − 𝑎
2
● 2nd independent solution, can be obtain by the Reduction of Order Method.
● Let setting
i.e.
and
● Substitute into the differential equation;

( 1
𝑢′′
𝑦 +2𝑢′
𝑦 ′ 1 +𝑢 𝑦 ′ ′ 1) +𝑎 ( 𝑦 1+𝑢 𝑦 ′ 1 )+𝑏𝑢 𝑦 1=0
𝑢′

𝑢′ ′ 𝑦 1+𝑢′ ( 2 𝑦 ′ 1 +𝑎 𝑦 1 )+𝑢 ( 𝑦 ′ ′1 +𝑎 𝑦 ′1 +𝑏 𝑦 1 ) =0
𝑢′ ′ 𝑦 1+𝑢′ ( 2 𝑦 ′ 1 +𝑎 𝑦 1 )+𝑢 ( 𝑦 ′ ′ 1 +𝑎 𝑦 ′1 +𝑏 𝑦 1 ) =0
𝑎𝑥 Since is a solution of the differential
𝑟𝑥 −
𝑦 1 =𝑒 2 𝑦 ′ 1 =−𝑎 𝑒 2
=− 𝑎 𝑦 1 equation, this term is zero.
2 𝑦 ′ 1 +𝑎 𝑦 1=0
● Thus, the equation left with;

𝑢′ ′ 𝑦 1=0
● By two integration,

𝑢=𝐶 1 𝑥+𝐶 2
● Let take . Since , then

𝑦 2 =𝑥 𝑦 1 =𝑥 𝑒 𝑟𝑥
● The corresponding general solution is

𝑦 =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒𝑟 𝑥
Example:
𝑦 ′ ′ +8 𝑦 ′ +16 𝑦 =0 Find the general solution of the differential equation.

- Let the solution of the differential equation is i.e. and


- Substitute into the differential equation, and divide by ;
𝑟 2 𝑒 𝑟𝑥 8 𝑟 𝑒𝑟𝑥 16 𝑒 𝑟𝑥
𝑟𝑥
+ 𝑟𝑥
+ 𝑟𝑥 =0
𝑒 𝑒 𝑒
- The characteristic equation of the differential eqn.; From the characteristic equation;
2 𝑎=8 𝑏=16
𝑟 +8 𝑟 +16=0
- The roots for this characteristic equation are;
− 𝑎+ √ 𝑎 − 4 𝑏 − ( 8 ) + √ ( 8 ) − 4 ( 16 )
2 2
𝑟 1= = =− 4
2 2
----- real double roots.
− 𝑎 − √ 𝑎 − 4 𝑏 − ( 8 ) − √ ( 8 ) − 4 ( 16 )
2 2
𝑟 2= = =− 4
2 2
−4 𝑥
- The general solution is; 𝑦 =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒
Case 3: a2 – 4b < 0
● In this case the auxiliary equation has two complex roots, and
𝑎 1 2 𝑎 1 2
𝑟 1=− + √ 𝑎 − 4𝑏=− +𝑖 𝑏− 𝑎
2 2 2 4
● Or, can be written in simple forms as;
√ 𝑎 1 2 𝑎

1 2
𝑟 2=− − √ 𝑎 − 4 𝑏=− − 𝑖 𝑏− 𝑎
2 2 2 4

𝑎 𝑎 where 1 2 1
𝑟 1=− +𝑖 𝜔 𝑟 2=− −𝑖 𝜔 √ 𝑎 − 4 𝑏= √ − 1 √ 4 𝑏 − 𝑎
2

2 2 2 2
● Previously we have a solution for the differential equation as follow. 1
𝑖√4𝑏− 𝑎
2
2

𝑦 1 =𝑒
𝑟1 𝑥
and 𝑦 2 =𝑒
𝑟2 𝑥
1
2 √
1
𝑖 √ 4𝑏− 𝑎 = 𝑖 √ 4 𝑏−𝑎
2
4
2

● Therefore;
√ 1
¿𝑖 𝑏− 𝑎2
4
( 𝑎2 ) 𝑥+𝑖 𝜔 𝑥

and
− ( 𝑎2 ) 𝑥− 𝑖 𝜔 𝑥
𝑦 1 =𝑒 𝑦 2 =𝑒
● The complex exponential function of complex variable can be define as;
𝑒 𝑧 =𝑒 𝑠+𝑖𝑡 =𝑒 𝑠 . 𝑒 𝑖𝑡 =𝑒 𝑠 ( cos 𝑡+𝑖 sin 𝑡 ) Euler formula

● Again we can rewrite the solution as; 𝑒 𝑖𝑥 =cos 𝑥 +𝑖 sin 𝑥


𝑒 −𝑖𝑥 =cos 𝑥 −𝑖 sin 𝑥
− ( 𝑎2 ) 𝑥 ( )
𝑦 1 =𝑒 cos 𝜔 𝑥+𝑖 sin 𝜔 𝑥 )
● General solution for the differential equation;𝑦 =𝑦 1 𝐶 1 + 𝑦 2 𝐶 2
− ( 𝑎2 ) 𝑥 ( − ( 𝑎2 ) 𝑥 (
𝑦 =𝐶 1 𝑒 cos 𝜔 𝑥 +𝑖 sin 𝜔 𝑥 ) +𝐶 2 𝑒 cos 𝜔 𝑥 − 𝑖 sin 𝜔 𝑥 )
− ( 𝑎2 ) 𝑥
¿𝑒 [ 𝐶 1 ( cos 𝜔 𝑥 +𝑖 sin 𝜔 𝑥 )+ 𝐶 2 ( cos 𝜔 𝑥 − 𝑖 sin 𝜔 𝑥 ) ]
−( ) 𝑥
𝑎

¿𝑒
2
[ ( 𝐶 1 +𝐶 2 ) cos 𝜔 𝑥 +𝑖 ( 𝐶 1+ 𝐶 2 ) sin 𝜔 𝑥 ]
● Hence a real general solution in this case is,

− ( 𝑎2 ) 𝑥 ( 𝐴=( 𝐶 1 − 𝐶 2 )
𝑦 =𝑒 𝐴 cos 𝜔 𝑥 + 𝐵 sin 𝜔 𝑥 )
Example:
𝑦 ′ ′ +0.4 𝑦 ′ +9.04 𝑦 =0 Find the general solution of the differential equation.

- Let the solution of the differential equation is i.e. and


- Substitute into the differential equation, and divide by ;
𝑟 2 𝑒 𝑟𝑥 0.4 𝑟 𝑒 𝑟𝑥 9.04 𝑒𝑟𝑥
𝑟𝑥
+ 𝑟𝑥
+ 𝑟𝑥
=0
𝑒 𝑒 𝑒
- The characteristic equation of the differential eqn.; From the characteristic equation;
2 𝑎=0.4 𝑏=9.04
𝑟 +0.4 𝑟 + 9.04=0
- The roots for this characteristic equation are;
− 𝑎+ √ 𝑎 − 4 𝑏 − ( 0.4 ) + √ ( 0.4 ) − 4 ( 9.04 )
2 2
𝑟 1= = =−0.2+3 𝑖
2 2
----- complex roots.
− 𝑎− √ 𝑎 − 4 𝑏 − ( 0.4 ) − √ ( 0.4 ) − 4 ( 9.04 )
2 2
𝑟 2= = =− 0.2− 3 𝑖
2 2

- The general solution is; 𝑦 =𝑒 −0.2 𝑥 ( 𝐴 cos 3 𝑥+ 𝐵 sin 3 𝑥 )


Summary of Cases 1 - 3
Case Roots Basis solution General solution
1 Real and distinct

2 Real double root

3 Complex conjugate

● In application to mechanical systems or electrical circuits, these three cases correspond to


three different forms of motion (flows of current for electric circuits).
● We shall discuss this basic relation between theory and practice in detail in the next
section.
Homogeneous Equation – Initial value problem.
𝑦 ′ ′ − 2 𝑦 ′ + 𝑦 =0 y ( 0 )=1 , 𝑦 ′ ( 0 )=−1 Find the particular solution of the differential equation.

- The characteristic equation of the differential eqn.; From the characteristic equation;
𝑎=− 2 𝑏=1
𝑟 2 −2 𝑟 +1=0 𝑎 − 4 𝑏=− 22 − 4 ( 1 )=0
2

- The roots for this characteristic equation; The characteristic equation has

𝑟 1=
− 𝑎+ √ 𝑎 − 4 𝑏
2
=
− ( − 2 ) + √ − 4 (1 ) =1
( 2 )
2 two real and equal roots;
𝑟 1=𝑟 2
2 2
− 𝑎 − √ 𝑎 − 4 𝑏 − (− 2 ) − √ ( 2 ) − 4 ( 1 )
2 2
𝑟 2= = =1
2 2 (a) 𝑦 ( 0 )=1
1=( 𝐶 1+ 𝐶 2 ( 0 ) ) 𝑒 ⇒ 𝐶 1=1
0
- The general solution is;
𝑦 =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒 𝑥 (b) 𝑦 ′ ( 0 )=− 1
Then, −1=𝐶 1 𝑒 0 +𝐶 2 ( 0+1 ) 𝑒 0 ⇒ 𝐶 2=− 2
𝑦 ′ =𝐶 1 𝑒 𝑥 +𝐶 2 ( 𝑥+1 ) 𝑒 𝑥
- The particular solution;
- Apply the initial value given;
𝑦 =( 1 −2 𝑥 ) 𝑒 𝑥
Homogeneous Equation – Initial value problem.
𝑦 ′ ′ + 𝑦 ′ − 2 𝑦 =0 y ( 0 )=4 , 𝑦 ′ ( 0 )=− 5 Solve the initial value problem.

- The characteristic equation of the differential eqn.; From the characteristic equation;
𝑎=1 𝑏=−2
𝑟 2 +𝑟 −2=0 𝑎 − 4 𝑏=1 2 − 4 ( − 2 )=9>0
2

- The roots for this characteristic equation; The characteristic equation has

√ − 4 ( −2 ) =1
two real and unequal roots;
− 𝑎+ √ 𝑎 − 4 𝑏
2 2
− ( 1 ) + ( 1 )
𝑟 1= =
2 2
− 𝑎 − √ 𝑎 − 4 𝑏 − (1 ) − √ ( 1 ) − 4 ( −2 )
2 2
𝑟 2= = =−2
2 2 (a) 𝑦 ( 0 )=4
0 − 2 (0 )
- The general solution is; 4 =𝐶 1 𝑒 +𝐶 2 𝑒 ⇒ 𝐶 1+ 𝐶 2=4
𝑦 =𝐶 1 𝑒 𝑥 + 𝐶 2 𝑒 −2 𝑥 (b) 𝑦 ′ ( 0 )=− 5
Then, 0 −2 ( 0 )
−5=𝐶 1 𝑒 − 2𝐶 2 𝑒 ⇒ 𝐶 1 − 2 𝐶 2=−5
𝑦 ′ =𝐶 1 𝑒 𝑥 −2 𝐶 2 𝑒− 2 𝑥
Hence, and
- Apply the initial value given;
- The particular solution; 𝑦 =𝑒 𝑥 +3 𝑒 −2 𝑥
Homogeneous Equation – Initial value problem.
𝑦 ′ ′ +0.4 𝑦 ′ − 9.04 𝑦 =0 y ( 0 )=0 , 𝑦 ′ ( 0 )=3 Solve the initial value problem.

- From an example, we obtained the general solution;


𝑦 =𝑒 −0.2 𝑥 ( 𝐴 cos3 𝑥+ 𝐵 sin 3 𝑥 )
𝑦 ( 0 )=𝑒
−0.2 ( 0 )
( 𝐴 cos 3 ( 0 )+ 𝐵 sin 3 ( 0 ) )=0 ⟹ 𝐴=0
𝑦 =𝐵 𝑒− 0.2𝑥 sin 3 𝑥
- Then (by using chain rule);
𝑦 ′=𝐵 ( − 0.2𝑒 −0.2 𝑥 sin 3 𝑥 +3 𝑒 −0.2 𝑥 cos 3 𝑥 )
𝑦 ( 0 ) =𝐵 ( −0.2 𝑒 cos 3 ( 0 )) =3 ⟹ 𝐵=1
′ −0.2 ( 0) − 0.2 ( 0 )
sin 3 ( 0 )+ 3 𝑒
- The particular solution;
𝑦 =𝑒 −0.2 𝑥 sin 3 𝑥
Exercise 1
Find the general solution of the differential equation. Solve the initial value problem for the cases of
given initial value.

a)
b)
c)
d)
e)
f)
g)
h)
i)
j) 10
Non-Homogeneous Equation
● 2nd order, linear Non-Homogeneous differential equation be written as;

𝑦 ′ ′ +𝑝 ( 𝑥 ) 𝑦 ′ +𝑞 ( 𝑥 ) 𝑦=𝑟 ( 𝑥 )
● A general solution of the non-homogeneous equation is a solution of the form,
𝑦 ( 𝑥 ) =𝑦 h ( 𝑥 )+ 𝑦 𝑝 ( 𝑥 )
where;
𝑦 h ( 𝑥 )=𝐶 1 𝑦 1 ( 𝑥 ) +𝐶 2 𝑦 2 ( 𝑥 ) ---- General solution of the homogeneous equation,
𝑦 𝑝 ( 𝑥 ) ---- Any solution of the differential equation containing no arbitrary constant
● A particular solution of the non-homogeneous equation is a solution obtained from the
general solution by assigning specific value to arbitrary constant, and in
Non-Homogeneous Equation – Solution
procedure.
● Solution procedure for the non-homogeneous equation can be simplify as;

′′ ′
𝑦 +𝑝 ( 𝑥 ) 𝑦 +𝑞 ( 𝑥 ) 𝑦=𝑟 ( 𝑥 )
Find the homogeneous Find a particular
solution integral
′′ ′ ′′ ′
𝑦 +𝑝 ( 𝑥 ) 𝑦 +𝑞 ( 𝑥 ) 𝑦=0 𝑦 +𝑝 ( 𝑥 ) 𝑦 +𝑞 ( 𝑥 ) 𝑦=𝑟 ( 𝑥 )

The general solution of


is

𝑦 = 𝑦 h+ 𝑦 𝑝
Example:
𝑦 ′ ′ +2 𝑦 ′ +101 𝑦 =10 𝑒 𝑥 Solve the following non-homogeneous linear differential equation.

 1st step: General solution of the homogeneous equation.


- The characteristic equation of the homogeneous differential eqn.;
𝑟 2 +2 𝑟 +101=0
- The roots for this characteristic equation are;
− 𝑎 ± √ 𝑎 2 − 4 𝑏 − ( 2 ) ± √ ( 2 ) − 4 ( 101 )
2
𝑟= = =−1 ± 10𝑖
2 2
−𝑥
- The general solution is; 𝑦 h =𝑒 ( 𝐴 cos 10 𝑥+ 𝐵 sin 10 𝑥 )
 2nd step: General solution of the non-homogeneous equation.
- From the equation,
- Let i.e and - The general solution;
- Substitute into the differential equation, gives; 𝑦 =𝑦 h+ 𝑦 𝑝
( 1+2+101 ) 𝐶 𝑒 𝑥 =10 𝑒 𝑥 𝑦 =𝑒 −𝑥 ( 𝐴 cos10 𝑥+𝐵 sin 10 𝑥 ) +0.1 𝑒𝑥
- By comparison,
- The general solution;
Example:
𝑦 ′ ′ − 5 𝑦 ′ +6 𝑦 =2 𝑥+3 Solve the following non-homogeneous linear differential equation.

 1st step: General solution of the homogeneous equation.


- The characteristic equation; - Substitute into the differential equation, gives;
𝑟 2 −5 𝑟 +6=0 0 −5 𝐶+6 ( 𝐶𝑥 + 𝐷 )=2 𝑥 +3
- The roots for this characteristic equation are;
− (− 5 ) + √ ( −5 ) − 4 ( 6 )
2 −5 𝐶+6 𝐶𝑥+6 𝐷=2𝑥 +3
𝑟 1= =3 - Equate the coefficient;
2
− ( −5 ) − √ ( −5 ) − 4 ( 6 )
2 6 𝐶𝑥 =2 𝑥 ⟹ 𝐶=1/3
𝑟 2= =2 −5 𝐶+6 𝐷=3 ⟹ 𝐷=7 /9
2
3𝑥 2𝑥
- The general solution is; 𝑦 h =𝐶 1 𝑒 + 𝐶 2 𝑒 - The general solution;
 2nd step: General sol. of the non-homogeneous equation.
- From the equation,
- The general solution for the diff. eqn.,
- Let
𝑦 =𝑦 h+ 𝑦 𝑝
3𝑥 2𝑥 1 7
𝑦 =𝐶 1 𝑒 + 𝐶 2 𝑒 + 𝑥+
3 9
Solution Method – Undetermined Coefficient
● General solution for non-homogeneous ODE given as;

𝑦 =𝑦 h+ 𝑦 𝑝
● To solve the non-homogeneous ODE, we have to solve the homogeneous ODE and
find any solution .
● One method to find solution is so-called Method of Undetermined Coefficient.
● Since it applies to models of vibrational systems and electric circuits, it is frequently
used in engineering.
Choice rules for the method of undetermined
coefficients ′′ ′
● Non-homogeneous equation; 𝑦 + 𝑎 𝑦 +𝑏𝑦 =𝑟 ( 𝑥 ) ----- (1)

Term in Choice of
Polynomial:
Exponential:
Sine/Cosine: or

(a) Basic Rule. If in (1) is one of the functions in the first column in the table, choose in the
same line and determine its undetermined coefficients by substituting and its derivatives
into (1).
(b) Modification Rule. If a term in your choice for happens to be a solution of the
homogeneous ODE corresponding to (1), multiply this term by x (or by x2 if this solution
corresponds to a double root of the characteristic equation of the homogeneous ODE).
(c) Sum Rule. If is a sum of functions in the first column of the table, choose for the sum of
the functions in the corresponding lines of the second column.
Example:
2 𝑦 ′ ′ +2 𝑦=2 sin 𝑥 Find the general solution of the differential equation.

 1st step: General solution of the homogeneous equation.

𝑦 ′ ′ + 𝑦 =0
- Let the solution of the differential equation is i.e. and
- Substitute into the differential equation, and divide by ;
𝑟 2 𝑒 𝑟𝑥 𝑒𝑟𝑥
𝑟𝑥
+ 𝑟𝑥 =0
𝑒 𝑒
- The characteristic equation of the differential eqn.; From the characteristic equation;
𝑎=0 𝑏=1
𝑟 2 +1=0
- The roots for this characteristic equation are;
− 𝑎+ √ 𝑎2 − 4 𝑏 − ( 0 ) + √ ( 0 ) − 4 ( 1 )
2 ----- complex roots.
𝑟= = =0 ±𝑖
2 2
- The general solution is; 𝑦 =𝑒 0 ( 𝐴cos 𝑥 + 𝐵sin 𝑥 )
𝑦= 𝐴 cos 𝑥+𝐵 sin 𝑥
 2nd step: General sol. of the non-homogeneous equation.

-
- From the table, let we choose,
𝑦 𝑝 = 𝑀 cos 𝑥 +𝑁 sin 𝑥
- But this function is a solution of the homogeneous ODE.
- According to the Modification Rule we have to multiply our choice function by x.
𝑦 𝑝 =𝑥 ( 𝑀 cos 𝑥 +𝑁 sin 𝑥 )
𝑦 ′ 𝑝 =( 𝑀 cos 𝑥 − 𝑥𝑀 sin 𝑥 )+ ( 𝑁 sin 𝑥 +𝑥𝑁 cos 𝑥 )
𝑦 ′ ′ 𝑝 =( − 𝑀 sin 𝑥 − 𝑀 sin 𝑥 − 𝑥𝑀 cos 𝑥 ) + ( 𝑁 cos 𝑥+ 𝑁 cos 𝑥 − 𝑥𝑁 sin 𝑥 )
¿ ( −2 𝑀 sin 𝑥 − 𝑥𝑀 cos 𝑥 )+ ( 2 𝑁 co𝑠 𝑥 − 𝑥𝑁 sin 𝑥 )
- Substitute into the differential equation, gives;
−2 𝑀 sin 𝑥− 𝑥𝑀 cos 𝑥+2𝑁 co𝑠 𝑥− 𝑥𝑁 sin 𝑥+𝑥𝑀 cos 𝑥+𝑥 𝑁 sin 𝑥=2sin 𝑥
−2 𝑀 sin 𝑥+2𝑁 co 𝑠𝑥=sin 𝑥
- Comparing the coefficients on both sides;
/2
2 𝑁 =0 ⟹ 𝑁 =0
- The general solution is; 𝑦 𝑝 =− 𝑥/2 cos 𝑥

- The general solution for the diff. eqn.,


𝑦 =𝑦 h+ 𝑦 𝑝
𝑦= 𝐴 cos 𝑥+𝐵 sin 𝑥− 𝑥/2cos 𝑥
Example - Polynomial:
𝑦 ′ ′ + 𝑦 =0.001 𝑥 2 𝑦 ( 0 ) =0 , 𝑦 ′ ( 0 )=1.5 Solve the initial value problem.
 1st step: General solution of the homogeneous equation.
- The characteristic equation;
𝑟 2 +1=0 - Complex conjugate root -
- The roots for this characteristic equation are;
− ( 0) ± √ ( 0) − 4 ( 1)
2
𝑟= =0 ±1 𝑖
2
- The general solution is; 𝑦 h = 𝐴 cos 𝑥+ 𝐵 sin 𝑥
 2nd step: General sol. of the non-homogeneous equation.
- * Polynomial of degree 2 (n=2)

- From the table, let we choose,


𝑦 𝑝 = 𝐴2 𝑥2 + 𝐴1 𝑥+ 𝐴𝑜
𝑦 ′ 𝑝 =2 𝐴2 𝑥+ 𝐴1
𝑦 ′ ′ 𝑝 =2 𝐴2
- Substitute into the differential equation, gives;
2 𝐴2+ 𝐴2 𝑥 2 + 𝐴1 𝑥+ 𝐴𝑜=0.001 𝑥 2  3rd step: Solution of the initial value problem.

- Equating the coefficients of on both sides; 𝑦 = 𝐴 cos 𝑥+𝐵 sin 𝑥+0.001 𝑥 2 − 0.002
𝐴 2 𝑥 2=0.001 𝑥 2 ⟹ 𝐴 2=0.001 --- coefficient of 𝑦 ′ =− 𝐴sin 𝑥 +𝐵 cos 𝑥+0.00 2 𝑥
𝐴1 𝑥=0 ⟹ 𝐴1=0 --- coefficient of
- Apply the 1st initial value given,
2 𝐴 2+ 𝐴 𝑜=0 ⟹ 𝐴 𝑜=− 0.002 --- coefficient of 2
2 𝐴cos ( 0 ) + 𝐵 sin ( 0 )+ 0.001 ( 0 ) −0.002=0
- The general solution is; 𝑦 𝑝 =0.001 𝑥 − 0.002
𝐴=0.002
- Apply the 2nd initial value given,
- The general solution for the diff. eqn.,
− 𝐴 sin ( 0 ) + 𝐵 cos ( 0 ) +0.00 2 ( 0 )=1.5
𝑦 =𝑦 h+ 𝑦 𝑝 𝐵=1.5
2
𝑦 = 𝐴 cos 𝑥+𝐵 sin 𝑥+0.001 𝑥 − 0.002
- The solution;
𝑦 =0.002 cos 𝑥 +1.5 sin 𝑥 +0.001 𝑥2 −0.002
Example - Exponential:
𝑦 ′ ′ + 3 𝑦 ′ +2.25 𝑦 =−10 𝑒 −1.5 𝑥 𝑦 ( 0 ) =1 , 𝑦 ′ ( 0 )=0 Solve the initial value problem.
 1st step: General solution of the homogeneous equation.
- The characteristic equation;
- According to the Modification Rule we have
𝑟 2 +3 𝑟 +2.25=0 - Double root -
to multiply our choice function by x2.
- The roots for this characteristic equation are;
− ( 3 ) ± √ ( 3 ) − 4 ( 2.25 )
2 𝑦 𝑝 = 𝐴 𝑥2 𝑒 −1.5 𝑥
𝑟= =− 1.5
2 𝑦 ′ 𝑝 = 𝐴 ( 2 𝑥 −1.5 𝑥 2 ) 𝑒−1.5 𝑥
−1.5 𝑥
- The general solution is; 𝑦 h =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒 𝑦 ′ ′ 𝑝 = 𝐴 ( 2− 3 𝑥 −3 𝑥+2.25 𝑥 2 ) 𝑒− 1.5𝑥
 2nd step: General sol. of the non-homogeneous equation.
- * Exponential

- From the table, let we choose,


𝑦 𝑝 = 𝐴𝑒 −1.5 𝑥
- But this function is a solution of the homogeneous
ODE, which corresponds to a double root of the
characteristic equation.
- Substitute these expressions into the given ODE and omit the factor
𝐴 ( 2 −6 𝑥 +2.25 𝑥2 ) +3 𝐴 ( 2 𝑥 −1.5 𝑥2 ) +2.25 𝐴 𝑥 2=−10
- Comparing the coefficients of on both sides;
- Apply the 1st initial value given,
2 𝐴=−10 ⟹ 𝐴=− 5 --- coefficient of and = 0

2 −1.5 𝑥
𝑦 ( 0 )=𝐶 1 =1
- The general solution is; 𝑦 𝑝 =− 5 𝑥 𝑒
- Apply the 2nd initial value given,
𝑦 ′ ( 0 ) =𝐶 2 −1.5 𝐶 1=0
- The general solution for the diff. eqn.,
𝐶 2=1.5 𝐶 1=1.5
𝑦 =𝑦 h+ 𝑦 𝑝
𝑦 =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒− 1.5 𝑥 −5 𝑥2 𝑒 −1.5 𝑥
- The solution;
 3rd step: Solution of the initial value problem. 𝑦 =( 1+1.5 𝑥 ) 𝑒− 1.5 𝑥 −5 𝑥 2 𝑒 −1.5 𝑥
𝑦 =( 𝐶 1 +𝐶 2 𝑥 ) 𝑒− 1.5 𝑥 +−5 𝑥 2 𝑒 −1.5 𝑥
𝑦 ′ =( 𝐶 2 − 1.5 𝐶 1 −1.5 𝐶 2 𝑥 ) 𝑒 −1.5 𝑥 − 10 𝑥 𝑒− 1.5 𝑥 +7.5 𝑥2 𝑒 −1.5 𝑥
Example – Sine/Cosine:
𝑦 ′ ′ + 2 𝑦 ′ +5 𝑦=−1.25 𝑒 0.5 𝑥 +40 cos 4 𝑥 −55 sin 4 𝑥 𝑦 ( 0 )=0.2 , 𝑦 ′ ( 0 )=60.1
 1st step: General solution of the homogeneous equation.
- The characteristic equation;
𝑟 2 +2 𝑟 +5=0 - Complex conjugate root -
- The roots for this characteristic equation are;
− ( 2 ) ± √( 2 ) − 4 ( 5 )
2
𝑟= =−1 ± 2𝑖
2
−𝑥
- The general solution is; 𝑦 h =𝑒 ( 𝐴 cos 2 𝑥 + 𝐵 sin 2 𝑥 )

 2nd step: General sol. of the non-homogeneous equation.


- * Sine/Cosine
& Exponential
- From the table, let we choose,
𝑦 𝑝 =𝐶𝑒 0.5 𝑥 +𝑀 cos 4 𝑥+𝑁 sin 4 𝑥
𝑦 ′ 𝑝 =0.5 𝐶 𝑒 0.5𝑥 − 4 𝑀 sin 4 𝑥+4 𝑁 cos 4 𝑥
𝑦 ′ ′ 𝑝 =0.25 𝐶𝑒0.5 𝑥 −16 𝑀 cos 4 𝑥 −16 𝑁 sin 4 𝑥
- Substitute into the differential equation, gives;
( 0.25+1+5 ) 𝐶 𝑒0.5𝑥 + ( −16 𝑀 +8 𝑁 +5 𝑀 ) cos 4 𝑥+ ( − 16 𝑁 −8 𝑀 +5 𝑁 ) sin 4 𝑥=𝑅𝐻𝑆
6.25 𝐶 𝑒 0.5𝑥 + ( −11 𝑀+8 𝑁 ) cos 4 𝑥+ ( −1 1 𝑁 −8 𝑀 ) sin 4 𝑥 =−1.25 𝑒 0.5𝑥 +40 cos 4 𝑥 −55 sin 4 𝑥
- Equating the exponential term on both sides;
6.25 𝐶=−1.25 ⟹ 𝐶=0.2 ---
−11 𝑀+8 𝑁=40--- cos 4x
−11 𝑁 −8 𝑀 =−55 --- sin 4x 𝑀=0 ,𝑁 =− 5
0.5 𝑥
- The general solution is; 𝑦 𝑝 =0.2 𝑒 − 5 sin 4 𝑥

- The general solution for the diff. eqn.,


𝑦 =𝑦 h+ 𝑦 𝑝
𝑦 =𝑒 −𝑥 ( 𝐴 cos2 𝑥 +𝐵 sin 2 𝑥 ) +0.2 𝑒 0.5𝑥 − 5 sin 4 𝑥
 3rd step: Solution of the initial value problem.

𝑦 =𝑒 −𝑥 ( 𝐴 cos2 𝑥 +𝐵 sin 2 𝑥 ) +0.2 𝑒 0.5𝑥 − 5 sin 4 𝑥


𝑦 ′ =𝑒− 𝑥 ( −2 𝐴sin 2 𝑥+2 𝐵 cos 2 𝑥 )+0.1 𝑒 0.5𝑥 +20 cos 4 𝑥
- Apply the 1st initial value given,
𝑒
− (0 )
( 𝐴cos 2 ( 0 ) + 𝐵sin 2 ( 0 ) ) +0.2 𝑒 0.5 (0 ) −5 sin 4 ( 0 ) =0.2
𝐴+0.2=0.2⟹ 𝐴=0
- Apply the 2nd initial value given,
𝑒 ( 2 𝐵 cos 2 ( 0 ) ) +0.1 𝑒0.5 (0 )+ 20 cos 4 ( 0 )=¿ 60.1 ¿
− (0 )

2 𝐵+0.1+20=60.1
2 𝐵=40 ⟹ 𝐵=20
- The solution;
𝑦 =20 𝑒− 𝑥 sin 2 𝑥+0.2 𝑒0.5 𝑥 −5 sin 4 𝑥
Solution Method – Variation of Parameters
● General solution of non-homogeneous linear ODE;
𝑦 =𝑦 h+ 𝑦 𝑝
● One of the method to obtain a particular solution of the of the ODE was discussed
in previous section (Method of Undetermined Coefficients).
● However, this method is restricted to functions whose derivatives are of a form
similar to itself (polynomial, exponential functions, etc.)
● So, it is desirable to have a method valid for more general ODEs, which we shall
now develop. It is called the Method of Variation of Parameters.
● Non-homogenous linear ODEs;
𝑦 ′ ′ + 𝑎 𝑦 ′ +𝑏𝑦 =𝑟 ( 𝑥 ) ----- (1)

● The basis solution to the homogeneous differential equation given as;


𝑦 h =𝐶 1 𝑦 1 +𝐶 2 𝑦 2
● According to Variation of Parameter method, a particular solution of (1) is in
the form;
𝑦2𝑟 ( 𝑥 ) 𝑦1 𝑟 ( 𝑥)
𝑦 𝑝 =− 𝑦 1∫ 𝑑𝑥+ 𝑦 2∫ 𝑑𝑥
𝑊 𝑊
● W is Wronski determinant, or briefly the Wronskian of two solutions and ,
defined by;

𝑊 ( 𝑦1 , 𝑦2)=
| 𝑦1
𝑦 ′1
𝑦2
|
𝑦 ′2
= 𝑦 1 𝑦 ′ 2− 𝑦2 𝑦 ′ 1
Example
𝑦 ′ ′ + 𝑦 =sec 𝑥 Solve the following differential equation.
 1st step: General solution of the homogeneous equation.
- The characteristic equation;
𝑟 2 +1=0 - Complex conjugate root -
- The roots for this characteristic equation are;
− ( 0) ± √ ( 0) − 4 ( 1)
2
𝑟= =0 ±1 𝑖
2
- The general solution is; 𝑦 h = 𝐴 cos 𝑥+ 𝐵 sin 𝑥
- Recall that the basis solution of the homogeneous ODE given as;
𝑦 h =𝐶 1 𝑦 1 +𝐶 2 𝑦 2
- From the general solution,
𝑦 1 =cos 𝑥
𝑦 2 =sin 𝑥
𝑦 ′ 1=−sin 𝑥
𝑦 ′ 2=cos 𝑥
- The Wronskian;

𝑊 ( 𝑦1 , 𝑦2)=
| 𝑦1
𝑦′1
𝑦2
|
𝑦 ′2

¿ 𝑦 1 𝑦 ′ 2 − 𝑦 2 𝑦 ′ 1=cos 𝑥 cos 𝑥 − sin 𝑥 ( −sin 𝑥 )


¿ cos 2 𝑥+¿ sin2 𝑥=1 ¿
- From the equation for solution of ;
𝑦2𝑟 ( 𝑥 ) 𝑦1 𝑟 ( 𝑥)
𝑦 𝑝 =− 𝑦 1∫ 𝑑𝑥+ 𝑦 2∫ 𝑑𝑥
𝑊 𝑊
sin 𝑥 sec 𝑥 cos 𝑥 sec 𝑥
¿−cos 𝑥 ∫ 𝑑𝑥+sin 𝑥 ∫ 𝑑𝑥
1 1
¿ −cos 𝑥 ( − ln (|cos 𝑥|) ) +sin 𝑥 ( 𝑥 )
¿ cos 𝑥 ln |cos 𝑥|+𝑥 sin 𝑥
- The solution;
𝑦 =𝑦 h+ 𝑦 𝑝
¿ 𝐴cos 𝑥 +𝐵 sin 𝑥 +cos 𝑥 ln |cos 𝑥|+𝑥 sin 𝑥
¿ ( 𝐴+ ln |cos 𝑥|) cos 𝑥 + ( 𝐵+𝑥 ) sin 𝑥
Example
𝑦 ′ ′ − 2 𝑦 ′ −3 𝑦=𝑥 𝑒− 𝑥 Solve the following differential equation.

- The characteristic equation of the differential eqn.; From the characteristic equation;
𝑎=− 2 𝑏=− 3
𝑟 2 −2 𝑟 −3=0 𝑎 − 4 𝑏=− 22 − 4 ( −3 )=16> 0
2

- The roots for this characteristic equation; The characteristic equation has

− 𝑎+ √ 𝑎2 − 4 𝑏 − ( − 2 )+ √ (− 2 ) − 4 ( −3 )
2 two real and unequal roots;

𝑟 1= = =3
2 2
− 𝑎− √ 𝑎2 − 4 𝑏 − (− 2 ) − √ ( −2 ) − 4 ( − 3 )
2
𝑟 2= = =−1
2 2
- The general solution is;
𝑦 h =𝐶 1 𝑒 3 𝑥 + 𝐶 2 𝑒 − 𝑥
- Recall that the basis solution of the homogeneous ODE given as;
𝑦 h =𝐶 1 𝑦 1 +𝐶 2 𝑦 2
- From the general solution,
𝑦 1 =𝑒 3 𝑥 𝑦 ′ 1=3 𝑒 3 𝑥
𝑦 2 =𝑒 −𝑥 𝑦 ′ 2=− 𝑒− 𝑥
- The Wronskian;

𝑊 ( 𝑦1 , 𝑦2 )=
| 𝑦1
𝑦′1
𝑦2
𝑦′2|
¿ 𝑦 1 𝑦 ′ 2 − 𝑦 2 𝑦 ′ 1=𝑒 3 𝑥 ( −𝑒 − 𝑥 ) − 𝑒− 𝑥 ( 3 𝑒 3 𝑥 ) - The solution;
¿ − 4 𝑒2 𝑥 𝑦 =𝑦 h+ 𝑦 𝑝
- From the equation for solution of ;
( )
2
3𝑥 −𝑥 𝑥 1 𝑥 −𝑥
𝑦2𝑟 ( 𝑥 ) 𝑦1 𝑟 ( 𝑥) ¿ 𝐶 1 𝑒 +𝐶 2 𝑒 − + + 𝑒
𝑦 𝑝 =− 𝑦 1∫ 𝑑𝑥+ 𝑦 2∫ 𝑑𝑥 16 16 16
𝑊− 𝑥 𝑊
( 𝑒 )( 𝑥 𝑒 )
−𝑥 3𝑥
( 𝑒 )( 𝑥 𝑒− 𝑥 )
¿ −𝑒
3𝑥
∫ −4𝑒
2𝑥
𝑑𝑥+𝑒
−𝑥
∫ −4 𝑒
2𝑥
𝑑𝑥
3𝑥 −𝑥
𝑒 𝑒
¿ ∫ 𝑥 𝑒 𝑑𝑥− ∫ 𝑥 𝑑𝑥
−4 𝑥

34𝑥 4−4 𝑥
( )
−4 𝑥 2 −𝑥
𝑒 4 𝑥𝑒 𝑒 𝑥 𝑒
¿ − − −
4 16 16 8

¿ −( )
2
𝑥 1 𝑥 −𝑥
+ + 𝑒
16 16 16
Exercise 2
Find the general solution of the differential equation.

a)
b)
c)
Exercise 2
Find the general solution of the differential equation.

a)
b)
c)
d)
e)
Exercise 3
Find the general solution of the differential equation.

a)
b)
c)

d)

You might also like