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.
 A: 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$.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
Compute the following integral:
$\ds{\bbox[5px,#ffd]{%
\int_{\verts{z} = 2}{\root{z^{2} - 1} \over z - 3}\,
{\dd z \over 2\pi\ic}}}$.
I'll choose de principal branchs of
$\ds{\root{z \pm 1}}$. Namely,
$$
\left\{\begin{array}{rcl}
\ds{\root{z \pm 1}} & \ds{=} & 
\ds{\root{\verts{z \pm 1}}\expo{\ic\arg\pars{z \pm 1}}}
\\[1mm]
\ds{\arg\pars{z \pm 1}} & \ds{\in} &
\ds{\pars{-\pi,\pi},\qquad z \not= \mp 1} 
\end{array}\right.
$$
The above path $\ds{\braces{z\ \mid\ \verts{z} = 2}}$ doesn't enclose any pole.


*

*Once the branch cuts are set in place, we have to add the contributions from paths slightly above and below the cuts.


*Once it's done, the integral is evaluated along a closed contour: It vanishes out.


*Of course, we have to subtract the previous adding $\ds{\pars{~\mbox{see the first}\ \bullet\ \mbox{above}~}}$.
\begin{align}
&\bbox[5px,#ffd]{%
\int_{\verts{z} = 2}{\root{z^{2} - 1} \over z - 3}\,
{\dd z \over 2\pi\ic}} =
\int_{\verts{z} = 2}
{\root{\pars{z + 1}\pars{z - 1}} \over z - 3}\,
{\dd z \over 2\pi\ic}
\\[5mm] = &
\require{cancel}
\cancel{-\int_{-2}^{-1}{\pars{\root{-x - 1}\expo{\ic\pi/2}}
\pars{\root{1 - x}\expo{\ic\pi/2}} \over x - 3}\,
{\dd x \over 2\pi\ic}}\label{1}\tag{1}
\\[2mm] &
-\int_{-1}^{1}{\root{x + 1}
\pars{\root{1 - x}\expo{\ic\pi/2}} \over x - 3}\,
{\dd x \over 2\pi\ic}
\\[2mm] &
-\int_{1}^{-1}{\root{x + 1}
\pars{\root{1 - x}\expo{-\ic\pi/2}} \over x - 3}\,
{\dd x \over 2\pi\ic}
\\[2mm] &
\cancel{-\int_{-1}^{-2}{\pars{\root{-x - 1}\expo{-\ic\pi/2}}
\pars{\root{1 - x}\expo{-\ic\pi/2}} \over x - 3}\,
{\dd x \over 2\pi\ic}}\label{2}\tag{2}
\\[5mm] = &
-\,{1 \over \pi}\int_{-1}^{1}
{\root{1 - x^{2}} \over x - 3}\,\dd x =
\bbx{3 - 2\root{2}} \approx 0.1716 \\ &
\end{align}
Integrals in lines (\ref{1}) and (\ref{2}) cancel each other. This happens because the combined branch cuts leaves a branch cut in $\ds{\bracks{-1,1}}$.
