Contour integral of $\sqrt{z^{2}+a^{2}}$ Suppose $a$ is real and nonnegative. Say we wanted to compute the above function (for whatever reason, be it to solve an improper real integral, or something else) along the curve $C$, as on the picture. I have chosen the contour as to avoid the branch cut connecting the three branch points. Supposing  $arg\left ( z \right ) \in \left [ 0,  2\pi \right )$ I also made parametrisations for each part of the contour. However, I wasn't able to do so for the parts  $C_{i}$, $i=1,2,3$.
In several integrals like this and this one Ron talks about assigning a phase to the segments. To me it seems like he is assigning the phase  as if the branch point was now the origin of the plane, and the phase he added was relative to that point, am I right on this one? With that being said I would say that $$C2:  z=iye^{i\pi}$$
$$C3:  z=iye^{-i\pi}$$
$$C1:  z=iye^{i0}$$
However this doesn't look right as the argument wasn't defined for $\left [ -\pi,\pi \right )$. How do we deal with these branch cuts? And how to know what phase to add? Note that I have asked a similar question here for a different function, but I didn't receive satisfactory answers(due to my poor wording, I guess). 
 A: Let $\Omega=\mathbb{C}\setminus[-\pi i,\pi i]$. If $\gamma$ is any simple closed path in $\Omega$, then
$$
               \int_{\gamma}\frac{w}{w^2+a^2}dw
$$
has value equal to $0,\pm 2\pi i,\pm 4\pi i,\pm 6\pi,\cdots$. For any $z \in \Omega$, define $\gamma_{z}$ to be a path from $0$, to the right of $0$, with a termination point $z\in\Omega$, and define
$$
            G(z) = a\exp\left\{\int_{\gamma_z}\frac{w}{w^2+a^2}dw\right\}.
$$
The function $G$ does not depend on the specific such path $\gamma_z$, and $G(0)=a$. Also,
$$
            G'(z)=G(z)\frac{z}{z^2+a^2},\;\;\; z\in\Omega.
$$
Therefore $G(z)^2$ satisfies the following for $z\in\Omega$:
$$
          \frac{\frac{d}{dz}G(z)^2}{G(z)^2}=\frac{2z}{z^2+a^2}=\frac{\frac{d}{dz}(z^2+a^2)}{z^2+a^2}, \\
          \frac{d}{dz}\frac{z^2+a^2}{G(z)^2}=0,\\
           G(z)^2=C(z^2+a^2).
$$
Evaluating at $z=0+$ gives $C=1$. Hence, $G(z)^2=z^2+a^2$, or $G(z)$ is a square root of $z^2+a^2$.
The argument of $G$ is $0$ on the positive real axis because $\gamma$ may be chosen to a straight line segment from $0+$ to $z$ on the positive real axis. Then the argument along $C_1$ is found by integrating
$$
         \int_{0}^{r}\frac{\epsilon+is}{(\epsilon+is)^2+a^2}ds
$$
