Let $f(z)$ be a complex function whose value is $\sqrt{z^2-1}\in\Bbb R$ when $z\in \Bbb R$ and $z>1$, and $f(z)$ is holomorphic if $1<|z|<\infty$ Let $f(z)$ be a complex function whose value is $\sqrt{z^2-1}\in\Bbb R$ when $z\in \Bbb R$ and $z > 1$, and $f(z)$ is holomorphic if  $1<|z|< \infty$.
Then, what is the complex integral $$I=\oint_C f(z)\,dz $$
Here, $C$ is a circle of radius $R$ whose center is the origin $0\in\Bbb C$.
https://math.stackexchange.com/questions/3527903/on-a-complex-function-fz-which-is-sqrtz2-1-in-bbb-r-when-x＞1
This question deal with the same problem, but I cannot calculate this integral from this answer.
Thank you in advance.
 A: For $z\in\Bbb{C}\setminus[-1,1]$, define $f(z):= z\exp\left(\frac{1}{2}\log\left(1-\frac{1}{z^2}\right)\right)\equiv z\sqrt{1-\frac{1}{z^2}}$, where $\log: \Bbb{C}\setminus(-\infty,0]\to \Bbb{C}$ denotes the principal branch where the argument lies strictly between $-\pi$ and $\pi$. This is a well-defined holomorphic function because whenever $z\notin [-1,1]$, we have $1-\frac{1}{z^2}\notin (-\infty,0]$.
Next, let $c_r:[0,2\pi]\to \Bbb{C}$  denote the curve $c_r(t)=re^{it}$. Now, we're going to transfer the problem to a calculation about the point at infinity. To do so, we introduce the coordinate $\zeta=\frac{1}{z}$ about the point at infinity. Note that $c_r$ is the image under the mapping $\zeta$ of the curve $c_{1/r,\text{opp}}$, which mean the oppositely oriented curve $t\mapsto \frac{1}{r}e^{-it}$. Therefore, the change of variables yields
\begin{align}
\int_{c_r}f(z)\,dz &=\int_{\zeta\circ c_{1/r,\text{opp}}}f(z)\,dz\\
&=\int_{c_{1/r,\text{opp}}}f(z(\zeta))\,d(z(\zeta))\\
&=\int_{c_{1/r,\text{opp}}}f\left(\frac{1}{\zeta}\right)d\left(\frac{1}{\zeta}\right)\\
&=\int_{c_{1/r,\text{opp}}}\frac{\sqrt{1-\zeta^2}}{\zeta}\left(-\frac{d\zeta}{\zeta^2}\right)\\
&=\int_{c_{1/r}}\frac{\sqrt{1-\zeta^2}}{\zeta^3}\,d\zeta
\end{align}
Note that in the end, the minus sign cancels the opposite orientation.
At this stage, the radius of the circle is irrelevant (as long as it is small enough... i.e strictly less than $1$). This is a typical residue calculation about $\zeta=0$ (keep in mind the square root has been defined using the principal branch of the logarithm), so I'll leave this bit to you.
