Cauchy's Residue Theorem contradiction? Consider the contour integral:
$$I=\oint_\Gamma \frac{1}{\sqrt{z^2-1}}$$
Where $\Gamma$ is a circle at infinity and we have taken the branch cut to be between $z=\pm 1$. Now this function does not have any singularities (other then the branch points) so from Cauchy's residue theorem we would expect:
$$I=0$$
However, 
$$I=2\pi i$$
What is the reason for this contradiction, i.e. why doesn't Cauchy's residue theorem hold in this case?
Edit - derivation of latter result
$$I=\oint \frac{1}{z} \frac{1}{\sqrt{1-z^{-2}}}dz$$
$$=\int^{2\pi}_0 \frac{1}{\sqrt{1-(Re^{i \theta})^{-2}}} i d \theta$$
as $R\rightarrow \infty$ this becomes:
$$I=\int^{2 \pi}_0 i d\theta=2 \pi i$$
 A: In most complex analysis textbooks, residues are associated with functions, but in order to make sense of the residue at $\infty$, it's better to think of residues associated to $1$-forms. In your case (or in Yiorgos' example), the function is indeed holomorphic at $\infty$, but the form
$$
\frac{dz}{\sqrt{1-z^2}} \qquad\big(\text{and } \frac{dz}{z} \big)
$$
has a non-zero residue at $\infty$. Intuitively, you can think of this coming from the singularity of $z$ as in $dz$ at $\infty$ (the function $z$ has a pole at $\infty$).
A: For the same reason 
$$
\oint\frac{dz}{z}=2\pi i.
$$ 
The function $f(z)=z^{-1}$ is analytic in $\mathbb C_\infty\setminus\{0\}$.
Cauchy's Residue Theorem holds in simply connected regions in $\mathbb C$. Not in $\mathbb C_\infty$.
A: For $|z|\gt1$,
$$
\begin{align}
\frac1{\sqrt{z^2-1}}
&=\sum_{k=0}^\infty\frac1{4^k}\binom{2k}{k}z^{-2k-1}\\
&=\color{#C00000}{\frac1z}+\frac1{2z^3}+\frac3{8z^5}+\cdots
\end{align}
$$
So the residue of the branch cut from $-1$ to $1$ is $1$.
