<s>[INST] contour integration with dogbone, branch cut Compute the following integral
$$\frac1{2\pi\mathrm{i}}\int_{|z|=2}\frac{\sqrt{z^2-1}}{z-3}\,\mathrm{d}z.$$
Taking a branch of $\sqrt{z^2-1}$, satisfying $\sqrt{z^2-1}>0$ for $z>0$, I tried this problem with a 'dogbone' contour and I get,
$$\int_C\frac{\sqrt{z^2-1}}{z-3}\,\mathrm{d}z=-2\int_{-1}^1 \frac{\sqrt{x^2-1}}{x-3}\,\mathrm{d}x,$$
considering the integrations at the branch points are tends to zero as $\epsilon$ goes to zero.
After that, I got stuck because I cannot use the Cauchy integral theorem because the singularity is outside the domain. Please give an idea for this kind of problem. I feel I am wrong, and I want to know the right figure for the contour.
 [/INST] For $R>3$, Cauchy's Integral Theorem guarantees that
$$\begin{align}
\oint_{\text{Dogbone}}\frac{\sqrt{z^2-1}}{z-3}\,dz&=\oint_{|z|=2}\frac{\sqrt{z^2-1}}{z-3}\,dz\\\\
&=\oint_{|z|=R}\frac{\sqrt{z^2-1}}{z-3}\,dz-2\pi i \text{Res}\left(\frac{\sqrt{z^2-1}}{z-3},z=3\right)\\\\
&=-2\pi i \text{Res}\left(\frac{\sqrt{z^2-1}}{z-3},z=\infty\right)-2\pi i \text{Res}\left(\frac{\sqrt{z^2-1}}{z-3},z=3\right)
\end{align}$$
where the integral around the dog bone contour is taken counter clockwise.
The Residue at Infinity of $f(z)=\frac{\sqrt{z^2-1}}{z-3}$ is equal to the residue at $z=0$ of $-\frac1{z^2}f\left(\frac1z\right)=\frac{\sqrt{1-z^2}}{z^2(3z-1)}$.  Therefore, we have
$$\begin{align}
\text{Res}\left(\frac{\sqrt{z^2-1}}{z-3},z=\infty\right)&=\text{Res}\left(-\frac1{z^2}\frac{\sqrt{1/z^2-1}}{1/z-3},z=0\right)\\\\
&=\lim_{z\to 0}\frac{d}{dz}\left(\frac{\sqrt{1-z^2}}{3z-1} \right)\\\\
&=-3
\end{align}$$
and the reside at $3$ is $2\sqrt 2$.
Hence, we find that
$$\oint_{\text{Dogbone}}\frac{\sqrt{z^2-1}}{z-3}\,dz=2\pi i (3-2\sqrt 2)$$
where we have tacitly selected the branch of the square root on which $\sqrt{z^2-1}$ is of positive sign when $z\in \mathbb{R}$, $z>1$.
</s>