This question is from Function Theory of One Complex Variable.
Chapter 5 - Exercise 2: Let f,g be holomorphic functions on a neighborhood $\bar{D}(0,1)$. Assume that f has zero at $P_{1},P_{2},...,P_{k} \in D(0,1)$ and no zero in $\partial D(0,1)$. Let $\gamma$ be the boundary circle of $\bar{D}(0,1)$, traversed counterclockwise. Compute $\frac{1}{2\pi i}\oint_{\gamma}\frac{f'(z)}{f(z)}g(z)dz$.
I really don't know how to solve it. I tried to apply the argument principle, but it did not work.
Note that $f(z) = \prod_{i=1}^k(z-p_k) h(z)$ where $h(z)$ is holomorphic and nonzero. So the derivative is: \begin{align} f'(z) = \prod_{i=1}^k (z-p_k)^kh'(z) + h(z)\sum_{i=1}^{k}\prod_{j\neq i} (z-p_j) \end{align} So: \begin{align} \frac{f'(z)}{f(z)} &= \frac{\prod_{i=1}^k (z-p_k)^kh'(z) + h(z)\sum_{i=1}^{k}\prod_{j\neq i} (z-p_j)}{\prod_{i=1}^k(z-p_k) h(z)} \\ &= \frac{h'(z)}{h(z)}+ \sum_{i=1}^k \frac{1}{z-p_i} \end{align} Finally: \begin{align} \frac{1}{2\pi i } \oint_\gamma \frac{f'(z)}{f(z)}g(z) dz &= \frac{1}{2\pi i } \oint_\gamma \left( \frac{h'(z)}{h(z)}+ \sum_{i=1}^k \frac{1}{z-p_i}\right) g(z) dz \\ &=\sum_{i=1}^k\frac{1}{2\pi i }\oint_\gamma \frac{1}{z-p_i}g(z) dz \\ &=\sum_{i=1}^k\frac{1}{2\pi i } 2\pi i g(p_i) \\ & = \sum_{i=1}^k g(p_i) \end{align} By the Residue Theorem.