Prove using contour integration that $\int_0^\infty \frac{\log x}{x^3-1}\operatorname d\!x=\frac{4\pi^2}{27}$ Prove using contour integration that $\displaystyle \int_0^\infty \frac{\log x}{x^3-1}\operatorname d\!x=\frac{4\pi^2}{27}$

I am at a loss at how to start this problem and which contour to pick. I have been trying to get the sector with angle $2\pi/3$ to work with a bump around the pole at $e^{i2\pi/3}$ and the origin, but I am getting 5 or 6 different integrals and it is not really getting me anywhere.
Actually, we do need to worry about the pole at $x=1$ if we intend to use contour integration, for reasons that are a bit subtle.  I will demonstrate below.

The standard way to treat integrals of rational functions times logs over $[0,\infty)$ in complex analysis is to consider a keyhole contour, and an integral over that contour of the next higher power of log.  In this case, the integral is

$$\oint_C dz \frac{\log^2{z}}{z^3-1}$$

$C$, however, is a modified keyhole contour about the positive real axis of outer radius $R$ and inner radius $\epsilon$.  The modification lies on small semicircular bumps above and below $z=1$ of radius $\epsilon$, and we will consider the limits as $\epsilon \to 0$ and $R\to\infty$.

Let's evaluate this integral over the contours.  There are $8$ pieces to evaluate, as follows:

$$\int_{\epsilon}^{1-\epsilon} dx \frac{\log^2{x}}{x^3-1} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (1+\epsilon e^{i \phi}\right )}}{(1+\epsilon e^{i \phi})^3-1} \\ + \int_{1+\epsilon}^R   dx \frac{\log^2{x}}{x^3-1} + i R \int_0^{2 \pi} d\theta \, e^{i \theta} \frac{\log^2{\left (R e^{i \theta}\right )}}{R^3 e^{i 3 \theta}-1} \\ + \int_R^{1+\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^3-1} + i \epsilon \int_{2 \pi}^{\pi} d\phi \, e^{i \phi} \frac{(\log{\left (1+\epsilon e^{i \phi}\right )}+i 2 \pi)^2}{(1+\epsilon e^{i \phi})^3-1} \\ + \int_{1-\epsilon}^{\epsilon} dx \frac{(\log{x}+i 2 \pi)^2}{x^3-1} + i \epsilon \int_{2 \pi}^0 d\phi \, e^{i \phi} \frac{\log^2{\left (\epsilon e^{i \phi}\right )}}{\epsilon^3 e^{i 3 \phi}-1} $$ 

(To see this, draw the contour out, including the bumps about $z=1$.)

As $R \to \infty$, the fourth integral vanishes as $\log^2{R}/R^2$.  As $\epsilon \to 0$, the second integral vanishes as it is $O(\epsilon^3)$, while the eighth integral vanishes as $\epsilon \log^2{\epsilon}$.  This leaves the first, third, fifth, sixth and seventh integrals, which in the above limits, become

$$PV \int_0^{\infty} dx \frac{\log^2{x} - (\log{x}+i 2 \pi)^2}{x^3-1} + i \frac{4 \pi^3}{3}$$

EDIT

It should be appreciated that, in the fifth, sixth, and seventh integrals, the $i 2 \pi $ factor appears because, on the lower branch of the real axis, we write $z=x \, e^{i 2 \pi}$.  In the sixth integral, in fact, $z = e^{i 2 \pi} + \epsilon \, e^{i \phi + 2 \pi}$.

END EDIT

The $PV$ denotes the Cauchy principal value of the integral.  As it stands, the integral does not actually converge.  Nevertheless, we are not actually considering the integral straight through the pole at $z=1$, but a very small detour around the pole.  Thus, in the limit, we get the Cauchy PV.  A little rearranging cancels the $\log^2$ term, and we now have two integrals to evaluate:

$$-i 4 \pi \int_0^{\infty} dx \frac{\log{x}}{x^3-1} + 4 \pi^2 PV \int_0^{\infty} \frac{dx}{x^3-1} + i \frac{4 \pi^3}{3}$$

Note we could remove the $PV$ on the first integral because the pole is a removable singularity.

