This question already has an answer here:

I'm asked to find:

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


Considering $$ \oint \frac{\ln(z^2+1)}{(z+i)(z-i)} dz $$

So first I find the branch points of the function.

This function has a simple pole at $z=i$ and an essential singularity at $z=-i$.

Using this contour:

enter image description here

By residue theorem,

$$\int_\gamma + \int_AB + \int_BC = 2\pi i \times \text{Residue} $$

$$ \text{Residue} = \frac{\ln(2i)}{2i} = \frac{\pi}{4} - \frac{i}{2}\ln(2) $$

Taking the semi-circle to infinity, $\int_\gamma \rightarrow 0$ by Jordan's Lemma.

$$\int_{-\infty}^0 \frac{\ln(-|x| + i)}{1+x^2} dx + \int_0^{\infty} \frac{\ln(x+i)}{1+x^2} dx = 2\pi i \left[ \frac{\pi}{4} - \frac{i}{2}\ln(2) \right] $$

$$ \int_{-\infty}^0 \frac{\ln (i - |x|) + i\pi}{1+x^2} dx + \int_0^{\infty} \frac{\ln(x+i)}{1+x^2} dx = 2\pi i \left[ \frac{\pi}{4} - \frac{i}{2}\ln(2) \right] $$

$$ \int_{\infty}^0 \frac{\ln (i - x) + i\pi}{1+x^2} dx + \int_0^{\infty} \frac{\ln(x+i)}{1+x^2} dx = 2\pi i \left[ \frac{\pi}{4} - \frac{i}{2}\ln(2) \right] $$

I have a hunch that the first integral must become $+\int_0^{\infty}$ for it to combine with the second integral to give $\int_0^\infty \frac{\ln(1+x^2)}{1+x^2}\,dx$ then we take the real part on the right. But I can't seem to show this..


marked as duplicate by Jack D'Aurizio, mrf, Davide Giraudo, user61527, Rick Decker Jun 10 '14 at 23:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Your function has an essential singularity at $i$ and $-i$. $\endgroup$ – user98602 Jun 10 '14 at 20:01
  • 1
    $\begingroup$ Please learn to type \ln. This not only prevents italicization of $\ln$, but also automatically provides proper spacing in expressions like $a\log b$. (I edited the question accordingly.) ${}\qquad{}$ $\endgroup$ – Michael Hardy Jun 10 '14 at 20:14
  • $\begingroup$ @MikeMiller Yeah, that's right. I'm more interested in evaluating the integral though $\endgroup$ – user44840 Jun 10 '14 at 20:20
  • $\begingroup$ Dude that was over a year ago...definitely not me. $\endgroup$ – user44840 Jun 10 '14 at 21:28
  • $\begingroup$ Thanks for the link provided, but I don't really understand the final solution presented (the one using contour integration). Is there a problem with the contour I have chosen? Why can't it simply be a semi-circle? $\int_{C_-} dz \frac{\log{(1+z^2)}}{1+z^2} = i\int_R^{\epsilon} dy \frac{\log{[-y (2+y)]}+ i 2 \pi}{-y (2+y)}$, why is there an additional factor of $2\pi i$? How did the user get this result: $-2 \pi \int_{\epsilon}^R \frac{dy}{y (2+y)} = -\pi \left [ \log{R} - \log{(2 + R)} - \log{\epsilon} + \log{(2 + \epsilon)}\right]$? $\endgroup$ – user44840 Jun 10 '14 at 21:50

$$\begin{eqnarray*}I=\int_{-\infty}^{+\infty}\frac{\log(1+x^2)}{1+x^2}\,dx &=& 2\int_{0}^{+\infty}\frac{\log(\cosh u)}{\cosh u}du=2\int_{1}^{+\infty}\frac{\log y}{y\sqrt{y^2-1}}dx\\&=&-2\int_{0}^{1}\frac{\log z}{\sqrt{1-z^2}}dz = -2\int_{0}^{\pi/2}\log\sin\theta\,d\theta\end{eqnarray*}$$ is a well-known integral, also treated here: Evaluating $\int_0^{\infty}\frac{\ln(x^2+1)}{x^2+1}dx$.

  • $\begingroup$ That is interesting, but I'm supposed to use contour integral methods. I feel like I'm really close to the answer. If i simply "cheat" by saying the first integral (real part) is equal to the second, I get the answer of $2\pi ln 2$. So now I think the most crucial thing is how to show the first integral (real part) is equal to the second. $\endgroup$ – user44840 Jun 10 '14 at 21:32
  • $\begingroup$ Have a look at Ron Gordon's answer in the original question. $\endgroup$ – Jack D'Aurizio Jun 10 '14 at 22:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.