0% found this document useful (0 votes)
311 views86 pages

Difference Equation

The document discusses difference equations, focusing on their definitions, formation, and solutions, particularly in the context of digital signal processing. It covers linear difference equations with constant coefficients, methods for finding complementary functions and particular integrals, and provides examples and exercises for better understanding. The document serves as a comprehensive guide for students and professionals in mathematics and engineering fields.

Uploaded by

Rohan
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)
311 views86 pages

Difference Equation

The document discusses difference equations, focusing on their definitions, formation, and solutions, particularly in the context of digital signal processing. It covers linear difference equations with constant coefficients, methods for finding complementary functions and particular integrals, and provides examples and exercises for better understanding. The document serves as a comprehensive guide for students and professionals in mathematics and engineering fields.

Uploaded by

Rohan
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

Difference Equations

Dr. Juhi Kesarwani Dr. Ashish Kumar Kesarwany

Mathematics Division, School of Advanced Sciences and Languages


VIT Bhopal University, Bhopal-Indore Highway, Kothrikalan, Sehore, Madhya Pradesh, 466114, India

April 3, 2025

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 1 / 62
Table of Contents

1 Introduction

2 Linear difference equations with constant coefficients

3 Rule to find the Complementary function

4 Fibonacci sequence

5 Rules for finding the Particular Integral


Method of Undetermined Coefficients

6 Method of Z -Transforms for solving difference equation

7 Applications of Difference equation

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 2 / 62
Introduction

While dealing with problems in Electrical and Electronics Engineering, specially in


the area of digital signal processing and digital filter, we come across sequences of
discrete signals. If we write a sequence in digital processing as {un } then un = nT
where n = 0, 1, 2, . . . and T is called sampling period. The operation of such
discrete systems is governed by difference equations which are often solved by Z -
transforms.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 3 / 62
What is a difference equation?
Definition (Difference Equation)
A difference equation is a relation between various differences of an unknown func-
tion at one or more values of the argument which is always non-negative.

Example
For example,
∆yn+1 + 3yn = 2, ∆2 yn−1 + ∆yn+1 = 5
are all difference equations where

∆yn+1 = yn+2 − yn+1 (1)


and
∆2 yn = yn+2 − 2yn+1 + yn (2)

Thus, the above difference equations can be written respectively as

yn+2 − yn+1 + 3yn = 2 and yn+2 − 2yn + yn−1 = 5


Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 4 / 62
Note
The difference equations are sometimes referred to as recurrence relations also.

Definition (Order of difference equations)


The order of a difference equation is defined as difference between the largest and
the smallest arguments occurring in the difference equations, divided by the unit of
increment. Thus,

largest argument − smallest argument


The order of a difference equation =
unit of argument

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 5 / 62
Example
The order of the difference equation (1) is

n+2−n
=2
1
and the order of the difference equation (2) is

(n + 2) − (n − 1)
= 3.
1
Similarly, the order of the difference equation ∆2 yn+1 + 3∆yn + 4yn = 2 is
n+3−n
= 3.
1

Definition (Solution of the difference equation)


An expression for yn which satisfies given difference equation is called the solution
of the given difference equation.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 6 / 62
Formation of difference equation

Formation of difference equation from given expression is analogous to those of


differential equation. We have to eliminate the arbitrary constants from given
expression using different differences to obtain difference equation. How difference
equations are formed , will be better explained through the following examples.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 7 / 62
Example
Form the difference equation for the sequence {yn } where yn = a3n + b5n , where a
and b are arbitrary constants.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 8 / 62
Example
Form the difference equation for the sequence {yn } where yn = a3n + b5n , where a
and b are arbitrary constants.

Solution

yn = a3n + b5n (3)


=⇒ yn+1 = 3a3n + 5b5n (4)
n n
=⇒ yn+2 = 9a3 + 25b5 (5)

Solving for a and b from (4) and (5) yields


5yn+1 − yn+2 3yn+1 − yn+2
a= and b=
6(3n ) −10(5n )
Substituting these values of a and b in (3) and simplifying, we get

yn+2 − 8yn+1 + 15yn = 0,

which is required difference equation.


Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 8 / 62
Example
Find the difference equations for the family of curves y (x) = Ax + B2x , where A
and B are unknowns.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 9 / 62
Example
Find the difference equations for the family of curves y (x) = Ax + B2x , where A
and B are unknowns.

Solution

yx = Ax + B2x (6)
x+1
=⇒ yx+1 = A(x + 1) + B2 (7)
x+2
=⇒ yx+2 = A(x + 2) + B2 (8)

Solving for A and B from (6) and (7) yields

yx+1 − 2yx 1
A= and B= [xyx+1 − (x + 1)yx ]
1−x 2x (x − 1)

Substituting these values of A and B in (8) and simplifying, we get

(1 − x)yx+2 + (3x − 2)yx+1 − 2xyx = 0,

which is the required difference equation.


Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 9 / 62
Exercise 1:
Obtain the difference equation for the sequence {yn }, where
a
(a) yn = n +b Ans. (n + 2)yn+2 − 2(n + 1)yn+1 + nyn = 0.
2
(b) yn = an − bn Ans. (n + n)yn+2 − (2n2 + 4n)yn+1 + (n2 + 3n + 2)yn = 0.
2

(c) yn = a2n + b3n + c Ans. yn+3 − 6yn+2 + 11yn+1 − 6yn = 0.

Exercise 2:
Form the difference equation generated by the family of curves given by
yx = ax + b2x . Ans. (x − 1)yx+2 − (3x − 2)yx+1 + 2xyx = 0.

