I'm trying to show that $\int_1^{\infty}\frac{dx}{x\sqrt{x^2-1}}=\frac{\pi}{2}$ by letting $f(z)=\frac{1}{z\sqrt{z^2-1}}=\frac{1}{z}e^{-\log(z^2-1)^{\frac{1}{2}}}$.
and I need to show that, on the 4 straight lines, $$L_1^+=\{z|z:R+\epsilon i \rightarrow \rho+1+\epsilon i\}, L_1^-=\{z|z:\rho+1-\epsilon i \rightarrow R-\epsilon i\}, $$$$L_2^+=\{z|z:-\rho-1+\epsilon i \rightarrow -R+\epsilon i\}, L_2^-=\{z|z:-R+\epsilon i \rightarrow -\rho-1+\epsilon i\}$$, which are the parts of a simple closed contour which is surrounding the simple pole $z=0$ of $f$ and excluding $\{x\in R | x$ is less than or equal to $-1$ or $x$ is greater than or equal to $1 \}$, $$\lim_{\rho\rightarrow 0,R\rightarrow \infty, \epsilon\rightarrow 0 }\int_{L_{1,2}^{+,-}}f(z)dz=-\frac{\pi}{2}.$$ it is negative since I chose the contour negatively oriented at the first. I was able to show that the other parts go to $0$, but somehow those four line integrals cancel out each other and make me crazy.
specifically, I got the following results:
$L_1^+ \rightarrow -\frac{\pi}{2}$
$L_1^- \rightarrow \frac{\pi}{2}$
$L_2^+ \rightarrow \frac{\pi}{2}$
$L_2^- \rightarrow -\frac{\pi}{2}$
I think the problem is to choose new branch cut when I make $\epsilon$ go to $0$. if $z=\sigma e^{i \phi}$ and $(z^2-1)^\frac{1}{2}=r e^{i\theta}$, then $2\theta=Arg(\sigma^2 e^{2i \phi}-1)$, so $\theta$ behaves similarly with $\phi$, and from here the above results come out and I don't know where I did wrong.
I know the other methods like letting $u=\sqrt{x^2-1}$, but I just want to do it this way to get used to it. any helps or hints? thanks in advance.
Here is the contour of integration and the signs of $\sqrt{z^2-1}$ near the real axis. For large $|z|$, in the upper half-plane, $\sqrt{z^2-1}\approx+z$, whereas in the lower half-plane, $\sqrt{z^2-1}\approx-z$. Note that along the imaginary axis, $\sqrt{z^2-1}$ is positive imaginary, so at $z=0$, we have $\sqrt{z^2-1}=+i$.
This means that $\operatorname*{Res}\limits_{z=0}\left(\frac1{z\sqrt{z^2-1}}\right)=-i$.
The integral along the blue contours vanishes. On the large blue circles, the size of the integrand is $\sim\frac1{|z|^2}$ and on the small blue circles, the size of the integrand is $\sim\frac1{\sqrt{2|z-1|}}$ and $\sim\frac1{\sqrt{2|z+1|}}$
The integral along each of the red and green contours is the integral we want due to the signs of $z$, $\sqrt{z^2-1}$, and the direction of the contour.
Therefore, $$ \begin{align} 4\int_1^\infty\frac{\mathrm{d}z}{z\sqrt{z^2-1}} &=2\pi i\operatorname*{Res}_{z=0}\left(\frac1{z\sqrt{z^2-1}}\right)\\ &=2\pi \end{align} $$ Thus, $$ \int_1^\infty\frac{\mathrm{d}z}{z\sqrt{z^2-1}}=\frac\pi2 $$