# Evaluate $\int_0^{\infty} \frac{\log x }{(x-1)\sqrt{x}}dx$ (solution 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)!

• I think you have to interpret this integral in a principal value sense. Effectively this means that your pole at $-1$ will count $1/2 \times 2 \pi i \times Res[z=-1]$ Furthermore, where exactly is your branch cut located? – tired Nov 19 '14 at 21:24
• No, this integral is finite. I think your problem is that you introduced a pole at $t=-1$ and you have ignored it. – Ron Gordon Nov 19 '14 at 21:25
• @tired The branch cut must include 0, so I guess I can make it $-iy, 0 \le y \le \infty$. – Minethlos Nov 19 '14 at 21:48
• Good choice. Then you have also to show that a small semi-circle around the origin vanish, to be totally on the safe side (hint: you are!). – tired Nov 19 '14 at 21:50
• @tired Alright, I fixed those two things. Now if we look at (2) and (3), my result now is $I=2\pi^2$ which has wrong coefficient. Also, should I accept Adhvaita's answer? The discussion in comments was more fruitful. – Minethlos Nov 19 '14 at 22:22

From your line (3), we have \begin{align} \int_{-\infty}^{\infty}\frac{\ln(t^2)}{t^2 - 1}dt &= \int_{\Gamma}f(t) + \int_{\gamma_1}f(t) + \int_{\gamma_2}f(t) + \int_{\gamma_3}f(t) \end{align} if we consider a key hole contour as picture below.

Let radius of $\Gamma$ be $R$, $\gamma_1$ be $\epsilon$, $\gamma_2$ be $\delta_2$, and $\gamma_3$ be $\delta_3$ be $$f(z) = \frac{\ln(z^2)}{z^2 - 1} = \frac{2(\ln|z| + i\arg(z))}{z^2-1}$$ As $R\to\infty$, $\int_{\Gamma}\to 0$, and as $\epsilon\to 0$, $\int_{\gamma_1}\to 0$ by the estimation lemma. \begin{align} \int_0^{\infty}\frac{\ln(x)}{(x-1)\sqrt{x}}dx &= 2\int_{-\infty}^{\infty}\frac{\ln(z)}{z^2-1}dz\\ &=\int_{\gamma_2}f + \int_{\gamma_3}f\\ &= \pi i\text{Res}(f; -1) - \pi i\text{Res}(f; -1)\\ \end{align} the second residue at $-1$ is negative for being in the lower half.

• Very nice, the standard way to go if one wants to use complex analysis! – tired Nov 20 '14 at 14:58
• Why is $\int_{\gamma_2}f=\pi i \text{Res} (f;-1)$? Can't you unite $\gamma_2$ and $\gamma_3$ to get a full circle and then use Cauchy's theorem? – Minethlos Nov 20 '14 at 23:43
• @Minethlos can't make a full circle across a branch cut. If we do, we will have a multivalued integral. – dustin Nov 20 '14 at 23:55
• I do not believe this is correct, since the branch cut of $\ln(z^2)$ will be along the imaginary axis, not along the negative real axis. – user2520938 Jun 17 '15 at 21:30

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$$

