17

I have the following integral to compute: $$ \int_{0}^{\infty}\frac{\log x}{1 + x^2}\text{d}x.$$ Following is my attempt:
$$ \int_{0}^{\infty}\frac{\log x}{1 + x^2}\text{d}x = \int_{0}^{1}\frac{\log x}{1 + x^2}\text{d}x + \int_{1}^{\infty}\frac{\log x}{1 + x^2}\text{d}x .$$ But using the substitution $x=1/u$, we get: $$\int_{0}^{1}\frac{\log x}{1 + x^2}\text{d}x= -\int_{\infty}^{1}\frac{1}{u^2}\cdot\frac{\log (1/u)}{1 + (1/u)^2}\text{d}u = -\int_{1}^{\infty}\frac{\log u}{1 + u^2}\text{d}u.$$ Hence $$ \int_{0}^{\infty}\frac{\log x}{1 + x^2}\text{d}x = -\int_{1}^{\infty}\frac{\log u}{1 + u^2}\text{d}u + \int_{1}^{\infty}\frac{\log x}{1 + x^2}\text{d}x = 0$$ since $u$ is a dummy variable.

What I'd like to do now is to compute the same integral using the method of residues(I have no experience with it) and I'd gladly appreciate any kind of help.
Thanks.

Kuku
  • 935
  • 1
    I believe you meant to have $\frac{1}{u^2}$ inside the middle integral in line 3? – rcollyer Oct 29 '11 at 19:50
  • 5
    Even as an enthusiast of residue calculations I wouldn't change a word of your solution. But if you want some problems and methods to cut your teeth on you can look at Markushevich's "Theory of functions of a complex variable" (the second volume in particular). Then there is Krantz's book, which contains a lot of exercises, but really any book on complex analysis (really, any one at all!) will have a chapter on these things. – Gunnar Þór Magnússon Oct 29 '11 at 21:47
  • @Gunnar: Thanks, but could you show me how to use the method to evaluate the above integral? – Kuku Oct 29 '11 at 22:02

3 Answers3

7

Define a branch cut for $\log$ going from the origin to the lower half plane, and restrict to the branch where $\log(z) = \ln|z|$ for $z>0$ and $\log(z) = \ln|z| + \pi i$ for $z <0$. Then we have:

$$ \int_{-\infty}^\infty\frac{\log(z)}{1+z^2}dz=2\int_{0}^\infty\frac{\log(z)}{1+z^2}dz+\pi i\int_{0}^\infty\frac{1}{1+z^2}dz $$

We can evaluate the left hand size by closing the contour with a great semicircle in the upper half plane. Since $f(z)|z|\rightarrow 0$ as $|z| \rightarrow 0$, we can ignore the contribution from the singularity at the origin. Likewise since $f(z)|z|\rightarrow 0$ as $|z| \rightarrow +\infty$ we can ignore the contribution from the great semicircle in the upper half plane. The function has a one singularity in the upper half plane, at $z=i$. So by the residue theorem:

$$ \begin{equation} \int_{-\infty}^\infty\frac{\log(z)}{1+z^2}dz= 2 \pi i \ \mbox{Res}\left[ \frac{\log(z)}{1+z^2}; z = i \right]= 2 \pi i \left[ \frac{\log(z)}{i+z}\right]_{z=i}= 2 \pi i \frac{\pi i /2}{i+i} = \frac{\pi^2 i}{2} \end{equation} $$ And since $\int_{0}^\infty\frac{1}{1+z^2}=\pi/2$, the original equation becomes:

$$ \frac{\pi^2 i}{2}=2\int_{0}^\infty\frac{\log(z)}{1+z^2}dz+\pi i\left(\frac{\pi}{2}\right) $$ $$ \Rightarrow \int_{0}^\infty\frac{\log(z)}{1+z^2}dz=0 $$

p.s.
  • 6,401
4

Residue Approach

We will compute $$\renewcommand{\Re}{\operatorname{Re}}\newcommand{\Res}{\operatorname*{Res}} \int_\gamma\frac{\log(z)^2}{1+z^2}\,\mathrm{d}z\tag1 $$ where $\gamma$ is the keyhole contour $$ [ri,R+ri]\cup\sqrt{R^2+r^2}e^{i\left[\tan^{-1}\left(\frac rR\right),2\pi-\tan^{-1}\left(\frac rR\right)\right]}\cup[R-ri,-ri]\cup re^{i\left[\frac{3\pi}2,\frac\pi2\right]}\tag2 $$ where $r\to0$ and $R\to\infty$. We will put the branch cut along the positive real axis. On the the upper side of the real axis, $\log(z)$ is $\log(\Re(z))$. On the lower side, it is $\log(\Re(z))+2\pi i$.

The integral counter-clockwise along $\gamma$ is $$ \begin{align} \int_\gamma\frac{\log(z)^2}{1+z^2}\,\mathrm{d}z &=\int_0^\infty\frac{\log(x)^2-(\log(x)+2\pi i)^2}{1+x^2}\,\mathrm{d}x\\ &=\int_0^\infty\frac{4\pi^2-4\pi i\log(x)}{1+x^2}\,\mathrm{d}x\\ &=2\pi^3-4\pi i\int_0^\infty\frac{\log(x)}{1+x^2}\,\mathrm{d}x\tag3 \end{align} $$ The integral is also equal to $2\pi i$ times the sum of the residues of $\frac{\log(z)^2}{1+z^2}$: $$ \Res_{z=i}\left(\frac{\log(z)^2}{1+z^2}\right)=\frac{\pi^2i}8\tag{4a} $$ $$ \Res_{z=-i}\left(\frac{\log(z)^2}{1+z^2}\right)=-\frac{9\pi^2i}8\tag{4b} $$ Thus, the integral is $2\pi i\left(\frac{\pi^2i}8-\frac{9\pi^2i}8\right)=2\pi^3$. This, in conjunction with $(3)$ yields $$ \int_0^\infty\frac{\log(x)}{1+x^2}\,\mathrm{d}x=0\tag5 $$


Non-Residue Approach

To get this directly, without contour integration or breaking up the interval of integration, substitute $x\mapsto\frac{1}{x}$: $$ \int_0^\infty\frac{\log(x)}{1+x^2}\mathrm{d}x=-\int_0^\infty\frac{\log(x)}{1+x^2}\mathrm{d}x\tag6 $$ and therefore the integral is $0$.

robjohn
  • 345,667
  • 3
    he found it already! He wants to use the theory of residues to complete it. – Gardel Nov 03 '11 at 19:20
  • I'm sorry it took me over $7$ years to add the residue approach. This question was recently brought back to my attention and so I added a residue approach. – robjohn Mar 24 '19 at 02:19
  • My original answer was simply a less complicated application of the substitution $z\mapsto\frac1z$. – robjohn Mar 24 '19 at 02:27
2

In the book 'COMPLEX VARIABLES Introductions and Applications' page 247-248 Example 4.3.5, contains a complete answer to your question. He begins by evaluating $I=\int_{0}^{\infty}\frac{\log^{2}(x)}{1+x^2}dx$ and after a few steps, arrive at the following expression $2\int_{0}^{\infty}\frac{\log^{2}(x)}{1+x^{2}}dx +2\pi i\int_{0}^{\infty}\frac{\log(x)}{1+x^{2}}dx=\frac{\pi^3}{4}$. So $$\int_{0}^{\infty}\frac{\log(x)}{1+x^{2}}=0.$$ I suggest reading! Any questions post to us.

Gardel
  • 1,058