Nothing Special   »   [go: up one dir, main page]

MAT 241-Variation of Parameters, Operator and Difference Equations

Download as pdf or txt
Download as pdf or txt
You are on page 1of 54

Variation of Parameters, Operator Techniques and

Difference Equation

Lawal G.S

University of Ibadan
gslawal@hotmail.com

Thursday 27th April, 2017

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 1 / 54
Overview

1 Variation of Parameters

2 Operator Techniques

3 Difference Equation

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 2 / 54
Variation of Parameters

Variation of Parameter: Procedure


Let
φ(D)y = a0 (x)y n + a1 (x)y n−1 + a2 (x)y n−2 + ... + an−1 (x)y + an (x)y
and suppose that the complementary solution of
φ(D)y = R(x)
is
y = C1 y1 (x) + C2 y2 (x) + C3 y3 (x) + ... + Cn yn (x)
Replace the arbitrary constants C1 , C2 , C3 , ...Cn by the functions
K1 , K2 , K3 , ..., Kn and seek to determine these functions so that
y = K1 y1 (x) + K2 y2 (x) + K3 y3 (x) + ... + Kn yn (x)
is a solution of
φ(D)y = R(x)

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 3 / 54
Variation of Parameters

To determine these n-functions, we must impose n restrictions on them


and since one of these is that the differential equation be satisfied, if
follows that the remaining (n − 1) may be taken at will. The conditions
which lead to the greatest simplicity are given by the equations;

K10 y1 + K20 y2 + K30 y3 + ... + Kn0 yn = 0


K10 y10 + K20 y20 + K30 y30 + ... + Kn0 yn0 = 0
.........................................................
K1 y1 + K20 y2n−2 + K30 y3n−2 + ... + Kn0 ynn−2 = 0
0 n−2

K10 y1n−1 + K20 y2n−1 + K30 y3n−1 + ... + Kn0 ynn−1 = R(x)

where the last equation represents the condition that the given differential
equation be satisfied. From these equations, K10 , K20 , K30 , ..., Kn0 .
K1 , K2 , K3 , ..., Kn can then be found by integration leading to the required
equation. This method is applicable whenever the complementary solution
can be found including cases where a0 , a1 , a2 , ..., an are not constants.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 4 / 54
Variation of Parameters

Example I:
Solve the differential equation using method of variation of parameters
(D 2 − 3D + 2)y = e 5x

Solution:
The differential equation can also be written as

y 00 − 3y 0 + 2y = e 5x

The complementary solution

yc = c1 e x + c2 e 2x

To find the solution, we assume the general solution

y = K1 e x + K2 e 2x (i)

where K and K are suitable functions


MAT 241 of x to be determined.
Lawal G.S (Department of Mathematics) Thursday 27th April, 2017 5 / 54
Variation of Parameters

Continuation...
Differentiating (i) yields

y 0 = K10 e x + K20 e 2x + K1 e x + 2K2 e 2x (ii)

Since there are two functions, we must arrive at two conditions for
determining them. One of these conditions is that

K10 e x + K20 e 2x = 0 (iii)

such that (ii) becomes

y 0 = K1 e x + 2K2 e 2x (iv )

Differentiating (iv) again, we obtain

y 00 = K10 e x + 2K20 e 2x + K1 e x + 4K2 e 2x (v )

substituting (i), (iv) and (v) into the given differential equation, we
obtain Thus,
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 6 / 54
Variation of Parameters

Continuation...

y 00 − 3y 0 + 2y = K10 e x + 2K20 e 2x + K1 e x + 4K2 e 2x − 3(K1 e x + 2K2 e 2x )


+2(K1 e x + K2 e 2x ) = e 5x
(1)
such that
K10 e x + 2K20 e 2x = e 5x (vi)
solving (iii) and (vi) simultaneously to determine K10 and K20 , we have
K10 e x + K20 e 2x = 0
K10 e x + 2K20 e 2x = e 5x
from(iii)
K10 = −K20 e x (vii)
substitute (vii) into (vi), then
(−K20 e x )e x + 2K20 e 2x = e 5x
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 7 / 54
Variation of Parameters

