Closed form of $\int_0^\infty \arctan^2 \left (\frac{2x}{1 + x^2} \right ) \, dx$

calculusclosed-formimproper-integralsintegration

Can a closed form solution for the following integral be found:
$$\int_0^\infty \arctan^2 \left (\frac{2x}{1 + x^2} \right ) \, dx\,?$$

I have tried all the standard tricks such as integration by parts, various substitutions, and parametric differentiation (Feynman's trick), but all to no avail.

An attempt is letting
$$f(t):=\int_0^\infty\,\arctan^2\left(\frac{2tx}{1+x^2}\right)\,\text{d}x\,.$$
Therefore,
$$f'(t)=\int_0^\infty\,\frac{8x^2(x^2+1)}{\big(x^4+2(2t^2+1)x^2+1\big)^2}\,\left(1+x^2-4tx\arctan\left(\frac{2tx}{1+x^2}\right)^{\vphantom{a^2}}\right)\,\text{d}x\,.$$
This doesn't seem to go anywhere. Help!

Best Answer

Here is a solution based on Fubini's theorem.

According to an addition formula \begin{equation*} \arctan\left(\dfrac{2x}{1+x^2}\right) = \arctan((\sqrt{2}+1)x)-\arctan((\sqrt{2}-1)x) . \end{equation*} Furthermore \begin{equation*} \arctan x=\mathrm{sign}(x)\dfrac{\pi}{2}-\arctan\dfrac{1}{x} . \end{equation*} Consequently \begin{equation*} \arctan\left(\dfrac{2x}{1+x^2}\right) = \arctan\dfrac{\sqrt{2}+1}{x}-\arctan\dfrac{\sqrt{2}-1}{x}=\int_{\sqrt{2}-1}^{\sqrt{2}+1}\dfrac{x}{x^2+s^2}\, ds . \end{equation*} Via Fubini's theorem we get \begin{gather*} \int_{0}^{\infty}\arctan^2\left(\dfrac{2x}{1+x^2}\right)\, dx = \int_{0}^{\infty}\left(\arctan\dfrac{\sqrt{2}+1}{x}-\arctan\dfrac{\sqrt{2}-1}{x}\right)^2\, dx=\\[2ex] \int_{0}^{\infty}\left(\int_{\sqrt{2}-1}^{\sqrt{2}+1}\dfrac{x}{x^2+s^2}\, ds\int_{\sqrt{2}-1}^{\sqrt{2}+1}\dfrac{x}{x^2+t^2}\, dt\right)\, dx=\\[2ex] \int_{\sqrt{2}-1}^{\sqrt{2}+1}\left(\int_{\sqrt{2}-1}^{\sqrt{2}+1}\left(\int_{0}^{\infty}\dfrac{x^2}{(x^2+s^2)(x^2+t^2)}\, dx\right)\, ds\right)\, dt=\\[2ex] \dfrac{\pi}{2}\int_{\sqrt{2}-1}^{\sqrt{2}+1}\left(\int_{\sqrt{2}-1}^{\sqrt{2}+1}\dfrac{1}{s+t}\, ds\right)\, dt=\\[2ex] \dfrac{\pi}{2}\int_{\sqrt{2}-1}^{\sqrt{2}+1}\left(\ln(t+\sqrt{2}+1)-\ln(t+\sqrt{2}-1)\right)\, dt=\\[2ex] 2\pi\ln(\sqrt{2}+1)-\sqrt{2}\pi\ln 2. \end{gather*}

Remark. Since \begin{equation*} \arctan\left(\dfrac{2x\sinh\alpha}{1+x^2}\right)=\arctan\left(\dfrac{e^{\alpha}}{x}\right)-\arctan\left(\dfrac{e^{-\alpha}}{x}\right) = \int_{e^{-\alpha}}^{e^{\alpha}}\dfrac{x}{x^2+s^2}\, ds \end{equation*} the $@$Sangchul Lee's generalization can be proved in the same way.