# Inversion of $z$-transform using partial fraction decomposition

I want to inverse a $z$-transform of this general form $$X(z) = \frac{b_0 + b_1z^{-1}+\cdots+b_Mz^{-M}}{a_0 + a_1z^{-1}+\cdots+a_Nz^{-N}}$$ where $M$ < $N$. In order to do this, I use partial fraction decomposition. I think there is two equivalent ways to go :

1. Directly find the the coefficient of the partial fraction decomposition and then find $x[n]$ ;
2. Rewrite $X(z)$ as $$X(z) = (b_0 + b_1z^{-1}+\cdots+b_Mz^{-M}) \cdot \underbrace{\frac{1}{a_0 + a_1z^{-1}+\cdots+a_Nz^{-N}}}_{Y(z)}.$$ Then we can find the partial fraction decomposition of $Y(z)$, find $y[n]$ and then, using linearity and the fact that $z^{-a}Y(z) \leftrightarrow y[n-a]$, find $x[n]$.

These two methods seem identical to me. However, in some cases, it seems they lead to different results.

So here is my question, are these two methods 100% equivalent?

Thank you.

Yes. they are 100% equivalent. Even though, it might appear that the two methods result in two different solutions, but in fact they are identical but have different representations. Let me give you an example. Consider this following $z$-transform: $$H(z)=\frac{\frac{1}{2}z^{-1}}{(1-z^{-1})(1-\frac{1}{2}z^{-1})}$$ Using two methods give the following two partial fractions:
1. $$H_1(z)=\frac{1}{1-z^{-1}}-\frac{1}{1-\frac{1}{2}z^{-1}}$$
2. $$H_2(z)=(\frac{1}{2}z^{-1})(\frac{2}{1-z^{-1}}-\frac{1}{1-\frac{1}{2}z^{-1}})$$
The inverse $z$-transform for two methods are:
1. $$h_1[n]=u[n]-(\frac{1}{2})^nu[n]$$
2. $$h_2[n]=u[n-1]-(\frac{1}{2})^nu[n-1]$$
As it is clear $h_1[n]$ and $h_2[n]$ have the same form except for $n=0$. But $h_1[n=0]=0$, so they are identical.