# Solving Difference Equation Using Z-Transform

I was trying to solve a problem given in my textbook. I have attached the solution given in the book.

I thought some modifications where needed to it and tried to solve in a different way. I ended up getting absurd results. Where's the mistake in my approach ?

Your approach is correct, but the problem is that the given response is not the response to a unit step, but to a scaled step. That's why you get $\alpha y[-1]=-11/2$ and $1-\alpha y[-1]=8$, which is incompatible. If you assume a scaled step $ku[n]$, you end up with the following $\mathcal{Z}$-transform of the output signal:

$$Y(z)=\frac{k-\alpha y[-1]+\alpha y[-1]z^{-1}}{(1-z^{-1})(1+\alpha z^{-1})}\tag{1}$$

Comparing $(1)$ to the $\mathcal{Z}$-transform of the given response you get

$$k-\alpha y[-1]=8,\quad \alpha y[-1]=-\frac{11}{2},\quad\alpha=-\frac12$$

from which you obtain

$$y[-1]=11\quad\text{and}\quad k=\frac{5}{2}$$

The values of $\alpha$ and $y[-1]$ do not change, but now the result is compatible with the given response.

• Thanks alot @MattL !! I tried everything but missed this subtle point. – Nikhil Kashyap Dec 30 '17 at 19:06

$u(n)$ is the unit step sequence, and is zero for negative $n$, hence $y(-1)=0$.

• $y[-1]$ is the initial condition and is not represented by the given formula for $y[n]$, which is only valid for $n\ge 0$. If $y[-1]$ were zero, then the output would be different. – Matt L. Dec 30 '17 at 10:28
• @MattL, can you suggest something ? – Nikhil Kashyap Dec 30 '17 at 12:10