Here's an approach using the Gamma function. Recall that the logarithmic derivative of $\Gamma(x)$ is $$\frac{\Gamma'(x)}{\Gamma(x)}=\psi(x)=-\gamma+\sum_{k=0}^\infty\left(\frac1{k+1}-\frac1{k+x}\right)\tag{1}$$ where $\psi$ is the digamma function. Upon taking another derivative, $(1)$ becomes $$\frac{\Gamma''(x)\Gamma(x)-\Gamma'(x)^2}{\Gamma(x)^2}=\sum_{k=0}^\infty\frac1{(k+x)^2}\tag{2}$$ Next, we substitute $x\mapsto1/x$ to get $$\int_0^1\frac{\log(x)}{(x-1)\sqrt{x}}\mathrm{d}x =\int_1^\infty\frac{\log(x)}{(x-1)\sqrt{x}}\mathrm{d}x\tag{3}$$ Putting $(2)$ and $(3)$ together gives \begin{align} &\int_0^\infty\frac{\log(x)}{(x-1)\sqrt{x}}\mathrm{d}x\\ &=2\int_1^\infty\frac{\log(x)}{(x-1)\sqrt{x}}\mathrm{d}x\tag{4}\\ &=2\int_0^\infty\frac{\log(1+x)}{x\sqrt{1+x}}\mathrm{d}x\tag{5}\\ &=\left.-2\lim_{\alpha\to1^-}\frac{\mathrm{d}}{\mathrm{d}\beta}\int_0^\infty\frac{\mathrm{d}x}{x^\alpha(1+x)^\beta}\right|_{\beta=1/2}\tag{6}\\ &=\left.-2\lim_{\alpha\to1^-}\frac{\mathrm{d}}{\mathrm{d}\beta}\frac{\Gamma(1-\alpha)\Gamma(\alpha+\beta-1)}{\Gamma(\beta)}\right|_{\beta=1/2}\tag{7}\\ &=-2\lim_{\alpha\to1^-}\frac{\Gamma(2-\alpha)}{1-\alpha}\frac{\Gamma'(\alpha-1/2)\Gamma(1/2)-\Gamma(\alpha-1/2)\Gamma'(1/2)}{\Gamma(1/2)^2}\tag{8}\\ &=2\frac{\Gamma''(1/2)\Gamma(1/2)-\Gamma'(1/2)^2}{\Gamma(1/2)^2}\tag{9}\\ &=2\sum_{k=0}^\infty\frac1{(k+1/2)^2}\tag{10}\\ &=8\sum_{k=0}^\infty\frac1{(2k+1)^2}\tag{11}\\ &=8\left(\sum_{k=1}^\infty\frac1{k^2}-\sum_{k=1}^\infty\frac1{4k^2}\right) \tag{12}\\[6pt] &=6\,\zeta(2)\tag{13}\\[14pt] &=\pi^2\tag{14} \end{align} Explanation:
$\:\ (4)$: apply $(3)$
$\:\ (5)$: substitute $x\mapsto x+1$
$\:\ (6)$: $\frac{\mathrm{d}}{\mathrm{d}\beta}(1+x)^{-\beta}=-\log(1+x)(1+x)^{-\beta}$
$\:\ (7)$: use the Beta function
$\:\ (8)$: take derivative in $\beta$ and evaluate $\beta=1/2$
$\:\ (9)$: L'Hospital
$(10)$: apply $(2)$
$(11)$: multiply by $4/4$
$(12)$: sum over the odd indices is the sum over all minus the sum over the evens
$(13)$: $8(\zeta(2)-\frac14\zeta(2))=6\zeta(2)$
$(14)$: $6\,\zeta(2)=\pi^2$


$\ds{I\equiv\int_{0}^{\infty}{\ln\pars{x} \over \pars{x - 1}\root{x}}\,\dd x: \ {\large ?}}$.