Continuation...

−K20 e 2 x + 2K20 e 2x = e 5x

K20 e 2x = e 5x

1
K20 = e 3x =⇒ K2 = e 3x + c2
3

using K20 = e 3x , then from (vii),


K10 = −(e 3x )e x = −e 4x
integrating implies that
1
K10 = − e 4x + c1
4
By assumption,
y = K1 e x + K2 e 2x
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 8 / 54
Variation of Parameters

Continuation...

hence
1 1
y = (− e 4x + c1 )e x + ( e 3x + c2 )e 2x
4 3
rearranging, we have
1 5x
y = c1 e x + c2 e 2x + e
12

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 9 / 54
Variation of Parameters

Example II:
Solve the differential equation
(D 2 + 4)y = 8 sin 2x

Solution:
The differential equation can also be written as

y 00 + 4y = 8 sin 2x

The complementary solution is

yc = c1 cos 2x + c2 sin 2x

To find the solution, we assume the general solution

y = K1 cos 2x + K2 sin 2x (∗)

where K and K are suitable functions


MAT 241 of x to be determined.
Lawal G.S (Department of Mathematics) Thursday 27th April, 2017 10 / 54
Variation of Parameters

Continuation...
Differentiating (*) yields
y 0 = −2K1 sin 2x + K10 cos 2x + 2K2 cos 2x + K20 sin 2x (∗∗)
Since there are two functions, we must arrive at two conditions for
determining them. One of these conditions is that
K10 cos 2x + K20 sin 2x = 0
such that (**) becomes
y 0 = −2K1 sin 2x + 2K2 cos 2x
Differentiating again
y 00 = −4K1 cos 2x − 2K10 sin 2x − 4K2 sin 2x + 2K20 cos 2x
Thus,
y 00 + 4y = −2K10 sin 2x + 2K20 cos 2x = 8 sin 2x (∗ ∗ ∗)

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 11 / 54
Variation of Parameters

Continuation...
From the two equations,
K10 cos 2x + K20 sin 2x = 0
0
−2K1 sin 2x + 2K20 cos 2x = 8 sin 2x
From here,
−K20 sin 2x
K10 =
cos 2x
substituting into the second equation, we obtain
−K20 sin 2x
 
−2 sin 2x + 2K20 cos 2x = 8 sin 2x
cos 2x
Multiply all by cos 2x, then
2K20 sin2 2x + 2K20 cos2 2x = 8 sin 2x cos 2x

2K20 = 8 sin 2x cos 2x

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 12 / 54
Variation of Parameters

Continuation...

K20 = 4 sin 2x cos 2x =⇒ K2 = sin2 2x + c2


Also
−K20 sin 2x sin 2x
K10 = =⇒ K10 = (−4 sin 2x cos 2x)
cos 2x cos 2x
and
K10 = −4 sin2 2x
integrating, we obtain
1
K1 = −2x + sin 4x + c1
2
Using the assumption that
y = K1 cos 2x + K2 sin 2x
we have
 
1
−2x + sin 4x + c1 cos 2x + sin2 2x + c2 sin 2x

y=
2 th
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27 April, 2017 13 / 54
Variation of Parameters

Continuation...

Hence
1
y = c1 cos 2x + c2 sin 2x − 2x cos 2x + sin 4x cos 2x + sin3 2x
2

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 14 / 54
Variation of Parameters

Tutorial Questions:

Solve using variation of parameters


1 y 00 + 2y 0 − 3y = xe −x
2 y 00 + 4y = csc 2x
3 (D 3 + D)y = 4 tan x
4 (D 2 + 9)y = sec 3x
5 xy 00 − y 0 = x
6 (D 2 + D − 2)y = x 2 e 2x
7 (D 2 − 4)y = 16x 3

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 15 / 54
Operator Techniques

Operator Techniques

When a0 , a1 , ..., an are constants, the equation

φ(D)y = R(x)

can be written in factored form as

