How do you deal with a multivalued antiderivative for complex integration? I'm having to integrate functions of the kind $\frac{1}{z}$ on some path. For example the integral:
$\int_{1}^{-1}\frac{dx}{x-i1}$ which corresponds to integrating on a straight line that connects $(1,1)$ and $(-1,1)$ on the complex plane. The result I've got is this one: $\ln\big(\frac{-1-i}{1-i}\big)=\ln\big(\frac{e^{i5\pi/4}}{e^{i7\pi/4}}\big)=-i\frac{\pi}{2}$
But I don't understand anything of what I've done and it raises too many questions. I've assumed that we can only operate with principal angles that range from $[0,2\pi)$...
What does it mean for your antiderivative to be multivalued? Can your integral in fact be multivalued? If we assume that the angles only range $[0,2\pi)$, why is this valid?
Thanks.
Edit: I couldn't find any source online that tackles this sort of problem. If you have one please share. Thanks again.
 A: Without going into the entire theory of complex functions, the fundamental theorem of calculus that you used to find the value only works when the function is continuous and thus single-valued over the range that is being integrated. 
That last sentence is key. We don't necessarily need to use the principle branch of the logarithm, but we do need some branch that is single-valued over the line being integrated. Now the answer you need is $\ln(-1-i) - \ln(1 - i)$. Its identification with $\ln\left (\frac{-1-i}{1-i}\right )$ must also be made with consideration for the branches of the three values being used. 
Happily all these problems can be avoided by choosing the branch from $-\pi$ to $\pi$. And your answer is correct. If you had a chosen different branch (though one still avoiding the line of integration), you might have needed to take a little more care in simplifying the logarithmic expression, but the answer you arrived at would still have been $-i\frac{\pi}{2}$.
A: Just as in the real case, if you are given an $f$ defned on some open set containing a segment $z_0z_1$, then $F(z)=\int_{z_0}^{z}f(t)dt$ only makes sense if $z\in z_0z_1$. If $f$ is continuous, just as in the real case, we have $F'(z)=f(z)$.
The problem is this: Suppose $z=a+ib$ is some complex number. Now, look at $w=e^{z}=e^{a+ib}=e^a(\cos b+i\sin b)$. This shows that the all the numbers $z_n=a+i(b\pm 2\pi n )$ in the $z$-plane are mapped to the same point $w$ i.e $e^z$ is not one to one and so is not invertible, as it stands. 
Geometrically, this means that each horizontal strip of width $2\pi $ in the $z$-plane is mapped onto the $w$-plane punctured at $w=0$. Hence any inverse will not be defined at $0$. Next, notice that in order to choose an inverse, that is a function $w\mapsto z$, we need to choose a particular strip in the $z$-plane to make the inverse well-defined. The will be our logarithm function. There will be many, depending on which strip we choose. 
One choice might be: $\left \{ z\in \mathbb C:-\pi\leq \text {Im}z\leq \pi \right \}$ but there is a glitch because $e^{a+i\pi}=e^{a-i\pi }$ and so the inverse is not well-defined. We avoid this problem simply by striking the line Im$z=-\pi$ from our strip and so finally we see that our chosen inverse maps $\mathbb C\setminus \left \{ 0 \right \}$ to $\left \{ z\in \mathbb C:-\pi< \text {Im}z\leq \pi \right \}$ and is indeed well-defined. 
Now we can get a formula for the inverse:
Consider the function $w\mapsto \ln \vert w\vert +i\text {Arg}w;\ -\pi<Argw\leq \pi$. It maps $\mathbb C\setminus \left \{ 0 \right \}$ to the strip we chose above.
Furthermore, $\exp \left ( \ln \vert w\vert +i\text {Arg}w \right )=\vert w\vert e^{(i\text {Arg}w)}=w$ so it is the one we want. 
It is discontinuous, as you can easily check, at every point on the negative real axis and at $0$ where it is undefined. 
The upshot of all this is that $z=\log w$ is well-defined, continuous and differentiable everywhere except on Re$w\leq 0$.
Since your integral is taken along a segment that does not intersect the branch, you may use the fundamental theorem of calculus to evaluate it. 