Exercise 3:
Form the difference equation corresponding to the family of curves y = ax + bx 2 .
Ans. x(x + 1)yx+2 − (2x 2 + 4x)yx+1 + (x 2 + 3x + 2)yx = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 10 / 62
Definition(Linear difference equations with constant coefficients)
A linear difference equation is that in which yn , yn+1 , yn+2 , . . . etc. occur to the first
degree only and are not multiplied together.
If the coefficients yn , yn+1 , yn+2 , . . . etc. are constants then the linear difference
equation is called linear difference equation with constant coefficients. A linear
difference equation with constant coefficients has the following form

yn+r + a1 yn+r −1 + a2 yn+r −2 + · · · + an yn = f (n), (9)


where a1 , a2 , . . . , an are constants. If f (n) = 0, then (9) is called Homogeneous
difference equation otherwise it is called non-homogeneous or Inhomogeneous dif-
ference equation.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 11 / 62
Definition(Linear difference equations with constant coefficients)
A linear difference equation is that in which yn , yn+1 , yn+2 , . . . etc. occur to the first
degree only and are not multiplied together.
If the coefficients yn , yn+1 , yn+2 , . . . etc. are constants then the linear difference
equation is called linear difference equation with constant coefficients. A linear
difference equation with constant coefficients has the following form

yn+r + a1 yn+r −1 + a2 yn+r −2 + · · · + an yn = f (n), (9)


where a1 , a2 , . . . , an are constants. If f (n) = 0, then (9) is called Homogeneous
difference equation otherwise it is called non-homogeneous or Inhomogeneous dif-
ference equation.

Shifting operator E
Let y = f (x) be given function of x. Let y0 , y1 , y2 , . . . , yn be the values of y at
x = x0 , x1 , x2 , . . . , xn . Then the shifting operator E is defined as

Ey0 = y1 , Ey1 = y2 , . . . , Eyn−1 = yn


E [Ey0 ] = E (y1 ) = y2 and in general E n y0 = yn .
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 11 / 62
Then (9) can be expressed in terms of shifting operator as following

E r yn + a1 E r −1 yn + a2 E r −2 yn + · · · + an yn = f (n)
=⇒ [E r + a1 E r −1 + a2 E r −2 + · · · + an ]yn = f (n) (10)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 12 / 62
Then (9) can be expressed in terms of shifting operator as following

E r yn + a1 E r −1 yn + a2 E r −2 yn + · · · + an yn = f (n)
=⇒ [E r + a1 E r −1 + a2 E r −2 + · · · + an ]yn = f (n) (10)

Now we shall deal with linear difference equations with constant coefficients
only. Their properties are analogous to those of linear differential equations
with constant coefficients.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 12 / 62
Complementary function and Particular integral

If u1 (n), u2 (n), . . . , ur (n) be r independent solution of the homogeneous difference


equation
yn+r + a1 yn+r −1 + a2 yn+r −2 + · · · + an yn = 0
then its complete solution is

Un = c1 u1 (n) + · · · + cr ur (n)

where c1 , c2 , . . . , cr are arbitrary constants. This Un is called complementary


function (C.F.) of difference equation (10).

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 13 / 62
Complementary function and Particular integral

If u1 (n), u2 (n), . . . , ur (n) be r independent solution of the homogeneous difference


equation
yn+r + a1 yn+r −1 + a2 yn+r −2 + · · · + an yn = 0
then its complete solution is

Un = c1 u1 (n) + · · · + cr ur (n)

where c1 , c2 , . . . , cr are arbitrary constants. This Un is called complementary


function (C.F.) of difference equation (10).

If Vn is a particular solution of (10), then the complete solution of (10) is yn =


Un + Vn . The part Vn is called the particular integral (P.1.) of (10). Thus, the
complete solution (C.S.) of (10) is

yn = C.F. + P.l.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 13 / 62
Rule to find the Complementary function

Consider the difference equation

yn+r + a1 yn+r −1 + a2 yn+r −2 + · · · + an yn = 0, (11)

where a1 , a2 , . . . , an are constants. Then this equation in symbolic form is

[E r + a1 E r −1 + a2 E r −2 + · · · + an ]yn = 0

The equation
mr + a1 mr −1 + a2 mr −2 + · · · + an = 0
is called Auxiliary Equation (A.E.) of difference equation (10). Since, it is
a polynomial of degree r hence it has r roots say λ1 , λ2 , · · · , λr .

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 14 / 62
Case-I If all the roots are real and distinct, then the General Solution of the difference
equation (11) is given by
yn = c1 λ1 n + c2 λ2 n + · · · + cr λr n

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 15 / 62
Case-I If all the roots are real and distinct, then the General Solution of the difference
equation (11) is given by
yn = c1 λ1 n + c2 λ2 n + · · · + cr λr n

Case-II If two roots are equal (i .e. λ1 = λ2 ), then the General Solution of the
difference equation (11) is given by

yn = (c1 + nc2 )λ1 n + · · · + cr λr n


If, however, the A.E. has three equal roots (i .e. λ1 = λ2 = λ3 ), then the
General Solution of the difference equation (11) is given by
yn = (c1 + nc2 + n2 c3 )λ1 n + c4 λ4 n + · · · + cr λr n

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 15 / 62
Case-I If all the roots are real and distinct, then the General Solution of the difference
equation (11) is given by
yn = c1 λ1 n + c2 λ2 n + · · · + cr λr n

Case-II If two roots are equal (i .e. λ1 = λ2 ), then the General Solution of the
difference equation (11) is given by

yn = (c1 + nc2 )λ1 n + · · · + cr λr n


If, however, the A.E. has three equal roots (i .e. λ1 = λ2 = λ3 ), then the
General Solution of the difference equation (11) is given by
yn = (c1 + nc2 + n2 c3 )λ1 n + c4 λ4 n + · · · + cr λr n

ase-III If one pair of roots be imaginary, i .e. λ1 = α + iβ, λ2 = α − iβ, then the
General Solution of the difference equation (11) is given by
yn = R n [c1 cos nθ + c2 sin nθ] + c3 λ3 n + · · · + cr λr n ,
 
