Integration of a multivalued function The integral is:
$$I=\int_1^2\frac{\sqrt{(x-1)(2-x)}}{x^2}dx$$
To solve this problem I integrate over a path $C$ that surrounds clockwise the branch cut, so the integral becomes:
$$I=\frac{1}{2}\oint_{C}\frac{\sqrt{(z-1)(2-z)}}{z^2}dz=\pi i\sum Res_{z=0,\infty}\frac{\sqrt{(z-1)(2-z)}}{z^2}dz$$
Now I know that for $z\in\mathbb{R} $, $z\in(1,2)$ the argument of the square root is real positive, so, writing $z$ like $z=\rho e^{i0} $ the square root is real positive too. Now I know everiting about the root and I can write the result of the residue in $z=0$ which is:
$$Res_{z=0}f(z)=\frac{3}{2\sqrt{2}i}$$
My problem is for the residue in $z=\infty$, with the substitution $z=\frac{1}{\chi}$ I obtain:
$$-\frac{1}{2\pi i}\oint_{C(0,\varepsilon)}\frac{\sqrt{(1-\chi)(2\chi-1)}}{\chi}d\chi=-(-1)^{1/2}$$
For me the result should be $-i$ because for me the function has the same behavior of the one with the variable $z$ (obviously the branch cut is now between $\frac{1}{2}$ and $1$) but with opposite sign, the book gives me the value of $i$. Where is my error? Can you please show me how I have to choose the phase for $\chi$?
Thanks a lot and sorry for bad English 
 A: Unfortunately you have tried to apply Cauchy's Residue Theorem without considering the properties of your function. The issue is that you will have a branch cut on the real axis in $(1,2)$, and therefore Cauchy's Residue Theorem doesn't apply as your contour contains a cut (the theorem says that the domain enclosed by $C$ must by regular apart from isolated singularities, i.e. poles).
Whenever you have the desired integral lying on a branch cut you want to construct 2 contours outside the cut so that you can apply Cauchy's Theorem and argue away the closure contributions.
Contour 1 should be a Dumbbell/Dogbone clockwise contour that surrounds $(1,2)$ - call this $\Gamma_a$. $\Gamma_a$ is made up of 1 straight contour ($\gamma_1$) infinitesimally above the branch cut that moves from right to left, another straight contour ($\gamma_3$) infinitesimally below the branch cut that moves from left to right, another part is a circle of radius $\delta$ centre $(1,0)$ ($\gamma_2$) the other is a circle of radius $\epsilon$ centre $(2,0)$ ($\gamma_4$). So $\Gamma_a=\gamma_1 \cup \gamma_2 \cup \gamma_3 \cup \gamma_4$.
Contour 2 should be a circle of radius $R$ centred at $(1.5, 0)$ and we take the limit as $R \rightarrow \infty$.
We should then be able to "argue away" some of our integral contributions for our dumbbell's circles.
Then we connect $\Gamma_a , \Gamma_b$ via equal and opposite contours that are infinitesimally close to one another (make sure to join them at the "argue'd away" circles of the dumbbell contour.
You should now be able to apply either Cauchy's Theorem or Cauchy's Residue Theorem and arrive at a relation between the value of the real integral and the contour integrals we have constructed.
