Complex analysis: partial fraction decomposition Suppose $p$ and $q$ are polynomials of degrees $m$ and $n$  respectively where $n \ge m+1$, and suppose q has simple zeros at $b_1$,...,$b_n$. 
By considering $f(w)=\frac{p(w)}{q(w)(w-z)}$ obtain the partial fraction decomposition : $$\frac{p(z)}{q(z)}=\sum_{k=1}^{n}\frac{p(b_k)}{q'(b_k)} (z-b_k)^{-1}$$

I have tried to compute the residues of $f$:
$Res(f,b_k)=\frac{p(b_k) (b_k-z)^{-1}}{q'(b_k)}$ and 
$Res(f,z)=\frac{p(z)}{q(z)}$
then $g(w)=f(w) - \sum_{k=1}^{n} \frac{p(b_k) (b_k -z)^{-1}}{q'(b_k)} \frac{1}{(w-b_k)} - \frac{p(z)}{q(z)}\frac{1}{w-z}$ is holomorphic and -> $0$ as w -> $\infty$ (due to the degrees of the polynomials p and q) and so is bounded, and so is constant by Liouville's theorem, and so = $0$
so
$f(w) = \sum_{k=1}^{n} \frac{p(b_k) (b_k -z)^{-1}}{q'(b_k)} \frac{1}{(w-b_k)} - \frac{p(z)}{q(z)}\frac{1}{w-z} \  \forall w \ \forall z$
but then I am stuck ...
 A: I'm not sure about the suggestion. Why the two variables $z,w$ and this function $f,$ which seems to be a function of both $z,w?$
Let's forget the $w$ business. Letting $a_k/(z-b_k)$ denote the principal part of $p/q$ at $b_k,$ we see
$$\frac{p(z)}{q(z)}-\sum_{k=1}^{n}\frac{a_k}{z-b_k}$$
has removable singularities at each $b_k,$ hence extends to be entire. It also tends to $0$ at $\infty,$ thus is identically $0.$ Each $a_k = \lim_{z\to b_k}(z-b_k)[p(z)/q(z)] = p(b_k)/q'(b_k).$ Thus
$$\frac{p(z)}{q(z)}=\sum_{k=1}^{n}\frac{p(b_k)}{q'(b_k)}\frac{1}{z-b_k}$$
on $\mathbb {C}\setminus \{b_1,\dots ,b_n\}.$
Now you sort of did all this, but somehow the $z,w$ business distracted you from seeing the solution.
A: Apply The Residue Theorem to the function 
$$f(w)=\frac{p(w)}{q(w)(w-z)}$$
around a contour $C$, traversed counter-clockwise, that encircles the entire plane and thus includes both $w=z$ and $w=b_k$ for all $k=1,2,\cdots n$.
We have 
$$\begin{align}
\oint_C\frac{p(w)}{q(w)(w-z)}dw&=\lim_{R\to \infty}\int_{|w|=R}\frac{p(w)}{q(w)(w-z)}dw\\\\
&=0 \tag 1
\end{align}$$
since the degree of $q$ is at least one order higher than that of $p$.  That is, we have
$$\left|\frac{p(w)}{q(w)(w-z)}dw\right|\sim \frac{R^{m+1}}{R^{n+1}}\to 0 \,\,\,\text{as}\,\,R\to \infty$$
We also have from the Residue Theorem
$$\begin{align}
\oint_C\frac{p(w)}{q(w)(w-z)}dw&=2\pi i \left(\frac{p(z)}{q(z)}+\sum_{k=1}^n \lim_{w\to b_k}\frac{(w-b_k)p(w)}{q(w)(w-z)}\right) \\\\
&=2\pi i \left(\frac{p(z)}{q(z)}+\sum_{k=1}^n \frac{p(b_k)}{q'(b_k)(b_k-z)}\right)\tag 2
\end{align}$$
Putting $(1)$ and $(2)$ together reveals that
$$\frac{p(z)}{q(z)}=\sum_{k=1}^n \frac{p(b_k)}{q'(b_k)(z-b_k)}$$
as was to be shown!
