A problem about contour integral I decide to use contour integral to calculate $I=\int_{-1}^{1}\frac{dx}{(x-2)\sqrt{1-x^{2}}}$ but there's a problem for my result. Following is my process.
Denote $f(z)=\frac{1}{(z-2)\sqrt{1-z^{2}}}$, let [-1,1] be the cut and get two analytic branches 
they are $$f_{0}(z)=\frac{1}{(z-2)\sqrt{\left |1-z^{2}  \right |}e^{i\frac{arg(1-z^{2})}{2}}}$$
and $$f_{1}(z)=\frac{-1}{(z-2)\sqrt{\left |1-z^{2}  \right |}e^{i\frac{arg(1-z^{2})}{2}}}$$
I take the contour as following:
contour http://img14.poco.cn/mypoco/myphoto/20130618/11/17398969020130618110820079.png
I get a equation that:
$$ \lim_{r\rightarrow +\infty ,\varepsilon \rightarrow0^{+} }\int _{\Gamma}f_{0}(z)dz=\int_{-1 }^{1 }f_{0}(x){dx}+\int_{1 }^{-1}f_{1}(x){dx}+\lim_{r\rightarrow +\infty ,\varepsilon \rightarrow0^{+} }\left (\int _{\Gamma_{r}}+\int _{\Gamma_{\varepsilon }}+\int _{{\Gamma_{\varepsilon }}'}  \right )f_{0}(z)dz $$
I work out that $\int _{\Gamma_{r}}f_{0}(z)dz=\int _{\Gamma_{\varepsilon }}f_{0}(z)dz=\int _{{\Gamma_{\varepsilon }}'}f_{0}(z)dz=0$ while $r\rightarrow +\infty $ and $ \varepsilon \rightarrow 0^{+}$
and according to residue theorem I get that 
$$ \int _{\Gamma}f_{0}(z)dz=2\pi iRes(f_{0}(z),2)=2\pi i\lim_{z\rightarrow 2}\frac{1}{\sqrt{\left |1-z^{2}  \right |}e^{i\frac{arg(1-z^{2})}{2}}}=2\pi i\frac{1}{\sqrt{3}e^{i\frac{\pi}{2} }}=\frac{2\pi }{\sqrt{3}}$$
otherwise $\int_{-1 }^{1 }f_{0}(x){dx}+\int_{1 }^{-1}f_{1}(x){dx}=2I$
then I have the result that
 $I=\frac{1}{2}\frac{2\pi }{\sqrt{3}}=\frac{\pi }{\sqrt{3}}$
but $I$ is explicitly a negative and the true result is $-\frac{\pi }{\sqrt{3}}$
what's wrong?
 A: Define $\sqrt{1-z^2}$ as the product $\sqrt{1-z^2} = (\sqrt{1+z})(\sqrt{1-z})$ where the branch cut for $\sqrt{1+z}$ is the real interval $(-\infty, -1]$ and the branch cut for $\sqrt{1-z}$ is the real interval $(-\infty, 1]$.
Outside of the real interval $[-1, 1]$ the function $\sqrt{1-z^2}$ is analytic (when $z$ is real and $z < -1$, each factor as a discontinuity which expresses itself as a factor or $-1$, and these cancel).
Now use change of variables. Integrate your function over the contour $|z| = \frac{3}{2}$. Substitute $z = \displaystyle \frac{1}{w}$. Then the integral becomes
$$\int \limits_{|w| = 2/3} \frac{ \frac{1}{w^2} dw}{(\frac{1}{w^2} -2)\sqrt{1-\frac{1}{w^2}}}$$
This equals
$$\int \limits_{|w| = 2/3} \frac{dw}{2i(\frac{1}{2}-w)\sqrt{1 - w^2} }$$
The integrand only has a pole at $w = 2/3$ so you can use the Reside Theorem to get
$$\int \limits_{|z| = 3/2} \frac{dz}{(z - 2)\sqrt{1 - z^2} }  = \int \limits_{|w| = 2/3} \frac{dw}{2i(\frac{1}{2}-w)\sqrt{1 - w^2} } = \frac{2\pi}{\sqrt{3}}$$
Using the Cauchy Integral Theorem, you can see that the left integral (with the original integrand) gives the same value as an interval over a rectangular contour $\gamma_\delta$ with corners at $\pm 1 \pm \delta i$ for small values of $\delta$. Inspecting the values of the integrand $\frac{1}{(z - 2)\sqrt{1 - z^2} } $ as $\delta \to 0$ shows that the value $\frac{2\pi}{\sqrt{3}}$ of the contour integral is twice the value of the value you seek, with the sign reversed.
Notice by using the branch cuts that when $x = Re(z)$ is in $(-1, 1)$ and $\delta$ is small that you get
$$\sqrt{1+(x - \delta i)} = \overline{\sqrt{1+(x + \delta i)}}$$
$$\sqrt{1-(x - \delta i)} = -\overline{\sqrt{1-(x + \delta i)}}$$
so that
$$\sqrt{1-(x - \delta i)^2} = -\overline{\sqrt{1-(x + \delta i)^2}}$$
Therefore, when you parametrize the curve $\gamma_\delta$ and take the limit, you get
$$\int \limits_{\gamma_\delta} \frac{dz}{(z - 2)\sqrt{1 - z^2} } \to -2 \int \limits_{-1}^{1} \frac{dx}{(x - 2)\sqrt{1 - x^2} }$$
The sign is reversed because the integral around $\gamma_\delta$ is counter-clockwise but $\int \limits_{-1}^{1} \frac{dx}{(x - 2)\sqrt{1 - x^2} }$ is the limit of the contour integral taken in the clockwise direction.
So the answer is $\displaystyle \frac{-\pi}{\sqrt{3}}.$
