partial fractions specific question

so i thought i knew about partial fractions, but apparently i don't. i have the answer to a partial fraction but i can't figure out how you get to that answer.

the value is $$X(z) = Z*(Z+2)/(Z-1)^2 = 1 + 3z/(z-1)^2+1/(z-1)$$

Where does the "1" comes from? in the 1+ .......

Thanks

The numerator and denominator have the same degree, so the answer will have a constant term. More generally, for any polynomial $f(z)$, you can rewrite $$\frac{f(z)}{(z-1)^2} = g(z) + \frac{Az+B}{(z-1)^2}$$ where the degree of $g(z)$ will be $2$ less than the degree of $f$. This decomposition follows from polynomial long division.
• In this case $Az+B$ in this case would be $4z-1 = 3z + (z-1)$. – Rolf Hoyer May 8 '15 at 4:52
• that would make the result you said, thats where the 3z comes from, but how did you got that? long division from $z*(z+2)$ divided by $z^2$? – pato.llaguno May 8 '15 at 4:58
• @pato.llaguno Division by $(z-1)^2$ yields $z^2+2z = (z-1)^2 + 4z-1$. – Rolf Hoyer May 8 '15 at 5:00