Value of this definite integral $\int_{0}^{\infty} \frac{ \ln(x)}{x^2+2x+4} dx $

Solution 1:

This CAN be done with real variables and no, you do not need to differentiate with respect to a parameter. Here's how: $$I=\int_{0}^{\infty} \frac{\ln(x)}{x^2+2x+4} dx $$ $$I=\int_{0}^{\infty} \frac{\ln(x)}{{(x+1)}^2+3}dx $$ $$I=\frac{1}{3} \int_{0}^{\infty} \frac{\ln(x)}{ ({ \frac{x+1}{\sqrt{3}} })^2 + 1} dx $$ Now, set $$\frac{x+1}{\sqrt{3}} = \tan(t)$$ Thus $t$ is between $\frac{\pi}{6}$ and $\frac{\pi}{2}$. We now have $$I=\frac{1}{\sqrt{3}} \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} \ln{ (\sqrt{3} \tan(t) - 1 )} dt $$ Now, use this property: $$\int_{a}^{b} f(x) dx = \int_{a}^{b} f(a+b-x) dx$$ So, we have: $$I= \frac{1}{\sqrt{3}} \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} \ln{ \left( \sqrt{3} \frac{ \sqrt{3} + \tan(t) }{\sqrt{3} \tan(t) - 1} - 1\right) }dt $$ On simplifying, $$I=\frac{1}{\sqrt{3}} \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} \ln{\left( \frac{4}{\sqrt{3} \tan(t) - 1}\right)} dt $$ Thus, $$I=\frac{1}{\sqrt{3}} \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} \ln{(4)} dt - I$$ $$I= \frac{\pi}{3 \sqrt{3} } \ln{2} $$ and we are done.

Solution 2:

As mentioned above, use a keyhole contour in the complex plane, which we'll call $C$. Here though you should consider the contour integral

$$\oint_C dx \frac{\log^2{z}}{z^2+2 z+4} $$

I will leave it to the reader to show that the integral vanishes over the circular portions of $C$; we are thus left with the contour integral equaling

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

Now, the integral on the right we need to know as well. We may evaluate that any way we wish, but let's stick to this formalism. This integral may be evaluated using the same contour and the residue theorem. Let

$$R_n = \sum_k \operatorname*{Res}_{z=z_k} \frac{\log^{n+1}{z}}{z^2+2 z+4}$$

for $n=0,1$. That is,

$$\oint_C dz \frac{\log^{n+1}{z}}{z^2+2 z+4} = i 2 \pi R_n$$

Then from the above, you may show that

$$\int_0^{\infty} dx\frac{\log{x}}{x^2+2 x+4} = i \pi R_0 - \frac12 R_1$$

Note that the poles of the integrands are at $z_1=2 e^{i 2 \pi/3}$ and $z_2 = 2 e^{i 4 \pi/3}$. Note that we must use these arguments because of how we defined the contour.

We mat deduce that

$$R_0 = \frac{\log{2}+i 2 \pi/3}{i 2 \sqrt{3}} + \frac{\log{2}+i 4 \pi/3}{-i 2 \sqrt{3}} = -\frac{\pi}{3 \sqrt{3}}$$

$$R_1 = \frac{(\log{2}+i 2 \pi/3)^2}{i 2 \sqrt{3}} + \frac{(\log{2}+i 4 \pi/3)^2}{-i 2 \sqrt{3}} = -\frac{2 \pi \log{2}}{3 \sqrt{3}} - i \frac{2 \pi^2}{3 \sqrt{3}}$$

Putting it all together, the imaginary pieces cancel and we get

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