[Math] Evaluate $\int_0^{\infty} \frac{\log x }{(x-1)\sqrt{x}}dx$ (solution verification)

complex-analysiscontour-integrationresidue-calculussolution-verification

I tried to find the integral

$$I=\int_0^{\infty} \frac{\log x }{(x-1)\sqrt{x}}dx \tag1$$

I substituted $x=t^2, 2tdt=dx$ and chose $\log x$ and $\sqrt{x}$ to be principal values. We have

$$\int_0^{\infty} \frac{\log x}{(x-1)\sqrt{x}}dx=2 \int_0^{\infty} \frac{\log t^2}{(t^2-1)}dt \tag2$$

Then because it is an even function

$$2 \int_0^{\infty} \frac{\log t^2}{(t^2-1)}dt=2 \int_{-\infty}^{\infty} \frac{\log t}{(t^2-1)}dt \tag3$$

In the complex plane $z=1$ is a removable singularity of this function and $z=-1$ is a pole. So I chose the contour

$$\oint_\gamma = \int_{-R}^{-1-r}+ \int_{C_1}+\int_{-1+r}^{R}+\int_{C_2}=0 \tag4$$

where $C_1$ is a semi-circle $z=-1+r e^{i\phi}, \pi \ge \phi \ge 0$ and $C_2$ a semi-circle $z=R e^{i\phi}, 0 \le \phi \le \pi$. In the limit $R\to\infty, r\to 0$ the integral on $C_2$ is $0$ and $\int_{-R}^{-1-r}+\int_{-1+r}^{R}=\int_{-\infty}^{\infty}$ so we need to find

$$\lim_{r\to0} \int_{C_1} \frac{\log z}{(z^2-1)}dz = 0 \tag5$$

So $I$ should be zero. But if we compare with this question, we see it isn't. Where is my mistake?


EDIT 2: For clarity, I will compile all my corrections as an answer. Thanks to everyone who helped in the comments (and the other answers, too, of course)!

Best Answer

The integrand is always positive except at $x=1$, where it is not defined. Hence, the integral cannot be zero. Below is an easy way to obtain the answer. $$I = \int_0^{\infty} \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx = \int_0^1 \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx + \int_1^{\infty} \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx$$ $$\int_1^{\infty} \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx = \int_1^0 \dfrac{\ln(1/x)}{(1/x-1)1/\sqrt{x}} \dfrac{-dx}{x^2} = \int_0^1 \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx$$ Hence, $$I = 2\int_0^1 \dfrac{\ln(x)}{(x-1)\sqrt{x}}dx = -2 \sum_{n=0}^{\infty} \int_0^1 x^{n-1/2}\ln(x)dx = 2 \sum_{n=0}^{\infty} \dfrac1{(n+1/2)^2} = 8 \sum_{n=0}^{\infty}\dfrac1{(2n+1)^2}$$ Hence, $$I = \pi^2$$