I want to do a partial fraction on
\begin{equation} \frac{z}{(z-4)(z+\frac{1}{2})} \end{equation}
Method one, which apparently is wrong: \begin{equation} \frac{z}{(z-4)(z+\frac{1}{2})}=\frac{A}{z-4}+\frac{B}{z+\frac{1}{2}} \end{equation}
\begin{array} f A(z+\frac{1}{2})+B(z-4)=Az+\frac{1}{2}A+Bz-4B ;\\ Az+Bz=z \rightarrow A=1-B\\ \frac{1}{2}A-4B=0 \rightarrow A-8B=0 \\ A=\frac{8}{9}, B=\frac{1}{9} \end{array}
which gives
\begin{equation} \frac{8}{9}\frac{1}{z-4}+\frac{1}{9}\frac{1}{z+\frac{1}{2}} \end{equation}
Then , the second method which is a reference from an exam correction, which is deemed right, disregards for the existence of z in the numerator at first:
\begin{equation} \frac{1}{(z-4)(z+\frac{1}{2})}=\frac{A}{z-4}+\frac{B}{z+\frac{1}{2}} \end{equation}
\begin{array} f A(z+\frac{1}{2})+B(z-4)=Az+\frac{1}{2}A+Bz-4B ;\\ Az+Bz=0 \rightarrow A=-B\\ \frac{1}{2}A-4B=1 \rightarrow B=-1/4 + A/8 \\ A=\frac{2}{9}, B=-\frac{2}{9} \end{array}
Then at the end, the author inserts z back in the numerator, obtaining:
\begin{equation} \frac{2}{9}\frac{z}{z-4}-\frac{2}{9}\frac{z}{z+\frac{1}{2}} \end{equation}
So why was the former wrong, when it follows all the rules of partial fractions? And why is the second right, when z is not included in the partial fraction decomposition?
Thanks