# Contour Integrals Around a Branch Cut

Suppose we have some complex-valued function, $f(z)$ with $\theta_1<\mathrm{arg}(z)\leq \theta_2$ and a branch cut required in the section $[-a,a]$ of the real axis. Now suppose we have a contour, $\Gamma$, which is a two-ended keyhole contour around the branch cut and second contour, $\Gamma_R$, which is the circle $|z|=R$, $R>>1$.

I have an example which uses the argument that, with

$$f(z)=\left(\frac{z-1}{z+1}\right)^{1/6}$$

we have that

$$\oint_\Gamma f(z) \, \mathrm{d}z=\oint_{\Gamma_R} f(z) \, \mathrm{d}z$$

since there are no singularities of $f(z)$ outside $\Gamma$. We then find that

$$\oint_{\Gamma_R} f(z) \, \mathrm{dz}=-\frac{2\pi i}{3}$$

and since we have previously shown that

$$\oint_\Gamma \left(\frac{z-1}{z+1}\right)^{1/6} \, \mathrm{d}z \rightarrow-i\int_{-1}^1\left(\frac{1-x}{1+x}\right)^{1/6} \mathrm{d}x$$

from which we deduce that $$\int_{-1}^1\left(\frac{1-x}{1+x}\right)^{1/6} \mathrm{d}x=\frac{2\pi}{3}$$

Suppose however that we have the function

$$f(z)=\frac{(z^2-1)^{1/2}}{z^2+1}$$

with $\Gamma$ and $\Gamma_R$ as before. How would one go about relating the integral over $\Gamma$ to the integral over $\Gamma_R$ since now we have simple poles at $\pm i$ which are not contained in $\Gamma$. My ultimate goal is to deduce (in the same manner as above) that

$$\int_{-1}^1\frac{(1-x^2)^{1/2}}{x^2+1} \, \mathrm{d}x=\pi(\sqrt{2}-1)$$

Any advice would be really appreciated, thanks!

Hint: The contour you need in this case is a double keyhole contour with a vertical cross-cut, as shown below. The blue line is the branch cut for the function $\sqrt{z^2-1}$. The poles $z=\pm i$ of $1/(z^2+1)$ are also shown.
This branch is selected by writing $\sqrt{(z+1)(z-1)} = \sqrt{\rho_1\rho_2}\exp\dfrac{\theta_1+\theta_2}{2}$ where $z+1 = \rho_1 \exp(i\theta_1)$, $z-1 = \rho_2 \exp(i\theta_2)$. The range of the angles is $0 < \theta_1, \theta_2 < 2\pi$.
It is a bit lengthy to work through all the details, but you should be able to take it from here. The contributions from $L_a$ and $L_b$ will cancel. However, when you let the radius of $C_\Gamma \rightarrow \infty$, you will get a non-zero integral.