β
p
where R = α2 + β 2 and θ = tan−1 α .
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 15 / 62
Example
Solve the difference equation yn+3 − 4yn+2 + yn+1 + 6yn = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 16 / 62
Example
Solve the difference equation yn+3 − 4yn+2 + yn+1 + 6yn = 0.

Solution
The given difference equation can be written as

(E 3 − 4E 2 + E + 6)yn = 0.

Its auxiliary equation is

m3 − 4m2 + m + 6 = 0 =⇒ (m + 1)(m − 2)(m − 3) = 0

Thus, the roots of the auxiliary equation are −1, 2, 3, which are real and distinct.
Hence the solution to given difference equation is

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

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 16 / 62
Example
Solve the difference equation un+2 − 2un+1 + un = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 17 / 62
Example
Solve the difference equation un+2 − 2un+1 + un = 0.

Solution
The given difference equation can be written in symbolic form as

(E 2 − 2E + 1)un = 0.

Its auxiliary equation is

m2 − 2m + 1 = 0 =⇒ (m − 1)2 = 0

Thus, the roots of the auxiliary equation are 1, 1, which are real and equal. Hence,
the solution to given difference equation is

yn = (c1 + nc2 )1n = c1 + nc2 .

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 17 / 62
Example
Solve the difference equation yn+2 + 2yn+1 + 4yn = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 18 / 62
Example
Solve the difference equation yn+2 + 2yn+1 + 4yn = 0.

Solution
The given difference equation can be written in symbolic form as

(E 2 + 2E + 4)un = 0.

Its auxiliary equation is



m2 + 2m + 4 = 0 =⇒ m = −1 ± 3i
√ √
Thus, the roots of the auxiliary equation are −1 + 3i, −1 − 3i, which are imag-
inary roots. Hence, the solution to given difference equation is

yn = 2n [c1 cos nθ + c2 sin nθ],



where θ = tan−1 (− 3) = 2π
Thus,3 .
    
2π 2π
yn = 2n c1 cos n + c2 sin n .
3 3
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 18 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:
1 After reaching the age of two months, each pair produces a mixed pair, (one
male, one female), and then another mixed pair each month thereafter.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:
1 After reaching the age of two months, each pair produces a mixed pair, (one
male, one female), and then another mixed pair each month thereafter.
2 No deaths occur during the year.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:
1 After reaching the age of two months, each pair produces a mixed pair, (one
male, one female), and then another mixed pair each month thereafter.
2 No deaths occur during the year.
How many rabbits will there be at the end of the year?

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:
1 After reaching the age of two months, each pair produces a mixed pair, (one
male, one female), and then another mixed pair each month thereafter.
2 No deaths occur during the year.
How many rabbits will there be at the end of the year?
Mathematically, Let yn denote the number of rabbit pairs at the beginning of
month n, then we have
y0 = 1, y1 = 1, y2 = 2, y3 = 3, y4 = 5, . . . (Look at the diagram) and, in general,
yn = yn−1 + yn−2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Fibonacci sequence
Fibonacci Number: In the year 1202, an Italian mathematician Leonardo of Pisa,
better known as Fibonacci, posed the following problem in his book Liber Abaci :
A male and a female rabbit are born at the beginning of the year. We assume the
following conditions:
1 After reaching the age of two months, each pair produces a mixed pair, (one
male, one female), and then another mixed pair each month thereafter.
2 No deaths occur during the year.
How many rabbits will there be at the end of the year?
Mathematically, Let yn denote the number of rabbit pairs at the beginning of
month n, then we have
y0 = 1, y1 = 1, y2 = 2, y3 = 3, y4 = 5, . . . (Look at the diagram) and, in general,
yn = yn−1 + yn−2

• Definition: The integers 1, 1, 2, 3, 5, 8, 13, 21, . . . are said to form a Fibonacci


sequence satisfying the condition
yn = yn−1 + yn−2 for n > 2.
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 19 / 62
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 20 / 62
The following table gives the first 55 Fibonacci numbers:
n, yn n, yn n, yn n, yn n, yn
1, 1 12, 144 23, 28657 34, 5702887 45, 1134903170
2, 1 13, 233 24, 46368 35, 9227465 46, 1836311903
3, 2 14, 377 25, 75025 36, 14930352 47, 2971215073
4, 3 15, 610 26, 121393 37, 24157817 48, 4807526976
5, 5 16, 987 27, 196418 38, 39088169 49, 7778742049
6, 8 17, 1597 28, 317811 39, 63245986 50, 12586260925
7, 13 18, 2584 29, 514229 40, 102334155 51, 20365011074
8, 21 19, 4181 30, 832040 41, 165580141 52, 32951280099
9, 34 20, 6765 31, 1346269 42, 267914296 53, 53316291173
10, 55 21, 10946 32, 2178309 43, 433494437 54, 86267571272
11, 89 22, 17711 33, 3524578 44, 701408733 55, 139583862445

In particular, at the end of the first year (n=12), there will 144 rabbits.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 21 / 62
Example
Solve the Fibonacci difference equation yn = yn−1 + yn−2 , n > 2.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 22 / 62
Example
Solve the Fibonacci difference equation yn = yn−1 + yn−2 , n > 2.

Solution
The Fibonacci difference equation can be written as yn+2 − yn+1 − yn = 0, n > 0.
The given difference equation can be written in symbolic form as

(E 2 − E − 1)yn = 0.

The auxiliary equation is



2 1± 5
m − m − 1 = 0 =⇒ m =
2
√ √
Thus, the roots of the auxiliary equation are 1+2 5 , 1−2 5 , which are imaginary roots.
Hence, the solution to given difference equation is
√ !n √ !n
1+ 5 1− 5
yn = c 1 + c2
2 2
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 22 / 62
Solution cont. . .
when n = 0, yn = 1. Therefore

