Why can't $F(z)$ be described by one branch of $\log (z)$ in the given domain? I would like to calculate the integral of $f(z)=\frac{2z}{z^2+1}$ over $|z|=2$ in the upper complex plane using $F$, the antiderivative of $f$. 
Now, I know that $F$ exists because I can draw a simply-connected domain containing the curve in which the func $f$ is analytic:
$\frac{-\pi}{4} < arg(z)< \frac{5\pi}{4}$, for $r>1$
According to the explanation in the book, since there is no single-analytic branch of $\log (z)$ in this domain, one can only describe $F=\log (z)$ using multiple branches of $\log (z)$.
Now, as far as I can tell since $z=0$ is not completely surrounded by the domain, $\log (z)$ is not multi-valued and it would be sufficient to exclude for example $Im(z)<0$ to describe an analytic branch of $\log (z)$ in the domain.  Which is already excluded.. Am I missing something here?
What analytic branches can describe $F$? A detailed explanation would be much appreciated. 
Thanks :)
 A: The antiderivative of $f$ will be $F(z)=\log(z^2+1)=\log(z+i)+\log(z-i)$ but we need to carefully choose a branch cut.  Take $-\frac{\pi}{2}<\arg(z\pm i)<\frac{3\pi}{2}$ so the branch cut for $F(z)$ will be starting at $z=i$ and extending towards $-i\infty$. Notice that this branch cut does not intersect with $|z|=2$ in the upper half plane. 
So now we can evaluate the integral by computing $F(-2)-F(2)$, while paying careful attention to argument. (I recommend drawing some triangles)
$$\log(2+i)=\ln|2+i|+i\cdot\arg(2+i)=\ln(\sqrt{5})+i\cdot\arg(2+i)$$
$$\log(2-i)=\ln|2-i|+i\cdot\arg(2-i)=\ln(\sqrt{5})-i\cdot\arg(2+i)$$
So we have that $F(2)=\ln(5)$.
$$\log(-2+i)=\ln|-2+i|+i\cdot\arg(-2+i)=\ln(\sqrt{5})+i(\pi/2+\pi/2-\arg(2+i))$$
$$\log(-2-i)=\ln|-2-i|+i\cdot\arg(-2-i)=\ln(\sqrt{5})+i(\pi+\arg(2+i))$$
Now we have $F(-2)=\ln(5)+2\pi i$.  So $F(-2)-F(2)=2\pi i$.
An easier method to evaluate the integral is by deforming the upper half of the circle of radius 2 down to the x-axis.  We will also pick up a residue at the point $z=i$.  Let $\gamma(t)=2e^{it}$ for $0\leq t\leq\pi$.
$$\int_\gamma\frac{2z}{z^2+1}dz=\int_2^{-2}\frac{2x}{x^2+1}dx+2\pi i\cdot\text{Res}\left(\frac{2z}{z^2+1};z=i\right) \\ =0+2\pi i\cdot\lim_{z\to i}\frac{(z-i)2z}{z^2+1} \\ =2\pi i$$
