Is it possible to use complex logarithm to integrate $1/(z+i)$ along a path? Evaluate the following on the path $\gamma_1$ with endpoints $[-1,1+i]$
$$
\begin{align}
I_1=\frac{i}{2}\int_{\gamma_1} \frac{1}{z+i}dz -\frac{i}{2}\int_{\gamma_1}\frac{1}{z-i}dz
\end{align}
$$
Am I allowed to use the antiderivative $\operatorname{Log}(z+i)$ and $\operatorname{Log}(z-i)$ respectively to evaluate $I_1$, or the am I restricted by the complex logarithm's analyticity problems.
 A: You can show that $I_1=0$ using parametrizations $\gamma_1(t)$ and $\gamma_2(t)=-\gamma_1(t)$:
$$\int_{\gamma_1}\frac{1}{z+i}dz=\int_{0}^{1}\gamma_1'(t)\frac{1}{\gamma_1(t)+i}dt$$
$$\int_{\gamma_2}\frac{1}{z-i}dz=\int_{0}^{1}\gamma_2'(t)\frac{1}{\gamma_2(t)-i}dt=\int_{0}^{1}-\gamma_1'(t)\frac{1}{-\gamma_1(t)-i}dt=\int_{0}^{1}\gamma_1'(t)\frac{1}{\gamma_1(t)+i}dt$$
But $$\int_{\gamma_2}\frac{1}{z-i}dz=-\int_{\gamma_1}\frac{1}{z-i}dz$$
So
$$\int_{\gamma_1}\frac{1}{z+i}dz-\int_{\gamma_1}\frac{1}{z-i}dz=0$$
A: Yes, you are allowed to do what you want if you can find a branch of the logarithm that is holomorphic on a neighborhood of your curve. For example, if $\gamma$ is a smooth curve from $z_{1}$ to $z_{2}$ along which $\log(z+i)$ is holomorphic, then $\frac{d}{dz}\log(z+i)=1/(z+i)$, and
$$
\begin{align}
   \int_{\gamma} \frac{1}{z+i}\,dz 
         & = \int_{0}^{1}\frac{1}{\gamma(t)+i}\,\gamma'(t)\,dt \\
         & = \int_{0}^{1}\frac{d}{dt}\log(\gamma(t)+i)\,dt \\
         & = \left.\log(\gamma(t)+i)\right|_{t=0}^{1} \\
         & = \log(z_{2}+i)-\log(z_{1}+i).
\end{align}
$$
Of course you cannot do this if the logarithm takes a jump on the path, because then the function $\log(\gamma(t)+i)$ is no longer continuously differentiable. But you're allowed to use a different brach of $\log$ for one of your integrals and another branch of the other. The justification is found in the Fundamental Theorem of Calculus for integrals of one parameter when you have an anti-derivative which is smooth on the curve.