\begin{align} I&\equiv\ \overbrace{\int_{0}^{\infty}{\ln\pars{x} \over \pars{x - 1}\root{x}}\,\dd x} ^{\ds{\color{#c00000}{x\ \mapsto\ x^{2}}}}\ =\ \int_{0}^{\infty}{\ln\pars{x^{2}} \over \pars{x^{2} - 1}x}\,2x\,\dd x =-4\int_{0}^{\infty}{\ln\pars{x} \over 1 - x^{2}}\,\dd x \\[5mm]&=-4\int_{0}^{1}{\ln\pars{x} \over 1 - x^{2}}\,\dd x -4\int_{1}^{0}{\ln\pars{1/x} \over 1 - x^{-2}}\,\pars{-\,{\dd x \over x^{2}}} =-8\int_{0}^{1}{\ln\pars{x} \over 1 - x^{2}}\,\dd x \\[5mm]&=-4\ \overbrace{\int_{0}^{1}{\ln\pars{x} \over 1 - x}\,\dd x} ^{\ds{\color{#c00000}{x\ \mapsto\ 1 - x}}}\ -\ 4\ \overbrace{\int_{0}^{1}{\ln\pars{x} \over 1 + x}\,\dd x} ^{\ds{\color{#c00000}{x\ \mapsto\ -x}}}\ =\ -4\int_{0}^{1}{\ln\pars{1 - x} \over x}\,\dd x +4\int_{0}^{-1}{\ln\pars{-x} \over 1 - x}\,\dd x \\[5mm]&=-4\int_{0}^{1}{\ln\pars{1 - x} \over x}\,\dd x +4\braces{\overbrace{\left.\vphantom{\LARGE A}% -\ln\pars{1 - x}\ln\pars{-x}\right\vert_{0}^{-1}}^{\ds{=\ \color{#c00000}{0}}}\ +\ \int_{0}^{-1}{\ln\pars{1 - x} \over x}\,\dd x} \\[5mm]&=4\int_{-1}^{1}\bracks{-\,{\ln\pars{1 - x} \over x}}\,\dd x =4\int_{-1}^{1}{\rm Li}_{2}'\pars{x}\,\dd x =4\bracks{% \underbrace{{\rm Li}_{2}\pars{1}}_{\ds{\color{#c00000}{\pi^{2} \over 6}}}\ -\ \underbrace{{\rm Li}_{2}\pars{-1}}_{\ds{\color{#c00000}{-\,{\pi^{2} \over 12}}}}} =4\pars{\pi^{2} \over 4} \\[5mm]&=\color{#66f}{\Large \pi^{2}} \end{align}

It's much easier to use a quarter circle contour (easy enough to do the problem correctly in your head), because we can then use that $$\int_0^{\infty}\frac{\log(x)}{1+x^2}dx = 0$$

which is easy to see by splitting up this integral from zero to 1 and from 1 to infinity and then substituting $x = 1/t$ in the latter part.

Since the contour integral equals zero by Cauchy's theorem, and the integral along the quarter circle tends to zero, this means that the sum of the desired integral equals $2\pi$ times the integral of $1/(x^2+1)$ from zero to infinity which equals to $\pi^2$.

I claim that with these corrections my approach is correct.

1. Instead of (4), I am integrating over the contour

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

where $C_1$ is semi-circle around $-1$, $C_0$ is semi-circle around $0$ and $C_2$ is the large semi-circle. There are no poles inside the contour.

1. I choose the branch cut for logarithm $−iy,0≤y≤∞$.

2. $\int_{C_0}=\int_{C_2}=0$ due to estimation lemma. Alternatively,

$$\lim_{r\to0} \int_{C_0} \frac{\log z}{(z^2-1)}dz =\lim_{r\to0} \int_{C_1} \frac{\log (re^{i\phi}) \cdot ire^{i\phi} d\phi}{r^2e^{2i\phi}-1} \sim r\log r \sim 0$$

which can be shown by using L'Hôpital.

1. For $C_1: z=-1+r e^{i\phi}, \pi \ge \phi \ge 0$,

$$\lim_{r\to0} \int_{C_1} \frac{\log z}{(z^2-1)}dz =\lim_{r\to0} \int_{C_1} \frac{\log (-1+re^{i\phi} \cdot ire^{i\phi} d\phi}{(-1+re^{i\phi})^2-1} =\\ \lim_{r\to0} \int_{C_1} \frac{\log (-1+re^{i\phi}) i d\phi}{-2+re^{i\phi}} = \int_{C_1} \frac{\pi}{2} = \frac{\phi\pi}{2} \biggr|_\pi^0 = -\frac{\pi^2}{2}$$

1. So, from (6) in the limit $r\to0, R\to\infty$ we have

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

and from (1)-(3)

$$I=\pi^2$$

• Isn't your contour along the x axis running right through the pole at $z = 1$? Also, if you enclose pole which is what I think you want to do, you will have $$\sum_i\int_{C_i} = \text{Res}(f;1)$$ where the $$2\pi i\lim_{t\to 1}(t-1)\frac{\ln|t| + i\cdot 0}{t^2 -1} =0$$. Then you will have $$\int f(x) =\sum_i\int_{C_i} = -\pi^2 = 0$$ add $\pi^2$ over and you have original integral is desired result. – dustin Nov 21 '14 at 2:21
• @dustin I thought since 1 is a removable singularity, you can just define the function there as the limit $z\to 1$(which exists) and the singularity is removed. But, yes, the residue there is 0 anyway. – Minethlos Nov 21 '14 at 10:51
• Well done, congratulations! :) – tired Nov 21 '14 at 14:29