c1 + c2 = 1 (12)

when n = 1, yn = 1. Therefore
√ ! √ !
1+ 5 1− 5
c1 + c2 =1 (13)
2 2

Solving (12) and (13) for c1 and c2 , we get


√ √ ! √ √ !
5+ 5 1 1+ 5 5− 5 1 1− 5
c1 = =√ , c2 = = −√
10 5 2 10 5 2

Therefore
√ !n+1 √ !n+1
1 1+ 5 1 1− 5
yn = √ −√
5 2 5 2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 23 / 62
Exercise 4:
Solve the following difference equations
(a) yn+3 − 2yn+2 − 5yn+1 + 6yn = 0
(b) ∆2 yn + 2∆yn + yn = 0
(c) un+3 − 3un+1 + 2un = 0, where u1 = 0, u2 = 8, u3 = −2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 24 / 62
Exercise 5:
Solve the following difference equation
(a) yk+2 − 7yk+1 + 6yk = 0 Ans: yk = c1 6k + c2 ,

(b) yk+2 − yk = 0 Ans: yk = c1 + c2 (−1)k ,

(c) yk+2 − 6yk+1 + 9yk = 0 Ans: yk = (c1 + c2 k)3k ,


 √ k  √ k
(d) yk+2 = yk+1 + yk Ans: yk = c1 1+2 5 + c2 1−2 5

(e) yk+3 + yk+2 − 8yk+1 − 12yk = 0 Ans: yk = c1 3k + (c2 + c3 k)(−2)k ,

(f) yk+3 + yk+2 − yk+1 − yk = 0 Ans: yk = c1 + (c2 + c3 k)(−1)k .

Ans: yk = c1 2k/2 cos πk + c2 2k/2 sin πk


 
(g) yk+2 − 2yk+1 + 2yk = 0 4 4

Ans: yk = c1 cos πk + c2 sin πk


 
(h) yk+4 − yk = 0 2 2 + c3 (−1)k + c4 ,

(i) yk+4 + yk = [Link]: yk = c1 cos πk πk πk πk


   
4 + c2 sin 4 + c3 cos 4 + c4 sin 4

(j) yk+1 − (2 cos ϕ)yk + yk−1 = 0, cos ϕ ̸= 0, Ans: yk = c1 cos(ϕk) + c2 sin(ϕk),

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 25 / 62
Rules for finding the Particular Integral

There are many ways for finding Particular Integral. Some of these are :

1 Operator Method

2 Method of Undetermined Coefficients

In your syllabus only last, i.e., Method of Undetermined Coefficients is there.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 26 / 62
Method of Undetermined Coefficients

Consider the following non-homogeneous linear differential equation with constant


coefficients
yn+2 + ayn+1 + byn = Q(n) (14)
where a and b are constants and Q(n) is a function of n. Then

(1) A particular integral of (14) can be found by the method of undetermined


coefficients whenever the non-homogeneous term Q(n) is a linear combination
of elementary functions such as polynomials and β n for constant β.

(2) The method depends for its success on recognizing the general form of a
function that when substituted into the left-hand side of (14) yields the general
form of the non-homogeneous term Q(n) on the right-hand side.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 27 / 62
(3) Undetermined coefficients are involved because although the general form of a
particular integral yp can be guessed from the function Q(n), any multiplicative
constants (the undetermined coefficients) involved will not be known.

(4) Their values are found by substituting the possible form for yp into the left-
hand side of (14) and equating the undetermined coefficients of terms on the
left of the equation to the known coefficients of corresponding terms in Q(n)
on the right.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 28 / 62
Choice Rules for the Method of Undetermined Coefficients

(a) Basic Rule. If Q(n) in (14) is one of the functions in the first column in
Table 1, choose in the same line and determine its undetermined coefficients
by substituting into (14).

(b) Modification Rule. If a term in your choice for happens to be a solution of


the homogeneous ODE corresponding to (14), multiply this term by n (or by
n2 if this solution corresponds to a double root of the characteristic equation
of the homogeneous ODE).

(c) Sum Rule. If Q(n) is a sum of functions in the first column of Table 1, choose
for the sum of the functions in the corresponding lines of the second column.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 29 / 62
If Q(n) has a term And if Then include this expres-
that is a constant sion in the trial function for
multiple of. . . yp
β is not a root of the auxiliary equation Aβ n
βn β is a single root of the auxiliary equation Anβ n
β is a double root of the auxiliary equa- An2 β n
tion
1 is not a root of the auxiliary equation An2 + Bn + C
2
pn +qn+r 1 is a single root of the auxiliary equation An3 + Bn2 + Cn
1 is a double root of the auxiliary equa- An4 + Bn3 + Cn2
tion
p(n)β n , here p(n) β is not a root of the auxiliary equation [a0 + a1 n + · · · + ar nr ]β n
is a polynomial of β is a single root of the auxiliary equation n[a0 + a1 n + · · · + ar nr ]β n
the degree r in n β is a double root of the auxiliary equa- n2 [a0 + a1 n + · · · + ar nr ]β n
and β is a constant tion
If cos βn and sin βn do not appear in the A cos βn + B sin βn
cos βn or sin βn complementary function
If cos βn or sin βn appear in the comple- An cos βn + Bn sin βn
mentary function

Table 1: The method of undetermined coefficients

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 30 / 62
Example
Solve the difference equation yn+2 + 5yn+1 + 6yn = 3n2 .

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 31 / 62
Example
Solve the difference equation yn+2 + 5yn+1 + 6yn = 3n2 .

Solution
The given difference equation can be written in symbolic form as

(E 2 + 5E + 6)yn = 3n2

Its auxiliary equation is

m2 + 5m + 6 = 0 =⇒ (m + 2)(m + 3) = 0