The contour integral is equal to $i 2 \pi$ times the sum of the residues at the poles. The poles here are at $z=e^{i 2 \pi/3}$ and $z=e^{i 4 \pi/3}$. Note that the pole at $z=1$ is not inside the contour $C$ because of the detour around that "pole".  It should be appreciated that the poles must have their arguments between $[0,2 \pi]$ because of the way we defined $C$.

In any case, we now have that the above 1D integrals over the positive real line are equal to

$$i 2 \pi \left [\frac{-4 \pi^2/9}{3 e^{i 4 \pi/3}} + \frac{-16 \pi^2/9}{3 e^{i 8 \pi/3}}  \right ] = -\frac{4 \pi ^3}{3 \sqrt{3}}+i \frac{20 \pi ^3}{27} $$

Equating real and imaginary parts, we find that

$$ \int_0^{\infty} dx \frac{\log{x}}{x^3-1} = \frac{4 \pi^2}{27} $$

$$ PV \int_0^{\infty} \frac{dx}{x^3-1} = -\frac{\pi}{3 \sqrt{3}} $$
$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\large\tt Alternative:\ A\  "\Re eal"\ Integration,}$
\begin{align}
&amp;\bbox[5px,#ffd]{\int_{0}^{\infty}{\ln\pars{x} \over x^{3} - 1}
\,\dd x} =
\left.\bracks{\nu^{1}}\int_{0}^{\infty}{1 - x^{\nu} \over
1 - x^{3}}\,\dd x\,
\right\vert_{\,\Re\pars{\nu}\ \in\ \pars{-1,2}}
\\[5mm] = &amp;\
{1 \over 3}\bracks{\nu^{1}}
\int_{0}^{\infty}{x^{-2/3} - x^{\nu/3 - 2/3}\,\,\, \over 1 - x}
\,\dd x
\\[5mm] = &amp;\
{1 \over 3}\bracks{\nu^{1}}
\int_{0}^{\infty}{x^{\color{red}{1/3} - 1}\ -\
x^{\color{red}{\nu/3 + 1/3} - 1}\,\,\, \over 1 - x}\,\dd x
\end{align}
However,$\ds{{1 \over 1 - x} = \sum_{k = 0}^{\infty}
\color{red}{\Gamma\pars{1 + k}\expo{\ic\pi k}}\,
{\pars{-x}^{k} \over k!}}$
Then,
\begin{align}
&amp;\bbox[5px,#ffd]{\int_{0}^{\infty}{\ln\pars{x} \over x^{3} - 1}
\,\dd x}
\\ = &amp;\
-\,{1 \over 3}\bracks{\nu^{1}}
\\ &amp;
\overbrace{%
\Gamma\pars{\!%
\color{red}{{\nu \over 3} + {1 \over 3}}\!}
\!\Gamma\pars{\!1 -
\bracks{\color{red}{{\nu \over 3} + {1 \over 3}}}\!}
\!\exp\pars{\!%
-\ic\pi\bracks{\color{red}{{\nu \over 3} + {1 \over 3}}}\!}}
^{\substack{\ds{Ramanujan's} \\[0.5mm] \ds{Master}\\[0.5mm] \ds{Theorem}}}
\\[5mm] = &amp;\
-\,{1 \over 3}\bracks{\nu^{1}}
\bracks{{\pi \over \sin\pars{\pi\nu/3 + \pi/3}}\,
\exp\pars{-\ic\pi\bracks{{\nu \over 3} + {1 \over 3}}}}
\\[5mm] = &amp;\
-\,{\pi \over 3}\bracks{\nu^{1}}
\cot\pars{{\pi\nu \over 3} + {\pi \over 3}} =
\left.-\,{\pi \over 3}
\totald{\bracks{\cot\pars{{\pi\nu \over 3} + {\pi \over 3}}}}{\nu}\,\right\vert_{\ \nu\ =\ 0}
\\[5mm] = &amp;\
-\,{\pi \over 3}\bracks{-\,{\pi \over 3}
\csc^{2}\pars{\pi \over 3}} =
\bbx{4\pi^{2} \over 27} \approx 1.4622 \\ &amp;
\end{align}