Complex Analysis – Calculate Integral Using Residue Theorem

analysiscomplex-analysisintegrationresidue-calculus

I want to verify the following result using the residue theorem:

$$\int_0^\infty \frac{\log(x)}{x^2+a^2}dx = \frac{\pi}{2a}\log a, \, a > 0.$$

Here are my ideas:

At first I might want to show that this function is in fact a well defined improper Riemann integral, but I didn't come up with any nice solution yet.

I want to integrate the function $f(z) := \frac{\log(z)}{z^2+a^2}$ along the contour $C:= \gamma_1 \cup \gamma_2 \cup \gamma_3 \cup \gamma_4$ constisting of to semicircles with center at 0 around the upper half plane and radius $R$ and $\epsilon$ (resp.) as well as the intervals $[-R, -\epsilon]$ and $[\epsilon, R]$.

For the complex logarithm, use the branch $\log z = \log|z| + i\theta, \theta \in [-\pi/2, 3\pi/2)$ so we don't get any problems on the real line (is this choice correct?).

Note that I have one pole in my contour, namely $z = ia$. The Residue theorem yields $$\int_C f(z) dz= 2\pi i \text{ Res}(f, ia) = 2\pi i\lim_{z\to ia}(z-ia) \frac{\log z}{(z-ia)(z+ia)} = 2\pi i\frac{\log(ia)}{2ia} = \pi \frac{\log(a)+ i\pi/2}{a}$$
Proceeding, we choose the following parametrizations:
$$\gamma_1 : [-R,0] \to \mathbb C, \quad t\mapsto -\frac{\epsilon t}{R} + (t-\epsilon) \\ \gamma_2 : [0, R] \to \mathbb C, \quad t\mapsto -\frac{\epsilon t}{R} + (\epsilon+t) \\ \gamma_3: [0, \pi]\to \mathbb C, \quad t\mapsto \epsilon e^{it} \\ \gamma_4:[0,\pi] \to \mathbb C, \quad t \mapsto Re^{it}$$
Now here's what I am unsure about. To show that the big and the small circle vanish as $R\to \infty$ and $\epsilon \to 0$ is not too hard, but how to deal with the other integrals?
Can I just say
$$\int_{\gamma_1} f(z)dz = \int_0^R \frac{\log(-\frac{\epsilon}{R}t+\epsilon+t)}{(-\frac{\epsilon}{R}t + \epsilon + t)^2 + a^2}(\frac{\epsilon}{R}+1)dt \xrightarrow{\epsilon \to 0} \int_0^R \frac{\log t}{t^2 + a^2}dt$$
or what kind of reasoning should be used to interchange limit and integral?Also, I then finally I get $$\int_0^\infty \frac{\log(x)}{x^2+a^2}dx = \pi \frac{\log a + i\frac{\pi}{2}}{2a}$$
almost what I want, but where does $i\pi /2$ come from?

Thanks in advance!

Best Answer

For any $a>0$, through the substitution $x=a e^t$ we have

$$ I(a) = \int_{0}^{+\infty}\frac{\log x}{a^2+x^2}\,dx = \frac{1}{2a}\int_{-\infty}^{+\infty}\frac{\log a+ t}{\cosh t}\,dt \tag{1}$$ and $\frac{t}{\cosh t}$ is an odd integrable function over $\mathbb{R}$. It follows that $$ I(a) = \frac{\log a}{2a}\int_{-\infty}^{+\infty}\frac{dt}{\cosh t}=\frac{\log a}{2a}\left[2\arctan\tanh\frac{t}{2}\right]^{+\infty}_{-\infty}=\color{red}{\frac{\pi\log a}{2a}} \tag{2} $$ without even resorting to the residue theorem, but just exploiting symmetry.

Related Question