Thus, the roots of the auxiliary eqution are −2, −3, which are real and distinct.
Hence, the complementary function of given difference equation is

yh = c1 (−2)n + c2 (−3)n

Let the particular integral of given difference equation be

Vn = An2 + Bn + C
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 31 / 62
Solution cont. . .
This gives
Vn+1 = A(n + 1)2 + B(n + 1) + C and Vn+2 = A(n + 2)2 + B(n + 2) + C
Since, Vn is a solution of the given differential equation. Therefore
Vn+2 + 5Vn+1 + 6Vn = 3n2
=⇒ A(n + 2)2 + B(n + 2) + C + 5[A(n + 1)2 + B(n + 1) + C ] + 6[An2 + Bn + C ] = 3n2
=⇒ 12An2 + (14A + 12B)n + (9A + 7B + 12C ) = 3n2
Comparing the respective coefficients, we get
3 1 7 5
A= = , 14A+12B = 0 =⇒ B = − , 9A+7B +12C = 0 =⇒ C = −
12 4 24 288
So the particular solution is
1 2 7 5
n − n− Vn =
4 24 288
Hence the general solution of the given difference equation
1 7 5
yn = c1 (−2)n + c2 (−3)n + n2 − n −
4 24 288
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 32 / 62
Example
Solve the difference equation yn+2 − 6yn+1 + 5yn = 2n with y0 = 0, y1 = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 33 / 62
Example
Solve the difference equation yn+2 − 6yn+1 + 5yn = 2n with y0 = 0, y1 = 0.

Solution
The auxiliary equation of the given difference equation is

m2 − 6m + 5 = 0 =⇒ (m − 1)(m − 5) = 0

Thus, the roots of the auxiliary equations are 1, 5, which are real and distinct.
Hence, the complementary function is given by

yh = c1 (1)n + c2 5n = c1 + c2 5n
Let the particular integral of the given difference equation be

Vn = A2n

This gives
Vn+1 = A2n+1 and Vn+2 = A2n+2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 33 / 62
Since Vn is a solution of the given difference equation. Therefore
Vn+2 − 6Vn+1 + 5Vn = 2n
=⇒ A2n+2 − 6A2n+1 + 5A2n = 2n
1
=⇒ − 3A2n = 2n =⇒ A = −
3
So, the particular integral is
1
Vn = − 2n
3
Hence, the general solution of the given difference equation is given by
1
yn = c1 + c2 5n − 2n
3
Since y0 = 0 and y1 = 0 therefore
1 2
c1 + c2 = c1 + 5c2 =
3 3
Solving c1 = 41 , c2 = 1
12 . Then
1 1 1
yn = + 5n − 2n
4 12 3
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 34 / 62
Example
Solve the recurrence relation yn+2 − 4yn+1 + 4yn = 2n .

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 35 / 62
Example
Solve the recurrence relation yn+2 − 4yn+1 + 4yn = 2n .

Solution
The auxiliary equation of the given recurrence relation is given by

m2 − 4m + 4 = 0 =⇒ (m − 2)2 = 0,

which has two real equal roots 2, 2. Therefore the complementary function is given
by
yh = (c1 + c2 n)2n
Since 2 is a double root of the auxiliary equation and hence let the particular integral
be
Vn = An2 2n
This gives

Vn+1 = A(n + 1)2 2n+1 and Vn+2 = A(n + 2)2 2n+2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 35 / 62
Solution cont. . .

Since Vn is the solution of given recurrence relation and hence

A(n + 2)2 2n+2 − 4A(n + 1)2 2n+1 + 4An2 2n = 2n


=⇒ 4A(n2 + 4n + 4)2n − 8A(n2 + 2n + 1)2n + 4An2 2n = 2n
=⇒ 12An2 2n = 2n
1
=⇒ A =
12
So, the particular integral is
1 2 n
n 2 Vn =
12
Therefore the general solution of the given recurrence relation is
1 2 n
yn = (c1 + c2 n)2n + n 2
12

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 36 / 62
Example
Find the particular integral of the following recurrence relation

yn+2 − 5yn+1 + 4yn = n

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 37 / 62
Example
Find the particular integral of the following recurrence relation

yn+2 − 5yn+1 + 4yn = n

Solution
Since 1 is a root of the auxiliary equation of the given difference equation, therefore
let the particular integral be
Vn = An2 + Bn,
which gives

Vn+2 = A(n + 2)2 + B(n + 2) and Vn+1 = A(n + 1)2 + B(n + 1)

Since Vn is a solution of given recurrence relation, so

A(n + 2)2 + B(n + 2) − 5[A(n + 1)2 + B(n + 1)] + 4[An2 + Bn] = n


=⇒ (4A + B − 10A − B + 4B)n + (4A + 2B − 5A − B) = n
=⇒ (−6A + 4B)n + (−A + B) = n
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 37 / 62
Solution cont. . .

Comparing the coefficients of respective terms, we get

−6A + 4B = 1 −A + B = 0

Solving these two equations, we have


1
A=B=−
2
Therefore the particular integral of given difference equation is
1
Vn = − (n2 + n)
2

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 38 / 62
Example
Find the general solution of the following difference equation

yn+2 − 3yn+1 + 2yn = 2 sin(3n)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 39 / 62
Example
Find the general solution of the following difference equation

yn+2 − 3yn+1 + 2yn = 2 sin(3n)

Solution
The complementary function of the given difference equation is given by

yn (H) = c1 + c2 2n ,

which do not contain sin 3n or cos 3n. Therefore, the particular solution to given
difference equation can be written

yn (P) = A sin(3n) + B cos(3n).

This gives

yn+1 (P) = A sin 3(n + 1) + B cos 3(n + 1)


