8

$$\int_{\Bbb R}\frac{\ln(1+x^2)}{1+x^2}dx$$ Here is my attempt:

Consider $f(z):=\frac{z^2}{(1+z^2)(1+z^2y)},y\in(0,1)$ & $\Gamma : \gamma\;\bigcup\;(-R,R)$ is the anti-clockwise and semi-circular contour in the upper half of the $\Bbb C$-plane. $$\implies \oint_\Gamma\frac{z^2}{(1+z^2)(1+z^2y)}dz=\int_\gamma\frac{z^2}{(1+z^2)(1+z^2y)}dz+\int_{-R}^{+R}\frac{x^2}{(1+x^2)(1+x^2y)}dx$$ $$\because\int_Cf(z)dz=2\pi i\sum_k \text{Res}f(z=z_k)$$ Using Cauchy's Residue Theorem I took the limit $R\to\infty$: $$\lim_{R\to\infty}2\pi i\; \text{Res}f\left ( z=i,\frac{i}{\sqrt{y}},y\in(0,1) \right )=\underbrace{\lim_{R\to\infty}\int_\gamma\frac{z^2}{(1+z^2)(1+z^2y)}dz}_{=0\,,\;\because |z|\to\infty\implies zf(z)\to0}+\lim_{R\to\infty}\int_{-R}^{+R}\frac{x^2}{(1+x^2)(1+x^2y)}dx$$ $$\implies\int_{\Bbb R}\frac{x^2}{(1+x^2)(1+x^2y)}dx=2\pi i\lim_{z\to i}\frac{z^2\require{cancel}\cancel{(z-i)}}{\cancel{(z-i)}(z+i)(1+z^2y)}+\frac{2\pi i}{\sqrt{y}}\lim_{z\to i/\sqrt{y}}\frac{z^2\cancel{(z\sqrt{y}-i)}}{(1+z^2)\cancel{(z\sqrt{y}-i)}(z\sqrt{y}+i)}=-\frac{\pi}{1-y}+\frac{\pi}{(1-y)\sqrt{y}}\implies\int_{\Bbb R}\frac{x^2}{(1+x^2)(1+x^2y)}dx=\frac{\pi}{y+\sqrt{y}}$$ Now integrate both sides with respect to $y$ from $y=0$ to $y=1$ and we get: $$\implies\int_0^1\int_{\Bbb R}\frac{x^2}{(1+x^2)(1+x^2y)}dx\,dy=\pi\int_0^1\frac{dy}{y+\sqrt{y}}$$ $$\implies\int_{\Bbb R}\frac{1}{1+x^2}\int_0^1 d\ln(1+x^2y)dx=2\pi\int_0^1 d\ln(1+\sqrt{y})$$ $$\implies\color{red}{\int_{\Bbb R}\frac{\ln(1+x^2)}{1+x^2}dx=2\pi\ln(2)}$$ Does this seem correct? I would appreciate any help or different ways to go about solving this.

  • 1
    See this https://math.stackexchange.com/q/869440/1157207 – Amrut Ayan Aug 04 '24 at 20:01
  • Confirmed by Mathematica. – David G. Stork Aug 04 '24 at 22:10
  • 1
    An alternate solution is integrating $\frac{2\operatorname{Log}(1+iz)}{1+z^2}$ over a clockwise contour $[-R,R] \cup \Gamma$, where $\Gamma$ is a half-circle over the bottom half of the complex plane and $\operatorname{Log}$ uses the principal branch, then applying the limits and the real part to the equality you get from the Residue Theorem to recover the integral you want. – Accelerator Aug 06 '24 at 08:48
  • A variant on @Accelerator's approach uses $\log(z+i)$ so you can use a semicircle in the upper half of the complex plane. – J.G. Aug 24 '24 at 16:53
  • This integral is a special case of $$\int_0^\infty \frac{\ln^{q-1}(x)\ln(1+x^2)}{1+x^2}dx=(1-(-1)^q)\ln(2)|E_{q-1}|\left(\frac{\pi}{2}\right)^q$$

    $$+2(q-1)!\sum_{k=1}^{\lfloor\frac{q}{2}\rfloor}\frac{|E_{2k-2}|}{(2k-2)!}\left(\frac{\pi}{2}\right)^{2k-1}\lambda(q-2k+2),$$

    where $E$ is the Euler numbers and $\lambda(s)=(1-2^{-s})\zeta(s).$

    – Ali Olaikhan Aug 25 '24 at 06:23

5 Answers5

7

