# How to calculate this integral using residue theorem?

$f,g$ are holomorphic in $D(0,1)$. $P_1,P_2,...,P_k$ are roots of $f$ in $D(0,1)$. their orders are $n_1,...,n_k$. Compute $$\frac{1}{2\pi i}\oint_\gamma\frac{f'(z)}{f(z)}\cdot g(z)dz.$$

Using residue theorem I have $$\frac{1}{2\pi i}\oint_\gamma\frac{f'(z)}{f(z)}\cdot g(z)dz=\sum_{j=1}^k\frac{1}{(n_j-1)!}\left(\frac{\partial}{\partial z}\right)^{n_j-1}\left[(z-P_j)^{n_j}\frac{f'(z)}{f(z)}g(z)\right]_{z=P_j}.$$

But someone says $$\frac{1}{2\pi i}\oint_\gamma\frac{f'(z)}{f(z)}\cdot g(z)dz=\sum_{j=1}^kn_jg(P_j).$$ I don't know how to get it. Any hint is appreciated.

-
Have you actually tried taking the derivative in your formula? – Andrew Nov 30 '12 at 20:52
Can I suggest you to give an on topic title to the question? – Pragabhava Nov 30 '12 at 20:55

You should use the argument principle: $$\frac{1}{2\pi i}\oint_\gamma\frac{f'(z)}{f(z)}\cdot g(z)dz=\sum_{\mbox{zeroes of } f}n(\gamma,a)g(a)-\sum_{\mbox{poles of } f}n(\gamma,b)g(b)=\sum_{j=1}^kn_jg(P_j)$$