Contour Integration – ln and Rational Function Using Contour Integration

contour-integration

I was playing around with $\displaystyle \int_{0}^{1}\frac{\ln^{2}(x)}{x^{2}-x+1}dx=\frac{1}{2}\int_{0}^{\infty}\frac{\ln^{2}(x)}{x^{2}-x+1}dx$ and managed to solve it using real methods via digamma and what not.

It evaluates to $\frac{10{\pi}^{3}\sqrt{3}}{243}$

But, how would one go about evaluating this using contour integration?.

The roots of $x^{2}-x+1=0$ are at $x=e^{\pm\frac{\pi i}{3}}$

Would a semi-annulus work or would a keyhole contour be better?.

For the semi-annulus contour, the only pole that would lie in it would be $e^{\frac{\pi i}{3}}$

Unless I made a mistake, The residue there is $ 2\pi i Res\left(z=e^{\frac{\pi i}{3}}\right)=\frac{-2{\pi}^{3}\sqrt{3}}{27}$

$\ln^{2}(z)$ has a discontinuity at $z=0$, so I think we can avoid it by using a semicircle around it of radius $\epsilon$. I don't know. I am probably going the wrong direction. My contour integration isn't the greatest anyway. At least with these types of problems. Would appreciate some input if anyone finds time. Thanks very much.

Best Answer

You should use a keyhole contour, but also consider the integral

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

Evaluating this contour integral, it will turn out (proof left to reader) that the integrals along the circular arcs out to infinity and down to zero near the origin vanish. That leaves the integrals up and back along the real line:

$$\oint_C dz \frac{\log^3{z}}{z^2-z+1} = \int_0^{\infty} dx \frac{\log^3{x}}{x^2-x+1} - \int_0^{\infty} dx \frac{(\log{x}+i 2 \pi)^3}{x^2-x+1} $$

Combine the expression on the right and get

$$\oint_C dz \frac{\log^3{z}}{z^2-z+1} = i \left [-6 \pi \int_0^{\infty} dx \frac{\log^2{x}}{x^2-x+1} + 8 \pi^3 \int_0^{\infty} dx \frac{1}{x^2-x+1}\right ] \\- 4 \pi^2 \int_0^{\infty} dx \frac{\log{x}}{x^2-x+1}$$

Now set this equal to $i 2 \pi$ times the sum of the residues at the poles. The poles are at $z = e^{i \pi/3}$ and $z=e^{i 5 \pi/3}$. Note that I am not saying that the latter pole is at $z=e^{-i \pi/3}$ because that would be inconsistent with the branch I chose in defining the argument of the values just below the real line to be $2 \pi$.

The residues are, at $z = e^{i \pi/3}$:

$$\frac{-i \pi^3/27}{2 e^{i \pi/3}-1}$$

and at $z=e^{i 5 \pi/3}$:

$$\frac{-i 125 \pi^3/27}{2 e^{i 5\pi/3}-1}$$

The contour integral is then $i 2 \pi$ times the sum of these residues:

$$\oint_C dz \frac{\log^3{z}}{z^2-z+1} = i 2 \pi \frac{124 \pi^3}{27 \sqrt{3}}$$

The real part is zero, which makes sense in light of the 1st line in your post. For the imaginary part, however, we have two integrals, one of which we want, the other of which is in our way and we have to determine. Fortunately, the evaluation follows exactly the same pattern as above, for an even simpler integral:

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

which, when analyzed as above, spawns

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

I leave it to the reader to verify this. The problem is then a simple one in algebra and arithmetic which I also leave to the reader. I get

$$\int_0^{\infty} dx \frac{\log^2{x}}{x^2-x+1} = \frac{20 \pi^3}{81 \sqrt{3}}$$

which implies that

$$\int_0^{1} dx \frac{\log^2{x}}{x^2-x+1} = \frac{10 \pi^3}{81 \sqrt{3}}$$

ADDENDUM

I realize that I didn't fully answer the OP's question. You do not want to use semicircular contours for integrals of the form

$$\int_0^{\infty} dx\: f(x)$$

when $f$ is not even. The reason for this is that the integral over the negative real line is not the same that the integral over the positive real line. For example, let's try again to attack the integral

$$\int_0^{\infty} dx \frac{1}{x^2-x+1}$$

in this manner. This is emphatically not the same as

$$\int_{-\infty}^{\infty} dx \frac{1}{x^2-x+1}$$

which is what would result from a semicircular contour. Such problems are not alleviated by avoiding branch points at the origin. In this case, the trick of using a keyhole contour on the integral

$$\oint_C dz \: f(z) \, \log{z}$$

works best, so long as you are careful about using a consistent branch of the log as I demonstrated above. In some cases, such as

$$\int_0^{\infty} \frac{dx}{x^3+1}$$

you can get away with a wedge contour instead of a keyhole. This is because the denominator is invariant upon rotation by $2 \pi/3$.

ADDENDUM II

I just realized that I solved a very similar problem here.