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.
 A: 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}} $$
A: The easiest and certainly most general way is to compute $$PV\int_0^{\infty} dx \frac{x^a}{1-x^b},$$ and then take the derivative w.r.t. $a$ of the result. To do the first integral, use a circular sector ('pizza slice contour').
A: This isn't quite complex analytic, but first denote your as $$I=\int_{0}^{\infty} \frac{\ln(x)}{x^3-1} dx.$$
Consider the double integral:
$$J=\int_{0}^{\infty} \int_{0}^{\infty}  \frac{x}{(x^2+y^3)(1+x^2)}dydx.$$
We intend to evaluate $J$ and relate $J$ to $I.$
To evaluate, $J$ we integrate with respect to $y.$ You can proceed in two ways. The long way is to integrate by partial fractions, but the short way is to let $y=ux^\frac{2}{3}$ so that $dy=x^\frac{2}{3} du.$ Then we get:
$$J=\int_{0}^{\infty} \int_{0}^{\infty}  \frac{x^\frac{5}{3}}{(x^2+x^2u^3)(1+x^2)}dudx=\int_{0}^{\infty} \int_{0}^{\infty}  \frac{x^\frac{-1}{3}}{(1+u^3)(1+x^2)}dudx.$$ Using the nice formula $$\int_{0}^{\infty} \frac{t^m}{1+t^n} dt=\frac{\pi}{n}\csc\left(\frac{\pi(m+1)}{n}\right),$$
we get $$J=\frac{2\pi^2}{9}.$$
Now use Fubini's Theorem on $J$ as such:
$$J=\int_{0}^{\infty} \int_{0}^{\infty}  \frac{x}{(x^2+y^3)(1+x^2)}dxdy.$$
We will need partial fractions to integrate with respect to $x.$ Omitting the details of this computation, $$\frac{x}{(x^2+y^3)(1+x^2)}=\frac{1}{y^3-1} \left(\frac{x}{x^2+1}-\frac{x}{x^2+y^3}\right).$$ Now integrating with respect to $x$, and plugging in the endpoints, we get 
$$J=\int_{0}^{\infty} \frac{1}{y^3-1}\lim_{x\rightarrow \infty} \left(\frac{\ln(x^2+1)}{2}-\frac{\ln(x^2+y^3)}{2}\right)-\frac{1}{y^3-1}\lim_{x\rightarrow 0} \left(\frac{\ln(x^2+1)}{2}-\frac{\ln(x^2+y^3)}{2}\right)dy.$$
We get $$J=\int_{0}^{\infty} \frac{\ln(y^3)}{2(y^3-1)}dy=\int_{0}^{\infty} \frac{3\ln(y)}{2(y^3-1)}dy=\frac{3}{2}I.$$
Thus we have $$I=\frac{2}{3}J=\frac{2}{3}\left(\frac{2\pi^2}{9}\right)=\frac{4\pi^2}{27}.$$
Addendum
Consider $$I=\int_{0}^{\infty} \frac{\ln(x)}{x^3-1} dx.$$ 
Split the integral into two parts: 
$$\int_{0}^{\infty} \frac{\ln(x)}{x^3-1} dx = \int_{0}^{1} \frac{\ln(x)}{x^3-1} dx+ \int_{1}^{\infty} \frac{\ln(x)}{x^3-1} dx.$$ We can convert $\frac{\ln(x)}{x^3-1}$ into a geometric series as such (assuming $0<x<1.$) $$ \frac{\ln(x)}{x^3-1}=-\sum_{n=0}^{\infty}\ln(x)x^{3n}.$$ If we do integration by parts, $$\int_{0}^{1} \frac{\ln(x)}{x^3-1} dx= \int_{0}^{1} -\sum_{n=0}^{\infty}\ln(x)x^{3n}dx=\sum_{n=0}^{\infty} \frac{1}{(3n+1)^2}.$$ For,$$\int_{1}^{\infty} \frac{\ln(x)}{x^3-1} dx,$$ perform a $u$ substitution $x=\frac{1}{u}, dx=\frac{-1}{u^2} du,$ and convert transformed integrand into a geometric series.  You will see: 
$$\int_{1}^{\infty} \frac{\ln(x)}{x^3-1} dx=\sum_{n=0}^{\infty} \frac{1}{(3n+2)^2}=\sum_{n=-\infty}^{-1} \frac{1}{(3n+1)^2},$$ and the latter equality can be seen by simply writing out the terms of each summation.  Now, add the two computed series together and see:
$$\sum_{n=-\infty}^{\infty} \frac{1}{(3n+1)^2}= \frac{4 \pi^2}{27.}$$
A: $\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}
&\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] = &\
{1 \over 3}\bracks{\nu^{1}}
\int_{0}^{\infty}{x^{-2/3} - x^{\nu/3 - 2/3}\,\,\, \over 1 - x}
\,\dd x
\\[5mm] = &\
{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}
&\bbox[5px,#ffd]{\int_{0}^{\infty}{\ln\pars{x} \over x^{3} - 1}
\,\dd x}
\\ = &\
-\,{1 \over 3}\bracks{\nu^{1}}
\\ &
\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] = &\
-\,{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] = &\
-\,{\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] = &\
-\,{\pi \over 3}\bracks{-\,{\pi \over 3}
\csc^{2}\pars{\pi \over 3}} =
\bbx{4\pi^{2} \over 27} \approx 1.4622 \\ &
\end{align}
