Complex Analysis – Integration of ln Around a Keyhole Contour

analysiscomplex-analysiscontour-integration

I want to evaluate the following integral:
$$\int_{0}^{\infty}\frac{\ln^2 x}{x^2-x+1}{\rm d}x$$

I use the following contour in order to integrate.
enter image description here

I considered the function $\displaystyle f(z)=\frac{\ln^3 z}{z^2-z+1}$.
The poles of the function are $\displaystyle z_1=\frac{1+i\sqrt{3}}{2}, \; z_2=\frac{1-i\sqrt{3}}{2}$ and these are simple poles. I evaluated the residues $\displaystyle \mathfrak{Res}(z_1)=\mathfrak{Res}(z_2)=-\frac{i\pi^2}{9\sqrt{3}}$.

If we declare $\gamma$ the entire contour , we have that:
$$\oint_{\gamma}f(z)\,dz=2\pi i \sum res=2\pi i \left ( -\frac{2i\pi^2}{9\sqrt{3}} \right )=\frac{4\pi^3}{9\sqrt{3}}$$

I splitted the contour apart and I got:
$$\oint_{\gamma}f(z)\,dz=\int_{C_r}+\int_{S_1}+\int_{C_\epsilon }+\int_{S_2}$$

where $S_1$ is the segment from $R$ to $\epsilon$ and $S_2$ is the segment from $\epsilon$ to $R$. I proved that the other two line integrals vanish when $R\rightarrow +\infty, \epsilon \rightarrow 0$ respectively.

And this is where I get stuck. Well, letting $R \rightarrow +\infty$ this gives me that:
$$\int_{\gamma}f(z)\,dz=\int_{\infty}^{0}f(z)\,dz+\int_{0}^{\infty}f(z)\,dz=\int_{0}^{\infty}-\int_{0}^{\infty}$$

I set $z=-x-i\epsilon$ at the second one and at the first one $z=-x+i\epsilon$ but I cannot seem to finish up the problem and get the correct result.

Best Answer

On $S_2$ you get $$ \int_0^\infty \frac{\ln^3 x}{x^2-x+1}\,dx $$ and on $S_1$ $$ -\int_0^\infty \frac{(\ln x + 2\pi i)^3}{x^2-x+1}\,dx. $$ Adding the two you get $$ \int_0^\infty \frac{-6\pi i\ln^2 x + 4\pi^2\ln x + 8\pi^3 i}{x^2-x+1}\,dx. $$ Take the imaginary part, and all you have to do to finish things off is to compute $$ \int_0^\infty \frac{1}{x^2-x+1}\,dx $$ either with freshman calculus techniques or using residues if you prefer.