$\int_0^\infty\frac{\log x dx}{x^2-1}$ with a hint. I have to calculate $$\int_0^\infty\frac{\log x dx}{x^2-1},$$
and the hint is to integrate $\frac{\log z}{z^2-1}$ over the boundary of the domain $$\{z\,:\,r<|z|<R,\,\Re (z)>0,\,\Im (z)>0\}.$$
I don't understand. The boundary of this domain has a pole of the integrand in it, doesn't it? Doesn't it make this method useless?

Note
$$I(a)=\int_0^\infty\frac{\ln x}{(x+1)(x+a)}dx\overset{x\to\frac a x}
= \frac{1}{2}\int_0^\infty\frac{\ln a}{(x+1)(x+a)}dx= \frac{\ln^2a}{2(a-1)}
$$
Then
$$\int_0^\infty\frac{\ln x}{x^2-1}dx=I(-1)=-\frac14 [\ln(e^{i\pi})]^2=\frac{\pi^2}4
$$