a0 (D − m1 )(D − m2 )...(D − mn )y = R(x) (2.2)

where m1 , m2 , ..., mn are constants and where the other of the factors
(D − m1 )(D − m2 ), ..., (D − mn ) is immaterial. This is not true if
a0 , a1 , ..., an are not constants.The constants, m1 , m2 , ..., mn are the root
of the auxiliary equation and the complementary solution is

y = c1 e m1 x + c2 e m2 x + ... + cn e mn x

To obtain particular solutions,we use the following operator methods:


Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 16 / 54
Operator Techniques

I.Method of Reduction of order:


Let
a0 (D − m2 )(D − m3 )...(D − mn )y = Y1
then (2.2) becomes
(D − m1 )Y1 = R(x)
which can be solved for Y1 . Also let

a0 (D − m3 )(D − m4 )...(D − mn )y = Y2

so that
(D − m2 )Y2 = Y1
which can be solved for Y2 .By continuing in this manner, y can be
obtained. This method yields the general solution if all arbitrary constants
are kept, while it yields a particular solution if the constants are omitted.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 17 / 54
Operator Techniques

II.Method of Inverse Operators:


Let
1
R(x)
φ(D)
be defined as a particular solution, yp such that

φ(D)yp = R(x)
1
We call φ(D) an inverse operator.By reference to the entries in the
following table, the labour in finding particular solution of φ(D)y = R(x)
is often reduced.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 18 / 54
Operator Techniques

Table of Inverse Operator

1
e mx e −mx R(x)dx
R
(D−m) R(x)
1
e m1 x e −m1 x e m2 x ... e −mn−1 x e m
R R R
(D−m1 )(D−m2 )...(D−mn ) R(x)
1 px e px
φ(D) e φ(p) if φ(p) 6= 0
1 cos(px+q)
φ(D 2 )
cos(px + q) φ(−p 2 )
if φ(−p 2 ) 6= 0
1 sin(px+q)
φ(D 2 )
sin(px + q) if φ(−p 2 ) 6= 0
φ(−p 2 )
1 p k p
φ(D) x = (c0 + c1 D + ... + ck D +)x (c0 + c1 D + ... + cp D p )x p
1 px 1
φ(D) e F (x) e px φ(D+p) F (x)

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 19 / 54
Operator Techniques

Examples I:

1 4x
Evaluate D−2 (e )
Using the formula
1
(e 4x )
D −2
Z
= e 2x e −2x e 4x dx

1
= e 4x
2

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 20 / 54
Operator Techniques

Example II:
1
Evaluate (3e −2x )
(D + 1)(D − 2)
Using the formula;
1
(3e −2x )
(D + 1)(D − 2)
 
1 1
= (3e −2x )
D +1 D −2
 Z 
1 2x −2x −2x
= e e (3e )dx
D +1
 
1 3 −2x
= − e
D +1 4
Z
3 3
= e −x e x (− e −2x )dx = e −2x
4 4
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 21 / 54
Operator Techniques

Alternatively:
Using Partial fraction
1
(3e −2x )
(D + 1)(D − 2)
" #
−1 1
= 3
+ 3
(3e −2x )
D +1 D −2
1 1
=− (e −2x ) + (e −2x )
D +1 D −2
Z Z
−x x −2x
= −e e (e )dx + e 2x
e −2x (e −2x )dx

3
= e −2x
4

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 22 / 54
Operator Techniques

Example III:
1 px e px
Prove that e = if φ(p) 6= 0.
φ(D) φ(p)
By definition;

φ(D) = a0 (x)D n + a1 (x)D n−1 + a2 (x)D n−2 + ... + an−1 (x)D + an (x)

where a0 , a1 , ..., an are constants. Then,

φ(D)e px = a0 D n + a1 D n−1 + a2 D n−2 + ... + an−1 D + an e px




= a0 p n + a1 p n−1 + a2 p n−2 + ... + an−1 p + an e px




= φ(p)e px

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 23 / 54
Operator Techniques

Example IV:
Find the general solution of (D 2 − 3D + 2)y = e 5x using the result in
(Example III):
The complementary solution is;