A technique that works in this particular instance, but is also pretty general, involves expressing the integral as derivatives of the beta function. To wit, note that it can be shown

$$I(a)=\int_0^\infty\frac{dx}{(1+x^2)^a}=\int_0^\infty\frac{dt}{2t^{1/2}(1+t)^a}=B(1/2,a-1/2)=\frac{\sqrt{\pi}\Gamma(a-1/2)}{2\Gamma(a)}$$

Then it is simple to show that

$$\int_{-\infty}^\infty\frac{\ln (1+x^2)}{1+x^2}dx=-2\frac{\partial I}{\partial a}\Bigg|_{a=1}=\pi(\psi(1)-\psi(1/2))$$

Using the definition of the Euler formula for the digamma function one can show that $\psi(1)=-\gamma, \psi(1/2)=-\gamma-2\ln 2$, which proves the desired result.

7

A different approach \begin{align} &\int_{\Bbb R}\frac{\ln(1+x^2)}{1+x^2}dx =2\int_0^\infty \frac{\ln(1+x^2)}{1+x^2}dx\\ =& \int_0^\infty \int_0^1 \frac{4x^2 y}{(1+x^2)(1+x^2y^2)}dy\ dx = \int_0^1\frac{2\pi}{1+y}dy = 2\pi\ln2 \end{align}

Quanto
  • 120,125
  • 1
    Every once in a while on this website I see these kinds of solutions and cannot help but wonder two things: 1. How easy are the second and third equalities to prove? 2. How did you come up with the correct double integral that somehow makes the problem much easier? I would appreciate any insights! – Mike Daas Aug 04 '24 at 23:16
  • @MikeDaas The 2nd equality, or the double integral, results from the integral representation of $\ln(1+a)=\int_0^1 \frac {a t}{1+ a t}dt$. The 3rd equality results from the partial fractions of $x^2$. – Quanto Aug 05 '24 at 02:27
  • 1
    Congrats for hitting 100k rep! – Sine of the Time Aug 05 '24 at 08:11
  • @Quanto Do you mean $\ln(1+a)=\int_0^1 \frac {2 a t}{1+ a t^2}dt$? – Natrium Aug 05 '24 at 10:27
  • @Natrium right. – Quanto Aug 05 '24 at 13:21
6

Let $x=\tan \vartheta$, then your integral becomes: $$I=2 \int_0^{\pi/2}\log(\sec^2\vartheta)\mathrm d\vartheta=-2\int_0^{\pi/2}\log(\cos^2 \vartheta)\mathrm d\vartheta=-4\int_0^{\pi/2}\log(\cos \vartheta)\mathrm d\vartheta=\pi \log 4$$

3

Using Feynman's trick

$$I(a)=\int_0^\infty\frac{\log(1+a^2x^2)}{1+x^2}\,dx$$ $$I'(a)=\int_0^\infty \frac{2 a x^2}{\left(1+x^2\right) \left(1+a^2x^2\right)}\,dx$$ Using partial fraction decomposition $$\frac{2 a x^2}{\left(1+x^2\right) \left(1+a^2x^2\right)}=\frac{2 a}{a^2-1}\Big(\frac{1}{1+x^2}-\frac{1}{1+a^2 x^2}\Big)$$ $$I'(a)=\frac{\pi a}{a^2-1}-\frac{\pi }{a^2-1}=\frac{\pi }{a+1}$$

Integrate between $0$ and $1$ and multiply by $2$.

2

$$I=\int_{\Bbb R}\frac{\ln(x^2+1)}{x^2+1}dx=\int_{\Bbb R}\frac{\text{Log}(1+iz)}{z^2+1}dz +\int_{\Bbb R}\frac{\text{Log}(1-iz)}{z^2+1}dz$$ The first integral's integrand has branch cut $[i,i\infty)$, so we take the south anti-clockwise semicircle contour for the evalutaion of the first integral by residue theorem. Similarly, for the second integral we take the north anti-clockwise one. Then, $$I=-2\pi i\left(\text{Res}_{z=-i}\frac{\text{Log}(1+iz)}{z^2+1}\right)+2\pi i\left(\text{Res}_{z=i}\frac{\text{Log}(1-iz)}{z^2+1}\right) $$ $$I=\frac{-2\pi i\text{Log}(1-i^2)}{-2i} +\frac{2\pi i\text{Log}(1-i^2)}{2i} $$ $$I=\pi\text{Log}(2)+\pi\text{Log}(2)=2\pi\ln2$$

Bob Dobbs
  • 15,712