# When/where to account for arguments/phases in branch cut problems?

Here I present two cases.

1) I first consider the keyhole contour. For instance, if I want to find $\int_{0}^{\infty} \frac{{\text{d}}x}{(x+a)^2 \sqrt{x}}$, when I consider the piece of the contour going from $\infty$ to 0, I replace $x$ an $xe^{2i\pi}$ in the square root, and the justification is that the argument of $z$ along this contour is zero but in the fourth quadrant, so we $2\pi$.

2) I next consider the dog-bone contour to find $\int_{-1}^{1} \frac{\text{d} x}{\sqrt{1-x^2}}$. I easily find the branch points of $\frac{1}{\sqrt{z^2-1}}$, and knowing that the circular bits go to zero, the contour integral is $\int_{1}^{-1} \frac{\text{d}x}{\sqrt{e^{i\pi}(1-x^2)}}+ \int_{-1}^{1} \frac{\text{d}x}{\sqrt{[e^{-i\pi}(1-x^2)}]}$.

I am unable to understand where these phases come from. I get that in the second case, the phase factors introduce a minus sign in the integral to get a form usable for the contour integral. However, why did we choose $\pi$ and $-\pi$? Firstly, these are multiplied to the entire terms in the square roots, rather than to the $x$’s alone. Additionally, the range of values used seem to be from $-\pi$ to $\pi$ instead of 0 to $2\pi$, and if we use the quadrant argument, each time it crosses the imaginary axis and reaches a different quadrant, the phase should be different! Could someone please resolve my conceptual misunderstanding? Thanks!