yc = c1 e x + c2 e 2x

Using the result above, the particular solution is;

1 5x 1 5x e 5x
yp = e = e =
D 2 − 3D + 2 (52 ) − 3(5) + 2 12

Hence the general solution is;

e 5x
y = c1 e x + c2 e 2x +
12

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 24 / 54
Operator Techniques

Example V:

Find the general solution of (D 2 + 1)y = cos 2x


The complementary solution is;

yc = c1 cos x + c2 sin x

U̇sing the result in the table,

1 cos(px + q)
2
cos(px + q) = if φ(−p 2 ) 6= 0
φ(D ) φ(−p 2 )

then we have
1 1 1
yp = cos 2x = cos 2x = − cos 2x
D2 +1 (−4 + 1) 3

Hence the required general solution is y = c1 cos x + c2 sin x − 31 cos 2x

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 25 / 54
Operator Techniques

Example VI:
1
Evaluate D 3 +D 2 +2D−1
cos 2x
Using the result in example IV,

1 cos(px + q)
cos(px + q) = if φ(−p 2 ) 6= 0
φ(D 2 ) φ(−p 2 )

then we have
1 1
cos 2x = cos 2x
D3 + D2 + 2D − 1 D(−4) − 4 + 2D − 1

1 (2D − 5) (2D − 5)
− cos 2x = − 2 cos 2x = − cos 2x
2D + 5 4D − 25 4(−4) − 25
1 1
= (2D − 5) cos 2x = (−4 sin 2x − 5 cos 2x)
41 41
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 26 / 54
Operator Techniques

Example VII:
Evaluate (D 3 + D)y = e −2x cos 2x
Using the formula in the table;
1 px 1
e F (x) = e px F (x)
φ(D) φ(D + p)

1 1
yp = e −2x cos 2x = e −2x cos 2x
D3 +D 3
(D − 2) + D − 2
1 1
= e −2x cos 2x = e −2x cos 2x
D 3 − 6D 2 + 13D − 10 −4D + 24 + 13D − 10
1 9D − 14
= e −2x cos 2x = e −2x cos 2x
9D + 14 81D 2 − 196

e −2x e −2x
= (9D − 14) cos 2x = (9 sin 2x + 7 cos 2x)
81(−4) − 196 260 th
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27 April, 2017 27 / 54
Operator Techniques

Tutorial Question II:

Evaluate the following:


1
1 e −2x
D +3
1
2
2
9e 5x − 4e −x
D + D − 12
D −1
3 8 cos x
D + D2 + 1
4
1
4 e −2x cos 2x
(D − 4)(D + 3)(D + 1)
5 Prove that

φ(D)[e px R(x)] = e px φ(D + p)R(x)

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 28 / 54
Difference Equation

Difference Equation

Definition 3.1.1
An equation which contains independent variable, dependent variable and
successive differences of the dependent variable is called the difference
equation.

Examples 3.1.2
1 yn+2 − 6yn+1 + 9yn = 0
2 (E 2 + 6E + 9)yn = 2n i.e yn+2 + 6yn+1 + 9yn = 2n
3 (∆2 + 3∆ + 2)yn = 1 or ∆2 yn + 3∆yn + 2yn = 1
or (yn+2 − 2yn+1 + yn ) + 3(yn+1 − yn ) + 2yn = 1
or yn+2 + yn+1 = 1

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 29 / 54
Difference Equation

Order of a difference equation:


Definition 3.1.3
The order of the difference equation is the difference between the largest
and smallest arguments occurring in the difference equation divided by the
unit of argument.
Thus, the order of the difference equation is
largest argument - smallest argument
=
unit of argument

Example 3.1.4
The order of the difference equation yn+2 − 7yn = 5 is

(n + 2) − n
=2
1

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 30 / 54
Difference Equation

Definition 3.1.5

Degree of a difference equation


The highest degree of yn0 s in the difference equation is called the Degree
of the difference equation.

