Solving difference equation by using z-transform and z-transform confusion

157 Views Asked by At

Use the $z$-transform to solve the following difference equation: $$y[n+2]+0.5y[n+1]+0.06y[n]=x[n]$$ where $x[n]=(-3)^{-n}u[n]-(-3)^{-n}u[n-2]$.

The first thing to notice is that $x[0]=1$, $x[1]=-\dfrac{1}{3}$, and the rest is all $0$. So, I can just apply the definition of the $z$-transform, namely: $$Z\{x[n]\}=\sum_{n=0}^\infty x[n]z^{-n}=1-\dfrac{z^{-1}}{3}$$ which is what first confuses me, because when I calculate: $$Z\{(-3)^{-n}u[n]-(-3)^{-n}u[n-2]\}=Z\{(-3)^{-n}u[n]\}-Z\{(-3)^{-n}u[n-2]\}=\dfrac{3z}{3z+1}-\dfrac{1}{9z^2+3z}\neq 1-\dfrac{z^{-1}}{3}$$ *My calculation of $Z\{(-3)^{-n}u[n-2]\}$ can be verified here.

So, both ways of getting the $z$-transform should yield the same transform (I believe); I don't know what mistake I am making, because I get different transforms. Does anyone know what I am doing wrong?

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Regarding the fractions, first factor $3z$ from the second term

$$ \frac{3z}{3z+1}-\frac{1}{9z^2+3z}=\frac{3z}{3z+1}-\frac{1}{3z(3z+1)}$$

Now multiply the first by $1=3z/3z$ $$ =\frac{(3z)3z}{3z(3z+1)}-\frac{1}{3z(3z+1)}$$

Combine fractions, write numerator as difference of squares

$$ =\frac{9z^2-1}{3z(3z+1)}=\frac{(3z-1)(3z+1)}{3z(3z+1)}=\frac{3z-1}{3z}$$

Finally we have

$$ \frac{3z}{3z+1}-\frac{1}{9z^2+3z}=1-\frac{1}{3z} \tag*{$\blacksquare$}$$