# Integrating $\int_{0}^{\infty} \frac{(\log x)^2}{x^2+x+1}$ using residue theorem [duplicate]

Just out of curiosity, how does one integrate something like this using residue theory?

$$\int_{0}^{\infty}\frac{(\log x)^2}{x^2+x+1} dx$$

According to Wolfram Alpha, the answer is $\dfrac{16\pi^3}{81\sqrt{3}}$.

I have seen similar integrals before, like here and here, and they all require seem some sort of ingenuity. I am sure local Ramanujans will come to rescue soon. :)

• By change $x=e^t$ the integral under consideration is reduced to $$\int_{-\infty}^\infty \frac {t^2e^t\,dt}{e^{2t}+e^t+1}.$$ Making use of residues, the one can be expressed as a series. I see only sporting interest in such things. BTW, this is 4.261.3 in Gradshtein and Ryzhik. They refer to an old book published in 1867. – user64494 Aug 11 '13 at 5:46
• @user64494: Thanks! After reading your comment, I found this great website: here. Amazing resource. Indeed, here is the problem above. – Prism Aug 11 '13 at 5:52
• Integrate the function $$f(z)=\frac {\log^3 (z)}{z^2+z+1}$$ around a key-hole conotour indented around the origin with the branch cut along the positive x-axis. – Zaid Alyafeai Aug 11 '13 at 15:31
• – Mhenni Benghorbal Aug 11 '13 at 20:14
• By the way, I provided a general technique for solving this kind of integrals. See my answer. – Mhenni Benghorbal Aug 11 '13 at 20:44

Hint ;

Define the following function $$f(z)=\frac {\log^3 (z)}{z^2+z+1}$$ on a key-hole contour with branch cut on the positive real axis . The function has poles $z=e^{\frac{2\pi}{3}i},e^{\frac{4\pi}{3}i}$ .Since the function is analytic in and on the contour with the poles inside the contour we can use the residue theorem

$$\int^{\infty}_0 f(x)\, dx -\int^{\infty}_0 \frac{\left( \log(x)+ 2 \pi i \right)^3}{x^2+x+1}\, dx= 2\pi i \text{Res}\,\left( f(z) ; e^{\frac{2\pi}{3}i},e^{\frac{4\pi}{3}i}\right)$$

Note:We can easily prove that the integration around the small and big circles approaches $0$.

Note: the third power will cancel and the first power is equal to $0$.

See: Glasser, Amer.Math.Monthly Vol.71,p.75 (1964)

• Very good find! – Prism Aug 12 '13 at 0:29