Primitive of $\frac{1}{z-z_1}-\frac{1}{z-z_2}$ on an open set Let $\Omega\subset\mathbb{C}$ be open and assume $z_1$ and $z_2$ belong to the same connected component of the complement of $\Omega$.
First, prove that there exists a holomorphic function $f$ on $\Omega$ such that $f^{\prime}(z)=\frac{1}{z-z_1}-\frac{1}{z-z_2}$ for all $z\in\Omega$.
Then, prove there exists a holomorphic function $g$ on $\Omega$ such that $e^{g(z)}=\frac{z-z_1}{z-z_2}$.


*

*Is $f=\int_{z_0}^{z}\frac{1}{\xi-z_1}-\frac{1}{\xi-z_2}d\xi$ ? If this is correct, I am not sure how to write down the proof precisely. Which theorem can I refer to in this problem?

*We don't have the assumption that $\Omega$ is simply connected here, and does it matter?

*Why we need that $z_1$ and $z_2$ belong to the same connected component.
Thanks for any hint and help.
 A: Let
$$
 h(z) = \frac{1}{z-z_1}-\frac{1}{z-z_2} \, .
$$
for $z \in \Omega$. First show that
$$ \tag{1}
 \int_\gamma h(z) \, dz = 0 \quad \text{for any closed curve $\gamma$ in $\Omega$.} 
$$
This follows from
$$ \tag{2}
 \int_\gamma h(z) \, dz =  2 \pi i \bigl(\operatorname{I}(\gamma, z_1) - \operatorname{I}(\gamma, z_2) \bigr)
$$
where $\operatorname{I}(\gamma, z)$ is the winding number 
of $\gamma$ with respect to a point $z \in \Bbb C \setminus \Omega$.
$z \to \operatorname{I}(\gamma, z)$ is integer-valued and continuous, 
and therefore constant on each component of $\Bbb C \setminus \Omega$.
In particular $\operatorname{I}(\gamma, z_1) = \operatorname{I}(\gamma, z_2)$. (Here the condition is needed that $z_1, z_2$ are in the same
component of the complement). It follows that the RHS of $(2)$ is
zero, and that proves $(1)$.
Now you can fix any $z_0 \in \Omega$ and define
$$ \tag{3}
 f(z) = \int_{z_0}^z h(t) \, dt
$$
for $z \in \Omega$, where the integration is done along any path
connecting $z_0$ with $z$ in $\Omega$. The value of the integral
is independent of the chosen path because of $(1)$.
$(3)$ implies $f'(z) = h(z)$ in $\Omega$. It follows that
$$
  \frac{z-z_1}{z-z_2} e^{-f(z)}
$$
is constant (e.g. by calculating the logarithmic derivative). 
Therefore, for a suitable constant $C$, $g(z) = f(z) + C$
satisfies
$$
 e^{g(z)} = \frac{z-z_1}{z-z_2} \, .
$$