= A[sin 3n cos 3 + cos 3n sin 3] + B[cos 3n cos 3 − sin 3n sin 3]
= sin 3n[A cos 3 − B sin 3] + cos 3n[A sin 3 + B cos 3]
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 39 / 62
Solution cont. . .
and
yn+2 (P) = A sin 3(n + 2) + B cos 3(n + 2)
= A[sin 3n cos 6 + cos 3n sin 6] + B[cos 3n cos 6 − sin 3n sin 6]
= sin 3n[A cos 6 − B sin 6] + cos 3n[A sin 6 + B cos 6]
Since yn (P) is a solution of the given difference equation and therefore
yn+2 p − 3yn+1 p + 2yn p = 2 sin(3n)
=⇒ sin 3n[A cos 6 − B sin 6] + cos 3n[A sin 6 + B cos 6]−
3(sin 3n[A cos 3 − B sin 3] + cos 3n[A sin 3 + B cos 3])+
2(A sin(3n) + B cos(3n)) = 2 sin(3n)
=⇒ {A[cos(6) − 3 cos(3) + 2] + B[− sin(6) + 3 sin(3)]} sin(3n)+
{A[sin(6) − 3 sin(3)] + B[cos(6) − 3 cos(3) + 2]} cos(3n) = 2 sin(3n).
Comparing the coefficients of sin 3n and cos 3n, we get
A[cos(6) − 3 cos(3) + 2] + B[− sin(6) + 3 sin(3)] = 2,
A[sin(6) + 3 sin(3)] + B[cos(6) − 3 cos(3) + 2] = 0.
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 40 / 62
Solution cont. . .

Solving above two equations for A and B, we get

A = 0.337, B = 0.039,

Therefore
yn (P) = 0.337 sin(3n) + 0.039 cos(3n).
Thus, the general solution of the given difference equation is

yn = yn (H) + yn (P) = c1 + c2 2n + 0.337 sin(3n) + 0.039 cos(3n)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 41 / 62
Exercise 6:
Solve the following recurrence relation using method of undetermined coefficients
(a) yn+1 + yn = 3n2n .
(b) yn+2 − 4yn+1 + 4yn = (n + 1)2n .
(c) yn+2 − 5yn+1 + 6yn = n + 2n .

Exercise 7:
Solve the following difference equation using method of undetermined coefficients
(a) yk+2 − 5yk+1 + 6yk = 2 + 4k Ans: yk = c1 3k + c2 2k + 4 + 2k

(b) yk+2 − 6yk+1 + 8yk = 2 + 3k 2 − 5 · 3k


Ans: yk = c1 2k + c2 4k + 44/9 + 8/3k + k 2 + 5 · 3k .

(c) yk+2 − 4yk+1 + 3yk = k4k Ans: yk = c1 + c2 3k − 91 (16 − 3k)4k

(d) yk+3 − 7yk+2 + 16yk+1 − 12yk = k2k .


1
Ans: yk = (c1 + c2 k)2k + c3 3k − 24 (3 + k)k 2 2k .

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 42 / 62
Method of Z -Transforms

Z -transforms can also be used to find the solution of difference equations. The
following steps are required to solve a difference equation using method of Z -
transform:

Step 1. Take Z -transform on both sides of the given difference equation.

Step 2. Use given conditions and solve for U(z).

Step 3. Apply partial fractions method.

Step 4. Take inverse Z -transform on both sides which results in the given sequence.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 43 / 62
Example
(a) Using the Z -transform, solve the difference equation yn+1 + 3yn = 0, y0 = 1.
(b) Solve the difference equation

yk+2 + 4yk+1 + 3yk = 3k ,

given that y0 = 0, y1 = 1.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 44 / 62
Solution
(a) Taking Z -transform on both sides, we get

Z (yn+1 ) + 3Z (yn ) = Z (0) = 0

Denote Z (yn ) by Y (z), then

Z (yn+1 ) = z[Y (z) − y0 ] = z[Y (z) − 1]


Substituting these values
z
z[Y (z) − 1] + 3Y (z) = 0 =⇒ Y (z) =
z +3
Taking inverse Z -transform, we get
 
−1 −1 z
Z (Y (z)) = Z =⇒ yn = (−3)n
z +3

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 45 / 62
Solution cont. . .
(b) Taking Z -transform on both sides, we get

Z (yk+2 ) + 4Z (yk+1 ) + 3Z (yk ) = Z (3k )

Denote Z (yk ) by Y (z), then

Z (yk+1 ) = z[Y (z) − y0 ] = zY (z)


Z (yk+2 ) = z 2 [Y (z) − y0 − yz1 ] = z 2 [Y (z) − z1 ]
Substituting these values
 
2 1 z
z Y (z) − + 4zY (z) + 3Y (z) =
z z −3
z
=⇒ (z 2 + 4z + 3))Y (z) = +z
z −3
Y (z) 1 1
=⇒ = +
z (z + 1)(z + 3)(z − 3) (z + 1)(z + 3)
Y (z) z −2
=⇒ =
z (z + 1)(z + 3)(z − 3)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 46 / 62
Solution cont. . .

Breaking it into partial fractions, we get

Y (z) 1 5 3
= − +
z 24(z − 3) 12(z + 3) 8(z + 1)
     
1 1 5 1 3 1
=⇒ Y (z) = − +
24 z − 3 12 z + 3 8 z +1

Taking inverse Z -transform of both sides yields


     
−1 1 −1 1 5 −1 1 3 −1 1
Z (Y (z)) = Z − Z + Z
24 z −3 12 z +3 8 z +1
1 k 5 3
=⇒ yk = 3 − (−3)k + (−1)k ,
24 12 8
which is the required solution of the given difference equation.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 47 / 62
Example
Using Z-transform, solve the difference equation yn+2 − 4yn+1 + 3yn = 5n with
y0 = y1 = 1.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 48 / 62
Solution
Taking Z -transform on both sides of given difference equation yields

Z (yn+2 ) − 4Z (yn+1 ) + 3Z (yn ) = Z (5n )

