Suppose $f(z) = f(0) \prod_{\rho}^{} (1 - \frac{z}{\rho})$ where $\rho$ is a root of $f(z)$. Evaluate the contour integral $\int_{\gamma}^{} \frac{f'(z)}{f(z)} dz $ where $\gamma$ is the rectangle $\gamma = (a , a + b, a + b + it, a+ it)$ traversed anti-clockwise and the roots of $f(z)$ are contained inside the rectangle.
Here is what I have so far:
$\frac{f'(z)}{f(z)} = - \sum_{\rho} \frac{1}{\rho}\frac{1}{1-\frac{z}{\rho}} = \sum_{\rho} \frac{1}{z - \rho} $
Hence
$\int_{\gamma}^{} \frac{f'(z)}{f(z)} dz = \int_{\gamma}^{} \sum_{\rho} \frac{1}{z - \rho} dz = \sum_{\rho} \int_{\gamma}^{} \frac{1}{z - \rho} dz $
Now my question is, can I apply Cauchy's integral formula at this stage, or do I need to parametrize the contour integral?
By Cauchy's integral formula, $\int_{\gamma} \frac{1}{z - \rho} dz=2\pi i\cdot 1.$ Therefore $$\int_{\gamma} \frac{f'(z)}{f(z)} dz= \sum_{\rho} \int_{\gamma}^{} \frac{1}{z - \rho} dz=2\pi i \cdot n$$ where $n$ is the algebraic number of roots inside the simple closed curve $\gamma$ traversed anti-clockwise.