Example i:
n+2−n
The order and degree of yn+2 + 4yn+1 + 4yn = 2n are = 2 and 1
1
respectively.

Example ii:
2 n+3−n
The order and degree of yn+3 + 3yn+2 + 3yn+1 + yn = 0 are =3
1
and 2 respectively.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 31 / 54
Difference Equation

Definition 3.1.6

Solution of Difference Equation


Any function which satisfies the given difference equation is called the
solution of the difference equation.

General solution of the difference equation


A solution in which the number of arbitrary constants is equal to the order
of the difference equation is called the general solution of the difference
equation.

Particular solution
A solution which can be obtained from the general solution by assigning
particular values is called particular solution.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 32 / 54
Difference Equation

Formation of difference equation:


Example I: Write the difference equation ∆3 yn + ∆2 yn + ∆yn + yn = 0 in
the subscript notation.
Solution:
∆yn = yn+1 − yn

∆2 yn = yn+2 − 2yn+1 + yn

∆3 yn = yn+3 − 3yn+2 + 3yn+1 − yn


substituting these into the given difference equation, we obtain

(yn+3 − 3yn+2 + 3yn+1 − yn ) + (yn+2 − 2yn+1 + yn ) + (yn+1 − yn ) + yn = 0

yn+3 − 2yn+2 + 2yn+1 = 0


Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 33 / 54
Difference Equation

Example II: Form a difference equation from


yn = A2n + B(−2)n

Solution:
yn = A2n + B(−2)n =⇒ yn − A2n − B(−2)n = 0

yn+1 = A2n+1 + B(−2)n+1 =⇒ yn+1 − 2A2n + 2B(−2)n = 0

yn+2 = A2n+2 + B(−2)n+2 =⇒ yn+2 − 4A2n − 4B(−2)n = 0


Eliminating A and B, we obtain,

yn+2 − 4yn = 0

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 34 / 54
Difference Equation

Definitions :

Linear Difference Equation


A difference equation in which yn , yn+1 , yn+2 , ..., occur to the first degree
only and not multiplied together is called the Linear difference equation.
A linear difference equation of order k is an equation of the form

a0 yn+k + a1 yn+k−1 + a2 yn+k−2 + ... + ak yn = R(n) 1.1.6

If R(n) = 0, then the equation 1.1.6 is called linear homogeneous


difference equation, otherwise it is called non-homogeneous difference
equation.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 35 / 54
Difference Equation

Homogeneous Linear Difference Equation with constant


coefficient
The equation of the form
(a0 E k + a1 E k−1 + a2 E k−2 + ... + an−1 E + an I )yn = 0
or
φ(E )yn = 0
where a0 , a1 , ..., an are all constants is known as homogeneous linear
difference equation with constant coefficient.
Let yn = mn be the solution of the difference equation, then we have
a0 mn+k + a1 mn+k−1 + ... + an mn = 0

=⇒ (a0 mk + a1 mk−1 + ... + an )mn = 0 3.1.7


which shows that mn is the solution of 3.1.7 if m satisfies
a0 mk + a1 mk−1 + ... + an = 0 3.1.8
th
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27 April, 2017 36 / 54
Difference Equation

Continuation...
Equation 3.1.8 is known as the auxiliary equation. This equation has
k-roots m1 , m2 , m3 , ..., mk .Some cases may arise;
Case I: When the roots are real and distinct
If m1 , m2 , m3 , ..., mk are real and distinct roots of auxiliary equation
(3.1.8), then the solution is

yn = c1 (m1 )n + c2 (m2 )n + ... + ck (mk )n

Case II: When some of the roots are equal


If two roots are equal, i.e m1 = m2 , then the solution is

yn = (c1 + c2 n)(m1 )n + c3 (m3 )n + ... + ck (mk )n

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 37 / 54
Difference Equation

Continuation...

If three roots are equal, i.e m1 = m2 = m3 , then the solution is

yn = (c1 + c2 n + c3 n2 )(m1 )n + c4 (m4 )n + ... + ck (mk )n

If k-roots are equal, i.e m1 = m2 = m3 = ... = mk , then the solution is

