Solution of Difference Equations Using The Z
Solution of Difference Equations Using The Z
ax(n)+bx(n−1)+cx(n−2)=f(n)
(1)
A time invariant or index invariant DE requires the coefficients not be a
function of
n
and the linearity requires that they not be a function of
x(n).
Therefore, the coefficients are constants.
aX(z)+b[z−1X(z)+x(−1)]+c[z−2X(z)+z−1x(−1)+x(−2)]=Y(z)
(2)
solving for
X(z)
gives
X(z)=z2[Y(z)−bx(−1)−x(−2)]−zcx(−1)az2+bz+c
(3)
and inversion of this transform gives the solution
x(n).
Notice that two initial values were required to give a unique solution just as
the classical method needed two values.
ax(n+2)+bx(n+1)+cx(n)=f(n+2)
(4)
which can be solved using the second form of the unilateral z-transform shift
property.