Denote Z (yn ) by Y (z), then

Z (yn+1 ) = z[Y (z) − y0 ] = z[Y (z) − 1]


Z (yn+2 ) = z 2 [Y (z) − y0 − yz1 ] = z 2 [Y (z) − 1 − z1 ]
Substituting these values
1 z
z 2 [Y (z) − 1 − ] − 4z[Y (z) − 1] + 3Y (z) =
z z −5
z
(z 2 − 4z + 3)Y (z) − (z 2 − 3z) =
z −5
z z 2 − 3z
Y (z) = +
(z − 5)(z − 3)(z − 1) (z − 1)(z − 3)
Y (z) 1 1
= +
z (z − 5)(z − 3)(z − 1) (z − 1)

Breaking into partial fraction, we get


Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 49 / 62
Solution cont. . .

Y (z) 9 1 1 1 1 1
= + −
z 8z −1 8z −5 4z −3
     
9 z 1 z 1 z
=⇒ Y (z) = + −
8 z −1 8 z −5 4 z −3

Taking inverse Z -transform of both sides, we get


     
9 z 1 z 1 z
Z −1 (Y (z)) = Z −1 + Z −1 − Z −1
8 z −1 8 z −5 4 z −3
9 1 n 1 n
=⇒ yn = + 5 − 3 ,
8 8 4
which is the required solution of the given difference equation.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 50 / 62
Example
Solve the following difference equation using Z -transform

yn+2 − 2yn+1 + yn = n, y0 = 1, y1 = 1

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 51 / 62
Example
Solve the following difference equation using Z -transform

yn+2 − 2yn+1 + yn = n, y0 = 1, y1 = 1

Solution
Taking Z -transform on both sides of the given difference equation, we get

Z (yn+2 ) − 2Z (yn+1 ) + Z (yn ) = Z (n)

Denote Z (yn ) by Y (z), then

Z (yn+1 ) = z[Y (z) − y0 ] = z[Y (z) − 1]


Z (yn+2 ) = z 2 [Y (z) − y0 − yz1 ] = z 2 [Y (z) − 1 − z1 ]
Substituting these values
1 z
z 2 [Y (z) − 1 − ] − 2z[Y (z) − 1] + Y (z) =
z (z − 1)2
4 3 2
z − 3z + 3z
=⇒ Y (z) =
(z − 1)4
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 51 / 62
Solution cont. . .
Now, Since
z z 2 z2 + z 3 z 3 + 4z 2 + z
Z (1) = , Z (n) = , Z (n ) = , and Z (n ) =
z −1 (z − 1)2 (z − 1)3 (z − 1)4
Therefore, let
z 4 − 3z 3 + 3z 2 A(z 3 + 4z 2 + z) B(z 2 + z) Cz Dz
Y (z) = 4
= 4
+ + +
(z − 1) (z − 1) (z − 1)3 (z − 1)2 z −1
=⇒ z 4 − 3z 3 + 3z 2 = A(z 3 + 4z 2 + z) + B(z 2 + z)(z − 1) + cz(z − 1)2 + Dz(z − 1)3

Setting z = 1, we get A = 16 . On comparing the coefficients of z 4 , z 3 , z 2 on both


sides, we get C = 13 and B = − 12 , D = 1. Thus,

1 z 3 + 4z 2 + z
   2     
1 z +z 1 z z
Y (z) = − + +
6 (z − 1)4 2 (z − 1)3 3 (z − 1)2 z −1
Now, taking inverse Z -transform, we get
1 3 1 2 n
yn = n − n + +1
6 2 3
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 52 / 62
Example
Solve the following difference equation using Z -transform method.
(a) yk+2 = 56 yk+1 − 16 yk + 3k , y0 = 0, y1 = 1

(b) yk+2 + 6yk+1 + 9yk = 2k , y0 = y1 = 0.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 53 / 62
Solution
(a) Taking Z -transform of both sides of given difference equation, we get

5 1
Z (yk+2 ) = Z (yk+1 ) − Z (yk ) + Z (3k )
6 6
Denote Z (yk ) by Y (z), then

Z (yk+1 ) = z[Y (z) − y0 ] = zY (z)


Z (yk+2 ) = z 2 [Y (z) − y0 − yz1 ] = z 2 [Y (z) − z1 ]
Substituting these values
 
2 1 5 1 z
z Y (z) − = zY (z) − Y (z) +
z 6 6 z −3
Y (z) z 2 − 2z
=⇒ =
z (z − 3)(z − 1/3)(z − 1/2)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 54 / 62
Decomposing the R.H.S. into partial fraction we get

Y (z) 3 1 15 1 18 1
= − +
z 20 z − 3 4 z − 1/3 5 z − 1/2
3 z 15 z 18 z
=⇒ Y (z) = − +
20 z − 3 4 z − 1/3 5 z − 1/2

Taking inverse Z -transform on both sides, gives


3 k 15 1 18 1
yk = 3 − k
+
20 4 3 5 2k

(b) Taking Z -transform of both sides of given difference equation, we get

Z (yk+2 ) + 6Z (yk+1 ) + 9Z (yk ) = Z (2k )

Denote Z (yk ) by Y (z), then

Z (yk+1 ) = z[Y (z) − y0 ] = zY (z)


Z (yk+2 ) = z 2 [Y (z) − y0 − yz1 ] = z 2 Y (z)

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 55 / 62
Substituting these values
z
z 2 Y (z) + 6zY (z) + 9Y (z) =
z −2
Y (z) 1
=⇒ =
Z (z − 2)(z + 3)2

Decomposing RHS into partial fraction yields

Y (z) 1 1 1 1 1 1
= − −
z 25 z − 2 25 z + 3 5 (z + 3)2
1 z 1 z 1 z
=⇒ Y (z) = − −
25 z − 2 25 z + 3 5 (z + 3)2
1 z 1 z 1 (−3z)
=⇒ Y (z) = − +
25 z − 2 25 z + 3 15 (z + 3)2

