16.A.1 INTRODUCTION
Difference equations arise in the situations in which the discrete values of the independent variable
involve. Many practical phenomena are modelled with the help of difference equations. In engineering,
difference equations arise in control engineering, digital signal processing, electrical networks, etc. In
social sciences, difference equations arise to study the national income of a country and then its variation
with time, Cobweb phenomenon in economics, etc. Analogue to differential equation, difference equation
is the most powerful instrument for the treatment of discrete processes.
16.A.2 DEFINITIONS
A difference equation is an equation which expresses a relation between an independent variable and
the successive values of the dependent variable or the successive differences of the dependent variable.
For example, y x +3 + 2 y x + 2 − 3 y x +1 + 5 y x = x2 ...(i)
∆4 y x − 3∆3 y x + 2 ∆2 y x + 5 ∆y x + yx = 3x ...(ii)
are two difference equations.
Since the differences are dsicrete values, eqn. (i) can be written in the following form :
y(x + 3) + 2y(x + 2) – 3y(x + 1) + 5y(x) = x2 ...(iii)
Without loss of generality, the presentation as given in eqn. (iii) will be considered in this chapter.
Order of a Difference Equation :
The difference between the largest and smallest arguments appearing in the difference equation is called
its order.
863
864 Textbook of Engineering Mathematics
e.g. The order of eqn. (i) (or, iii) is (x + 3) – x = 3. Whereas the order of eqn. (ii) can be determined only
after operating the ∆ operators on the functions.
Solution of a Difference Equation :
A solution of a difference equation is a relation between the independent variable and the dependent
variable satisfying the equation.
e.g., The relation y(x) = cax is a solution of the difference equation y(x + 1) – ay(x) = 0, a ≠ 1 where c is
an arbitrary constant.
The solution of a difference equation of order n shall generally contain n arbitrary constants.
A solution involving as many arbitrary constants as is the order of the equation, is called the
general solution.
Any solution obtained from the general solution by assigning particular values to the arbitrary
constants is called a particular solution.
In the above example, y(x) = cax is the general solution and y(x) = 3ax is a particular solution.
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 865
1
From (ii) a = b(2x – 1) – ∆y = . ∆2y . (2x – 1) – ∆y ...(iv)
2
Substituting these values of a and b in (i) we obtain
x2 2 1
y=. ∆ y − . (2x – 1) x∆2y + x∆y
2 2
⇒ (x2 – x)∆2y – 2x∆y + 2y = 0
⇒ (x2 – x) y(x + 2) – 2x2y(x + 1) + (x2 + x + 2) y(x) = 0
which is the desired difference equation.
PROBLEMS
1. Write the difference equations ∆3yk + ∆2yk + ∆yk + yk = 0 in the subscript notation.
2. Find the difference equation for the equations
(i) y = A3x + B(– 2)x (ii) y = A2n + n3n–1 (iii) y = (A + Bn) 3n
1
3. Show that yk = k(k – 1) is a solution of the difference equation yk+1 – yk = k.
2
ANSWERS
1. yk+3 – 2yk+2 + 2yk+1 = 0
2. (i) y(x + 2) – y(x + 1) – 6y(x) = 0 (ii) y(n + 1) – 2y(n) = (n + 3) . 3n–1
(iii) y(n + 2) – 6y(n + 1) – 9y(n) = 0
VED
C-4\N-MATH\Ch16-1
866 Textbook of Engineering Mathematics
(c) If the auxiliary equation has non-repeated complex roots, say two of them be α1 = α + iβ, α2
= α – iβ, then the general solution of (ii) is
y(n) = rn (c1 cos nθ + c2 sin nθ) where r = α 2 + β 2 , θ = tan–1 (β/α) and c1, c2 are arbitrary
constants.
(d) If the auxiliary equation has repeated complex roots, say α + iβ and α – iβ both repeated twice
then the corresponding two terms of the general solution shall be
rn [(c1 + c2n) cos nθ + (c3 + c4n) sin nθ]
Example 1. Solve the difference equation
16y(n + 2) – 8y(n + 1) + y(n) = 0.
The given equation can be written as
(16E2 – 8E + 1) y(n) = 0
The auxiliary equation is 16E2 – 8E + 1 = 0
which has two equal roots 1/4, 1/4.
Thus the general solution is given by
y(n) = (c1 + c2n) (1/4)n, where c1, c2 are arbitrary constants.
Example 2. Solve the difference equation
yn+2 – 4yn+1 + 13yn = 0.
The given equation can be written as
(E2 – 4E + 13)yn = 0
The auxiliary equation is E2 – 4E + 13 = 0
which has complex roots 2 + 3i, 2 – 3i.
Thus the general solution is given by
yn = rn (c1 cos nθ + c2 sin nθ)
where r= 4 + 9 = 13 and θ = tan–1 (3/2).
Example 3. Solve 9y(n + 2) + 9y(n + 1) + 2y(n) = 0 with y(0) = 1 and y(1) = 1.
The given equation can be written as
(9E2 + 9E + 2) y(n) = 0
The auxiliary equation is 9E2 + 9E + 2 = 0
whose roots are – 1/3, – 2/3.
The general solution is
y(n) = c1 (– 1/3)n + c2(– 2/3)n
Now y(0) = 1 gives c1 + c2 = 1
y(1) = 1 gives – c1 – 2c2 = 3
Solving we obtain, c1 = 5 and c2 = – 4.
Hence the particular solution is
F 1I n
F 2I n
H 3K
y(n) = 5 − H 3K
−4 − .
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 867
PROBLEMS
Solve the following difference equations :
1. y(n + 2) + 6y(n + 1) + 25y(n) = 0. 2. yn+2 – 4yn+1 + 4yn = 0 with y0 = 1, y1 = 3.
3. y(n + 4) + yn = 0. 4. y(n + 2) – 2y(n + 1) – 3y(n) = 0.
5. y(n + 4) + 12y(n + 2) – 64y(n) = 0.
6. 9y(n + 2) – 6y(n + 1) + y(n) = 0 with y(0) = 1 and y(1) = 1.
7. yn+3 + 5yn+2 + 8yn+1 + 4yn = 0 with y(0) = 0, y(1) = – 1 and y(2) = 2.
8. yn = yn–1 + yn–2 with y(1) = 0, y(2) = 1 and n > 2.
(Fibonacci difference equation)
ANSWERS
1. y(n) = (5)n (c1 cos nθ + c2 sin nθ) where θ = tan–1 (– 4/3)
2. yn = (n + 2)2n–1
nπ nπ 3nπ 3nπ
3. y(n) = c1 cos + c2 sin + c3 cos + c4 sin .
4 4 4 4
F nπ nπ I
4. y(n) = c1 3n + c2(– 1)n H
5. y(n) = c1 2n + c2(– 2)n + 4n c3 cos
2
+ c4 sin
2 K
6 F 6 1 I
6. y(n) = 3n . (1/3)n 7. y(n) = –
5 H
. ( − 1)n +
5 5 K
− . n (– 2)n
5 − 5 1+ 5 F I n
F
5 + 5 1− 5 I n
8. yn =
10
.
2 GH JK +
10GH 2 JK
16.A.5 NON-HOMOGENEOUS LINEAR DIFFERENCE EQUATIONS
Similar to the method of ordinary differential equations, the general solution of a non-homogeneous
linear difference equation is found by adding a particular solution called ‘Particular Integral’ (P.I.) of the
non-homogeneous equation to the general solution called ‘Complementary Function’ (C.F.) of the
corresponding homogeneous equation. Thus,
general solution = C.F. + P.I.
For causal system, the C.F. is referred as natural response and P.I. as forced response.
Consider equation (i) of the previous section (16.A.4) as
f(E) . y(n) = g(n) ...(i)
where f(E) = Er + k1 Er–1 + ...... + kr
Then the particular integral is given by
1
P.I. = . g( n) ...(ii)
f (E)
It can be evaluated by the method of operators. Various cases are given below :
Case I. When g(n) = an, a is a constant
1 1
P.I. = . an = . a n , provided f(a) ≠ 0
f (E) f ( a)
VED
C-4\N-MATH\Ch16-1
868 Textbook of Engineering Mathematics
Auxiliary equation E2 – 4E + 4 = 0
Its roots are 2 and 2
∴ C.F. = (c1 + c2n) . 2n
1 1
P.I. = 2 . 2n = . 2n (case fails)
E − 4E + 4 ( E − 2) 2
n( n − 1) n −2
= .2 [using (b)]
2!
n( n − 1) n
= .2 .
8
Case II. 1. When g(n) = sin αn
1
. sin αn =
1 LM
e iαn − e −iαn OP
N Q
P.I. = .
f (E) f (E) 2i
1 LM 1 . e iαn
−
1
. e − iαn
OP
=
2i N f ( E) f ( E) Q
1 L 1 OP
2i MN f ( E )
1
n
− . b n where a = eiα and b = e–iα
Q
= .a
f (E)
Now it is similar to case I.
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 869
2. When g(n) = cos αn
1
. cos αn =
1 LM
e iαn + e − iαn OP
N Q
P.I. =
f (E) f (E) 2
1 1LM . e iαn +
1
. e − iαn
OP
N Q
= .
2 f ( E) f ( E)
1 LM 1 . a n
+
1 OP
. b n , as before.
N f ( E) Q
=
2 f (E)
Now it is similar to case I.
Example 3. Solve 2y(n + 2) + 3y(n + 1) + y(n) = cos 2n.
The given equation can be written as
(2E2 + 3E + 1) y(n) = cos 2n
∴ Auxiliary Equation is 2E2 + 3E + 1 = 0
whose roots are – 1 and – 1/2
∴ C.F. = c1 (– 1)n + c2 (– 1/2)n
1 1 FG
ei 2 n + e − i 2 n IJ
P.I. =
2 E 2 + 3E + 1
. cos 2n =
2 E 2 + 3E + 1
.
2 H K
LM
1 1
. e i2n +
1
. e − i2n
OP
N Q
= .
2 2 E + 3E + 1
2
2 E + 3E + 1
2
1 L OP
= .M
1 1
. ei2 n + −i4 . e −i2n
2 N 2e i4
+ 3e i 2 + 1 2 e + 3e − i 2 + 1 Q
1 (2e −i 4 + 3e − i 2 + 1) e i 2 n + ( 2e i 4 + 3e i 2 + 1) . e − i 2 n
= .
2 (2e i 4 + 3e i 2 + 1)(2e −i 4 + 3e − i 2 + 1)
=
1 2e
.
d
− ( 4 − 2 n )i
i d i d
+ e ( 4 − 2 n )i + 3 e − ( 2 − 2 n )i + e ( 2 − 2 n ) i + e 2 ni + e −2 ni i
2 2(e i 4 + e – i 4 ) + 9(e i 2 + e −i 2 ) + 12
1 2 cos ( 4 − 2 n) + 3 cos ( 2 − 2n) + cos 2n
= .
2 2 cos 4 + 9 cos 2 + 12
Case III. When g(n) = np
1 1
P.I. = . np = . np
f (E) f (1 + ∆ )
The above P.I. is evaluated in two steps.
1. Using Binomial theorem, expand [f(1 + ∆)]–1 upto the term ∆p,
2. Express np in the factorial form and operate the expansion terms on it.
Example 4. Solve y(n + 2) – y(n + 1) – 2y(n) = n2
The given equation can be written as
(E2 – E – 2) y(n) = n2.
VED
C-4\N-MATH\Ch16-1
870 Textbook of Engineering Mathematics
Auxiliary equation, E2 – E – 2 = 0
whose roots are – 1 and 2
∴ C.F. = c1 (– 1)n + c2.2n
1 1
∴ P.I. = 2 . n2 = . n2
E −E−2 (1 + ∆ ) 2 − (1 + ∆ ) − 2
LM F IJ OP −1
MN GH
1 1 ∆2 + ∆
=
∆ +∆−2
2
. n2 = –
2
1−
2 K PQ . n2
LM F IJ FG IJ + ......OP . n 2
=–
1
2
G
MN H
1+
∆2 + ∆
2 K H
+
∆2 + ∆
2 K PQ
2
1L O 1L ∆ 3 OP
= – M1 + + ......P n = – M1 + + ∆
∆ ∆ ∆ 2 2
2N Q
+ + 2 2
+ ...... n 2
2N 2 2 4 Q 2 4
= – L1 + + ∆ + ......O d n + n i
∆ 3
M PQ
1
2N
2 (2 ) (1)
2 4
1 1
= 2n . . n = 2n . .n
4E + 2 E + 1
2
4(1 + ∆ ) + 2(1 + ∆ ) + 1
2
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 871
2n
1 LM 2n
+
10 ∆ + 4∆2 OP −1
N Q
= . . n = 1 .n
7 + 10 ∆ + 4 ∆2 7 7
2 L 10 ∆ + 4 ∆ O 2 L 10 O
M P
n
M n− P
n 2
Q 7 N 7Q
1−
7 N
= n=
7
Hence the general solution is given by
2n F10 I
y(n) = (5/2)n/2 (c1 cos nθ + c2 sin nθ) +
7
n−
H 7 K
where θ = tan–1 (– 3).
PROBLEMS
Solve the following difference equations :
1. (E2 – 5E + 6) y(n) = n + 2n 2. y(n + 2) – 4y(n + 1) + 3y(n) = 5n
3. yn+2 – 5yn+1 + 6yn = 36 4. yn+1 – 2yn = n + 1
5. y(n + 2) + 4y(n + 1) + 4 = n 6. (E2 – 2E + 5) y(n) = 3.2n – 5.6n
7. y(n + 3) + y(n + 2) – 8y(n + 1) – 12y(n) = 2n2 + 5
8. y(n + 2) – y(n + 1) – 2y(n) = n2 9. y(n + 2) – 4y(n + 1) + 4y(n) = 3n + 2n
10. yn+2 – 2 cos a.yn+1 + yn = cos an, a is a constant
11. y(n + 2) – 7y(n + 1) + 12y(n) = cos n 12. y(n + 2) – 6y(n + 1) + 8y(n) = 3n2 + 2
13. yn+2 – 6yn+1 + 8yn = 3n2 + 2 – 5.3n 14. yn+3 – 5yn+2 + 8yn+1 – 4yn = n.2n
15. (E2 – 5E + 6) y(n) = 4n(n2 – n + 5) 16. y(n + 2) – 4y(n + 1) + 4y(n) = n2 . 2n
ANSWERS
1
1. y(n) = c1 2n + c2 3n + (2n + 2) – n2n–1 2. y(n) = c1 + c2.3n + 5n/8
4
3. yn = c1 . 2n + c2 .3n + 18 4. y(n) = c1.2n – (n + 2)
5n − 6
5. y(n) = c1 (– 4)n +
25
3 n 5
6. y(n) = 5n/2 . (c1 cos nθ + c2 sin nθ) + .2 − . 6n , where θ = tan–1 (2)
5 29
n2 n 17
7. y(n) = c1.3n + (c2 + c3 n) (– 2)n – + −
9 27 54
1 2 1 2
8. y(n) = c1 (– 1)n + c2(2)n – (n + n + 2) 9. y(n) = (c1 + c2 n)2n + 6 + 3n + n . 2n
2 8
n sin (n − 1) a 1
10. y(n) = c1 cos an + c2 sin an + 11. y(n) = [18 cos n – 7 sin n]
2 sin a 170
8 44 8 44
12. y(n) = c1.2n + c24n + n2 + n+ 13. yn = c1 2n + c2 4n + n2 + n + + 5.3n
3 9 3 9
n
14. yn = c1 + (c2 + c3n).2n + (n – 1) (n – 2) . 2n 15. y(n) = c1.2n + c2.3n + 4n (n2 – 13n + 61)/2
24
2n 4
16. y(n) = (c1 + c2n)2n + (n – 4n3 + 5n2 – 2)
48
VED
C-4\N-MATH\Ch16-1
872 Textbook of Engineering Mathematics
PROBLEMS
Solve :
1. y(n + 1) + x(n) – 3y(n) = n,
3y(n) + x(n + 1) – 5x(n) = 4n. with y(1) = 2 and x(1) = 0.
2. y(n + 1) – 3y(n) – 2x(n) + n = 0
x(n + 1) – 2x(n) – y(n) – n = 0, with y(0) = 0, x(0) = 3.
ANSWERS
133 n 1 n 4 19
1. y(n) = .2 − . 6 + 4n −1 − n −
100 61 5 25
133 n 1 n 3 35
x(n) = .2 + . 6 − 4n−1 − n −
100 20 5 25
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 873
1
2. y(n) = 2 . 4n – 2 – n(n – 1),
2
1
x(n) = 4n + 2 + n . (n + 1)
2
PART B : Z-TRANSFORMS
16.B.1 Introduction, 16.B.2 Some Standard z-Transforms, 16.B.3 Properties of z-Transforms, 16.B.4 Initial
Value and Final Value Theorems, 16.B.5 Inverse z-Transforms, 16.B.6 Inverse z-Transforms by Power
Series Method, 16.B.7 Inverse z-Transform by Partial Fractions Method, 16.B.8 Inverse z-Transform by
Integral Method, 16.B.9 Application to Difference Equations.
16.B.1 INTRODUCTION
The z-transform is named as a letter of the alphabet rather than a famous mathematician. A method for
solving linear constant coefficient difference equations by Laplace transforms was introduced to graduate
engineering students by Gardner and Barnes in the early 1940s. They applied their procedure which was
based on jump functions to transmission lines, and applications involving Bessel functions. This approach
is quite complicated and in a separate attempt to simplify matters, a transform of a sampled signal or
sequence was defined in 1947 by W. Hurewicz as which was later denoted in 1952 as a ‘‘Z-transform’’
by a sampled-data control group at Colombia University.
In any case, it is presumably not an accident that the z-transform was invented at about the same
time as digital computers. However z-transform can be viewed as a mathematical operation that takes a
set of points (which represents time sequence in discrete-time systems) and transforms them into a set of
complex numbers.
Definitions : Given the sequence x(n), the z-transform is defined as
∞
Z{x(n)} = X(z) = ∑ x (n ) . z − n ...(i)
n =− ∞
This expression is sometimes referred to as the one-sided z-transform. In this text the discussions
will be confined to one-sided z-transform, so we call it simply as z-transform.
Clearly z-transform exists only for the values of z for which the series of eqn. (i) or (ii) converges.
The series of Eqn. (ii) is said to converge absolutely when the series of real numbers
∞
∑ | x (n ) z −n
| ...(iii)
n=0
converges. It is also well known that a series converges absolutely also converges.
VED
C-4\N-MATH\Ch16-1
874 Textbook of Engineering Mathematics
∑ .z −n 1 z
Here X(z) = = =
n=0
1 − z −1 z − 1
(c) If x(n) = an then
∞ ∞
∑ ∑
1 z
X(z) = a n . z −n = (a / z )n = = , | a/z | < 1
n=0 n=0
1− a / z z − a
(d) If x(n) = np (n ≥ 0 and p > 0) then
∞ ∞
X(z) = ∑ n p . z −n = z ∑n p −1
(nz − n −1 )
n=0 n=0
F n
∞ I = – z . d {Z(n
=–z.
d
dz
GH ∑
n=0
p −1
z −n JK dz
p–1)}
z
If p = 1, then Z(n) = (x(n) = n is called discrete unit ramp)
( z − 1) 2
z2 + z
If p = 2, Z(n2) =
( z − 1) 3
z 3 + 4z 2 + z
If p = 3, Z(n3) =
( z − 1) 4
VED
C-4\N-MATH\Ch16-1
Difference Equation and z-Transforms 875
LM ( ) .
∞ m −1 OP
MN∑ x n z ∑
−m
− x (n ) . z − n
= zm .
n=0 n=0 PQ
= zm [Z {x(n)} – x(0) – x(1) z–1 ...... – x(m – 1) z–(m–1)]
(c) Damping Rule :
If Z {x(n)} = X(z) then Z{a–n . x(n)} = X(az)
Proof. By definition
∞ ∞
Z {a–n x(n)} = ∑a −n
x ( n) . z − n = ∑ x ( n) . ( az ) − n
n=0 n =0
= X(az)
Similarly, Z{an x(n)} = X(z/a)
(d) Convolution :
If Z{x(n)} = X(z) and Z{y(n)} = Y(z) then
Z{x(n) ∗ y(n)} = X(z) . Y(z)
VED
C-4\N-MATH\Ch16-1
876 Textbook of Engineering Mathematics
Proof. By definition
LM ( − ) ( )OP
∞ n
Z{x(n) ∗ y(n)} = ∑ M∑ x n m y m P z –n
n=0N m=0 Q
L OL OP
= M∑ x (n ) z P . M∑ y( n ) z
∞ ∞
−n −n
∑
dX( z )
∴ = x ( n ) . n . ( z −1 ) n −1
dz −1 n = 0
∞
∑
dX ( z ) dX ( z)
⇒ z–1 . = nx( n) . z − n ⇒ Z {n x(n)} = z–1 .
dz −1 n = 0 dz −1
d 2 X(z)
Similarly, Z{n(n – 1)x (n)} = z2 .
d ( z −1 ) 2
and so on.
Proof is obvious.
2. Final Value Theorem :
If Z{x(n)} = X(z), then
Lt x (n ) = Lt ( z − 1) . X ( z )
n→ ∞ z →1
∞
Proof. Here Z{x(n + 1) – x(n)} = ∑ {x(n + 1) – x(n)} z–n
n=0
∞
⇒ Z{x(n + 1)} – Z{x(n)} = ∑ {x(n + 1) – x(n)} z–n
n=0
VED
C-4\N-MATH\Ch16-1