Let $f,g$ be holomorphic on a neighborhood of $\overline{D(0,1)}$. Assume that $f$ has zeros at $P_1,...P_k \in D(0,1)$ and no zeros on $\partial D(0,1)$. Let $\gamma$ be the boundary circle of $\overline{D(0,1)}$ traversed counterclockwise. Compute: $\frac{1}{2\pi i} \oint_{\gamma} \frac{f'(z)}{f(z)}g(z) dz$.
I know I have to use the argument principle.
Suppose $a \in D(0,1)$ then $f(z) = h(z)(z-a)^k$, and therefore $\frac{f'(x)}{f(x)}=kh(x)(z-a)^{k-1}+h'(x)(z-a)^k$.
Thus, this means that $\frac{f'(z)}{f(z)}=\frac{k}{(z-a)}+\frac{h'(z)}{h(z)}$
Apparently it is the case that $Res(\frac{f'(z)}{f(z)}g(z))=kg(a)$. Here are my questions. Why is the last part true, and is this it? Do I need to show more justification? Thanks!