Taking inverse Z -transform both sides, we get


1 k 1 1
yk = 2 − (−3)k + k(−3)k
25 25 15

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 56 / 62
Exercise 8:
Solve the following difference equation using Z -transform.
(a) yn+1 − 5yn = 0 Ans: yn = y0 5n , where a0 is arbitrary
(b) yn+2 − 3yn+1 + 2yn = 0, y0 = −1, y1 = 2 Ans: yn = 3(2n ) − 4
(c) yk+2 + 5yk+1 4yk = 2k , y0 = ‘, y1 = −4
19
Ans: yk = 18 (−4)
k
− 19 (−1)k + 1 k
18 (2 )
1
(d) yk+2 − 6yk+1 + 9yk = 3k , y0 = 0, y1 = 1 Ans: yn = 18 (5n + n2 )3n
(e) yn+2 + 10yn+1 + 25yn = n, y0 = 1, y1 = −5
1
Ans: yn = 540 [(545 − 3n)(−5)n + 5(3n − 1)]
(−1)n 2n
(f) yn+2 + 4yn+1 + 3yn = 2n , y0 = 0, y1 = 1 Ans: yn = 3 + 15 − 25 (−3)n
(g) yn+2 − 4yn+1 + 4yn = 2n , y0 = 0, y1 = 1 Ans: yn = n2n−1 + n(n − 1)2n−3
n(n−1)(n+3)
(h) yn+2 − 2yn+1 + yn = 3n + 5, y0 = y1 = 0 Ans: yn = 2

(i) yn+3 − 9yn+2 + 27yn+1 − 27yn = 2n , y − 0 = −1, y1 = −3, y2 = 2.


2 n
−3(2)n
Ans: yn = (2n −3n)3
3

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 57 / 62
Finance: Compound interest
Example
If Raju invests Rs 1000 at 6% interest compounded quarterly, how many month
must he wait for his money to double (Note that Raju can not withdraw the money
before the quarter is up). How many months it trebles.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 58 / 62
Finance: Compound interest
Example
If Raju invests Rs 1000 at 6% interest compounded quarterly, how many month
must he wait for his money to double (Note that Raju can not withdraw the money
before the quarter is up). How many months it trebles.

Solution
Annual interest rate is 6% so the quarterly rate is

6% 3 3
= %= = 0.015.
4 2 200
For 0 ≤ n ≤ 4, Pn denotes the value of Raju’s deposit at the end of n quarters.
Then Pn+1 = Pn + 0.015Pn where 0.015Pn is the interest earned on Pn during
(n + 1)th quarter. Here P0 = 1000. The solution of the difference equation
Pn+1 − 1.015Pn = 0 is

Pn = P0 (1.015)n = 1000(1.015)n .
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 58 / 62
Solution cont. . .

If the money doubles then Pn = 2P0 = 2000. Then


ln 2
2000 = 1000(1.015)n =⇒ n =
ln(1.015)

=⇒ n = 46.56 ≈ 47 quarters.
So money doubles in 47 × 3 = 141 months.
If money trebles then
ln 3
3000 = 1000(1.015)n =⇒ n = = 73.80 ≈ 74,
ln(1.015)

74 × 3 = 222.
Thus, money trebles in 222 months.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 59 / 62
Application to Deflection of a Loaded String
Consider a light string of length l stretched tightly between A and B . Let the forces
P1 be acting at its equispaced points xi (i = 1, 2, . . . , n−1) and perpendicular to AB
resulting in small transverse displacements yi ; at these points (Fig. 1). Assuming
the angle θi made by the portion between xi and xi+1 with the horizontal, to be
small, we have

sin θi ≈ θi ≈ tan θi and cos θi = 1

Figure 1: Deflection of a Loaded String

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 60 / 62
Cont. . .

If T be the tension of the string at xi , then T cos θi = T , i.e., the tension may be
taken as uniform. Taking xi+1 − xi = h, we have

yi+1 − yi = h tan θi = hθi (15)


yi − yi−1 = h tan θi−1 = hθi−1 (16)

Also, resolving the forces in equilibrium at (xi , yi ) perpendicular to AB, we get

T sin θi − T sin θi−1 + Pi = 0 =⇒ T (θi − θi−1 ) + Pi = 0 (17)

Eliminating θi and θi−1 from (15), (16) and (17), we obtain

hPi
yi+1 − 2yi + yi−1 = − (18)
T
which is a difference equation and its solution gives the displacements yi . To
obtain the arbitrary constants in the solution, we take y0 = yn = 0 as the boundary
conditions, since the ends A and B of the string are fixed.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 61 / 62
Example
A light wing stretched between two fixed nails 120 cm apart, carries 11 loads of
weight 5 gm each at equal intervals and the resulting tension is 500 gm weight.
Show that the sag at the mid point is 1.8cm.

Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 62 / 62
Example
A light wing stretched between two fixed nails 120 cm apart, carries 11 loads of
weight 5 gm each at equal intervals and the resulting tension is 500 gm weight.
Show that the sag at the mid point is 1.8cm.

Solution
Taking h = 10cm, Pi = 5gm and T = 500gm wt., the above equation (18) becomes

10 × 5 1
yi+1 − 2yi + yi−1 = − =−
500 10
The solution of above difference equation is given by
1
yi = c 1 + c 2 i + (i − i 2 )
20

11
∵ y0 = 0 =⇒ c1 = 0 and ∵ y12 = 0 =⇒ c2 =
20
Hence
11 1
yi = i + (i − i 2 )
20 20
Dr. Juhi Kesarwani & Dr. Ashish Kesarwany (VITB) Difference Equations April 3, 2025 62 / 62

You might also like