Show that sum of residues of $f(z)$ at it's poles is equal to $\frac{a_{n-1}}{b_n}$ where Let $f(z) = \frac{a_0+a_1z+a_2z^2+a_3z^3+.....+a_{n-1}z^{n-1}}{b_0+b_1z+b_2z^2+b_3z^3+.....+b_{n}z^{n}}$ $b_n \ne0$
Assuming zeroes of denominator to be simple, show that sum of residues of $f(z)$ at it's poles is equal to $\frac{a_{n-1}}{b_n}$
I approached the problem by writing denominator into factors say $(z-c_0)(z-c_1)(z-c_2)....(z-c_n)$
and then adding all residues using $\sum_{i=0}^n\lim \limits_{z\to c_n}{(z-c_n)f(z)}$
However I get stuck with different denominators of each term. 
I found a solution where it generalises the formula by showing it true for couple of values of $n$. But this doesn't seem satisfactory enough. Is there a simple way to prove the desired result ?
I tried using Cauchy's integral formula but to no avail as well.
 A: The sum of residues is
$$\frac1{2\pi i}\int_C f(z)\,dz$$
where $C$ is a large enough circle with centre $0$. Let the radius $R\to\infty$.
$$\frac1{2\pi i}\int_C f(z)\,dz=\frac1{2\pi}\int_0^{2\pi}
\frac{\cdots+R^{n-1}a_{n-1}e^{i(n-1)t}}{
\cdots+R^nb_ne^{int}}e^{it}R\,dt$$
etc.
A: A  slightly different  approach which  can be  very useful  e.g.  when
applying the Egorychev  method is to use the fact  that for a rational
function  all  residues  including  the residue  at  infinity  sum  to
zero. (I  don't have a reference  ready at this time.)  The residue at
infinity is given by
$$\mathrm{Res}_{z=\infty} f(z)
= - \mathrm{Res}_{z=0} \frac{1}{z^2} f(1/z).$$
This means the sum of the residues at the finite poles is given by
$$\mathrm{Res}_{z=0} \frac{1}{z^2} f(1/z)$$
which in the present case yields
$$\mathrm{Res}_{z=0} \frac{1}{z^2}
\frac{a_0+a_1/z+\cdots+a_{n-1}/z^{n-1}}{b_0+b_1/z+\cdots+b_n/z^n}
\\ = \mathrm{Res}_{z=0} \frac{1}{z^2}
\frac{a_0z^n+a_1z^{n-1}+\cdots+a_{n-1}z}{b_0z^n+b_1z^{n-1}+\cdots+b_n}
\\ = \mathrm{Res}_{z=0} \frac{1}{z}
\frac{a_0z^{n-1}+a_1z^{n-2}+\cdots+a_{n-1}}
{b_0z^n+b_1z^{n-1}+\cdots+b_n}.$$
This is
$$[z^0] \frac{a_0z^{n-1}+a_1z^{n-2}+\cdots+a_{n-1}}
{b_0z^n+b_1z^{n-1}+\cdots+b_n}$$
because the denominator is not zero at $z=0$ as per the problem
definition. With no pole at zero the constant coefficient can be
obtained from the ordinary Taylor series and is equal to
$$\left.\frac{a_0z^{n-1}+a_1z^{n-2}+\cdots+a_{n-1}}
{b_0z^n+b_1z^{n-1}+\cdots+b_n}\right|_{z=0} = \frac{a_{n-1}}{b_n}.$$
The rule that  residues sum to zero  may then be used in  a variety of
creative      ways,      for      example  at   this    MSE      link
I   where  it   is
applied twice,  with the residue  at infinity vanishing in  the second
application as per the integral formula. The same technique is used at
this MSE  link II.
The Egorychev method with a non-zero residue at infinity is applied at
this MSE limk III
(streamlined proof).
