I was studying a book about residue intigrating then I get into trouble solving this : $ {\int_{1}^\infty} \frac{dx}{{x(x^2-1)}^{1/2}} $
I know that I have to choose a contour like this:

but I don't understand why integrating over $C2 , -C4 , C8 , -C6$ gives us same amounts so we can say : $4I=2\pi iRes(f,0)=2 \pi $ then $ I=\pi/2$ could you please help me with it ?
First of all note that $\int_1^{+\infty}\frac{dx}{x \sqrt{x^2-1}}=\int_0^{+\infty}\frac{1}{t^2+1}dt$ using the substitution $x^2-1=t^2$.
Then define $f(z)=\frac{1}{z^2+1}$ and observe that it has two simple poles and $f(-z)=f(z)$.
Calculating $Res(f,i)=\frac{1}{2i}$ and defining $\alpha_R(t)=Re^{it}$ for $t \in [0,\pi]$ and $\gamma_R(t)=t$ for $t \in [-R,R]$ you have, thanks to the Residue Theorem:
$$\int_{\alpha_R*\gamma_R}f(z)dz=2\pi i Res(f,i)=\pi$$
Computing $\int_{\alpha_R}f(z)dz$, you can conclude $\lim\limits_{R \to +\infty}\int_{\alpha_R}f(z)dz=0$ and then you have:
$$\pi=\lim\limits_{R \to +\infty}\int_{\gamma_R}f(z)dz=\int_{-\infty}^{+\infty}\frac{1}{t^2+1}dt=2\int_0^{+\infty}\frac{1}{t^2+1}dt$$
Finally you get the result $\int_1^{+\infty}\frac{dx}{x \sqrt{x^2-1}}=\int_0^{+\infty}\frac{1}{t^2+1}dt=\frac \pi 2$