yn = [c1 + c2 n + c3 n2 + c4 n3 + ... + ck nk−1 ](m1 )n

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 38 / 54
Difference Equation

Continuation...

Case III: When the roots are complex number


If complex roots occur then they must be complex conjugate. i.e If
(α + iβ) is the root, then (α − iβ) is also a root where α and β are real.
Then the solution is

yn = c1 (α + iβ)n + c2 (α − iβ)n

which can be written as

yn = γ n (A1 cos nθ + A2 sin nθ)


 
β
p
where γ = α2 + β 2 , A1 = c1 + c2 , A2 = i(c1 − c2 and θ = arctan α .

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 39 / 54
Difference Equation

Example I:
Solve the difference equation yn+2 − 2yn+1 − 8yn = 0
Solution:
This equation can also be written as

(E 2 − 2E − 8)yn = 0

Let yn = mn , then

yn+2 − 2yn+1 − 8yn = mn+2 − 2mn+1 − 8mn = 0

m2 − 2m − 8 = 0 =⇒ (m − 4)(m + 2) = 0
m = 4 and m = 2. Hence

yn = c1 (4)n + c2 (−2)n

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 40 / 54
Difference Equation

Example II:

Solve the difference equation yn+3 + yn+2 − 8yn+1 − 12yn = 0


Solution:
The given difference equation can be written as

(E 3 + E 2 − 8E − 12)yn = 0

Let yn = mn , then the auxiliary equation becomes

m3 + m2 − 8m − 12 = 0

The roots are m = −2, −2, 3


Hence the solution is

yn = (c1 + c2 n)(−2)n + c3 3n

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 41 / 54
Difference Equation

Example III:
Solve the difference equation yn+2 + 16yn = 0
Solution:
The given difference equation can be written as

(E 2 + 16)yn = 0

Let yn = mn , then the auxiliary equation becomes

m2 + 16 = 0

The roots are m = ±4i


Hence the solution is

yn = (c1 (4i)n + c2 (−4i)n

yn = 4n {c1 (i)n + c2 (−i)n }


Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 42 / 54
Difference Equation

Continuation...

π n π n
     
n π π
= 4 c1 cos + i sin + c2 cos − i sin
2 2 2 2
    
nπ nπ nπ nπ
= 4n c1 cos + i sin + c2 cos − i sin
2 2 2 2
 
n nπ nπ
= 4 (c1 + c2 ) cos + i(c1 − c2 ) sin
2 2
 
n nπ nπ
= 4 A cos + B sin
2 2

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 43 / 54
Difference Equation

Non-homogeneous linear difference equation with constant


coefficient

The equation of the form

(a0 E k + a1 E k−1 + a2 E k−2 + ... + an−1 E + an I )yn = R(n) 3.1.9

or
φ(E )yn = R(n)
where a0 , a1 , ..., an are all constants is known as non-homogeneous linear
difference equation with constant coefficient.
The general solution of (3.1.9) consist of two parts, the complementary
function and the particular integral.
The complementary function is the general solution of the homogeneous
1
equation of (3.1.9) and the Particular Integral = R(n)
φ(E )

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 44 / 54
Difference Equation

Rules for obtaining the Particular Integral

Case I:R(n) = an
1 n 1 n
P.I = a = a
φ(E ) φ(a)
provided φ(a) 6= 0
If φ(a) = 0, then for the equation

(E − a)k yn = an ; k is a positive integer.

1 n(n − 1)(n − 2)...(n − (k − 1)) n−k n


P.I = k
an = a = Ck an−k
(E − a) k!
When k = 1
1
P.I = an = nan−1
E −a

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 45 / 54
Difference Equation

Continuation...
When k = 2,
1 n n(n − 1)an−2
P.I = a =
(E − a)2 2!

Case II: When R(n) = sin an or cos an


1 1 e ian − e −ian
P.I = sin an =
φ(E ) φ(E ) 2i
 
1 1 ia n 1 −ia n
= (e ) − (e )
2i φ(E ) φ(E )

 
1 1 1
= e ian − e −ian
2i ia
φ(e ) φ(e −ia )
provided φ(e ia ) 6= 0 and φ(e −ia ) 6= 0
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 46 / 54
Difference Equation

Case III: When R(n) = nk


1 k 1
P.I = n = nk
φ(E ) φ(1 + ∆)
since E = 1 + ∆.
= [φ(1 + ∆)]−1 nk
Expansion of φ(1 + ∆)]−1 in the ascending powers of ∆ by the Binomial
theorem as far as the term in ∆k , and distributing it into each term of
the expansion.

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 47 / 54
Difference Equation

Example I:
Solve the difference equation yn+2 − 4yn+1 + 3yn = 5.4n
This equation can also be written as

(E 2 − 4E + 3)yn = 5.4n

Solving the homogeneous equation yn+2 − 4yn+1 + 3yn = 0 , we obtain a


complementary solution
yn = c1 + c2 (3)n
To determine the Particular integral P.I, we have
1 1 5.4n
P.I = 5.4n = 5. 2 4n =
φ(E ) 4 − 4(4) + 3 3

Hence the general solution is


5
yn = c1 + c2 (3)n + 4n
Lawal G.S (Department of Mathematics) MAT 241
3 Thursday 27th April, 2017 48 / 54
Difference Equation

Example II:

Solve the difference equation yn+2 − 3yn+1 + 2yn = 6.2n


This equation can also be written as

(E 2 − 3E + 2)yn = 6.2n

Solving the homogeneous equation yn+2 − 3yn+1 + 2yn = 0, we obtain a


complementary solution
c1 + c2 (2)n
To determine the particular integral, P.I, we have
1 1
P.I = 6.2n = 6. 2 2n
φ(E ) E − 3(E ) + 2

but φ(2) = 0, therefore we have

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 49 / 54
Difference Equation

Continuation...

1 1 1
= 6. .2n = 6. .2n = 6. .2n
(E − 1)(E − 2) (2 − 1)(E − 2) (E − 2)

= 6.n2n−1 = 3n2n
Hence the general solution is

yn = c1 + c2 (2)n + 3n2n

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 50 / 54
Difference Equation

Example III:
Solve the difference equation yn+2 − 6yn+1 + 8yn = 3n2 + 2
The given difference equation can be written as

(E 2 − 6E + 8)yn = 3n2 + 2

Ṫhe complementary solution is

yn = c1 2n + c2 4n

The particular solution is


1 1
P.I = (3n2 + 2) = (3n2 + 2)
E2 − 6E + 8 2
(1 + ∆) − 6(1 + ∆) + 8

1
= (3n2 + 2)
1 + 2∆ + ∆2 − 6 − 6∆ + 8
Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 51 / 54
Difference Equation

Continuation...

1 1 1
= (3n2 + 2) = 2
2 (3n + 2)
∆2 − 4∆ + 3 3 (1 − 4∆−∆
)
3
−1
4∆ − ∆2
 
1
= 1− (3n2 + 2)
3 3

4∆ − ∆2 (4∆ − ∆2 )2
 
1
= 1+ + + ... (3n2 + 2)
3 3 9
8 44
= n2 + n +
3 9
Hence the general solution is
8 44
y n = c 1 2n + c 2 4n + n 2 + n +
3 9

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 52 / 54
Difference Equation

Tutorial Questions

Solve the following difference equations


1 (E 2 − 2E − 8)yn = 0
2 2yn+2 − 5yn+1 + 2yn = 0
3 yn+2 − 4yn+1 + 3yn = 4n
4 yn+2 − 4yn = 5.3n
5 2yn+2 − 5yn+1 + 2yn = 0, y0 = 0, y1 = 1
6 yn+2 − 4yn+1 + 4yn = 2n
7 yn+2 − 4yn = n2 + n + 1

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 53 / 54
Difference Equation

THANK YOU FOR LISTENING

Lawal G.S (Department of Mathematics) MAT 241 Thursday 27th April, 2017 54 / 54

You might also like