How can I solve $\int_0^1\frac{\arctan(x^2)}{1+x^2}\,\mathrm dx$?

The trick is to exploit a very well-hidden symmetry. The original integral equals $$ \frac{1}{2}\int_{0}^{1}\frac{\arctan(x)}{\sqrt{x}(1+x)}\,dx \tag{1}$$ which by enforcing the substitution $x\mapsto\frac{1-z}{1+z}$ becomes $$ \frac{1}{2}\int_{0}^{1}\frac{\frac{\pi}{4}-\arctan(z)}{\sqrt{1-z^2}}\,dz \tag{2}$$ so the problem boils down to evaluating $$ \int_{0}^{\pi/2}\arctan(\sin\theta)\,d\theta = \sum_{n\geq 0}\frac{(-1)^n}{2n+1}\int_{0}^{\pi/2}\left(\sin\theta\right)^{2n+1}\,d\theta \tag{3}$$ or the hypergeometric series $$ \sum_{n\geq 0}\frac{(-4)^n}{(2n+1)^2\binom{2n}{n}} = \phantom{}_3 F_2\left(\tfrac{1}{2},1,1;\tfrac{3}{2},\tfrac{3}{2};-1\right).\tag{4}$$ Plenty of techniques are available for such a task: in my recent works with Campbell, Cantarini and Sondow, I investigated Fourier-Legendre expansions, for instance: see 1 and 2. But the binomial transform is another perfectly viable approach. Mathematica is already able to express $\int_{0}^{\pi/2}\arctan\sin\theta\,d\theta=\int_{0}^{\pi/2}\arctan\cos\theta\,d\theta$ in terms of $\text{Li}_2$, even if my version is not able to simplify the outcome into a squared logarithm/$\text{arcsinh}$, via the usual functional equations.

The Maclaurin series of the squared (hyperbolic) arcsine is also pretty relevant here:

$$ \sum_{n\geq 0}\frac{(-4)^n}{(2n+1)^2\binom{2n}{n}} = \int_{0}^{1}\frac{\text{arcsinh}(x)}{x\sqrt{1+x^2}}\,dx = \int_{0}^{\text{arcsinh}(1)}\frac{z}{\sinh z}\,dz\tag{5}$$ $$ \int\frac{z}{\sinh z}\,dz = z \log\sinh\frac{z}{2}+\text{Li}_2(-e^{-z})-\text{Li}_2(e^{-z})+C.\tag{6}$$

Curiously enough, this is pretty much the same principle that I exploited in this very lucky contribution of mine. And I am glad that this kind of "Eulerian" Mathematics still is a state-of-the-art, better-than-CASs Mathematics.


$\begin{align} \displaystyle\int_0^1 \dfrac{\arctan(x^2)}{1+x^2}dx&=\Big[\arctan x\arctan(x^2)\Big]_0^1-\int_0^1 \dfrac{2x\arctan x}{1+x^4}dx\\ &=\dfrac{\pi^2}{16}-\int_0^1 \dfrac{2x\arctan x}{1+x^4}dx\\ \end{align}$

Since,

$\displaystyle \arctan x=\int_0^1 \dfrac{x}{1+t^2x^2}dt$

then,

$\begin{align} \displaystyle K&=\int_0^1 \dfrac{2x\arctan x}{1+x^4}dx\\ \displaystyle &=\int_0^1\int_0^1 \dfrac{2x^2}{(1+t^2x^2)(1+x^4)}dtdx\\ \displaystyle &=\int_0^1\int_0^1 \left(\dfrac{2t^2}{(1+t^4)(1+x^4)}+\dfrac{2x^2}{(1+x^4)(1+t^4)}-\dfrac{2t^2}{(1+t^4)(1+t^2x^2}\right)dtdx\\ &=\displaystyle 4\left(\int_0^1 \dfrac{t^2}{1+t^4}dt\right)\left(\int_0^1 \dfrac{1}{1+x^4}dx\right)-K \end{align}$

Therefore,

$\displaystyle K=2\left(\int_0^1 \dfrac{x^2}{1+x^4}dx\right)\left(\int_0^1 \dfrac{1}{1+x^4}dx\right)$

Since,

$\begin{align}\displaystyle \int_0^1 \dfrac{x^2}{1+x^4}dx&=\left[\dfrac{1}{4\sqrt{2}}\ln\left(\dfrac{x^2-\sqrt{2}x+1}{x^2+\sqrt{2}x+1}\right)+\dfrac{1}{2\sqrt{2}}\arctan\left(\sqrt{2}x+1\right)+\dfrac{1}{2\sqrt{2}}\arctan\left(\sqrt{2}x-1\right)\right]_0^1\\ &=\dfrac{1}{4\sqrt{2}}\Big(\pi+\ln\left(3-2\sqrt{2}\right)\Big) \end{align}$

and,

$\begin{align}\displaystyle \int_0^1 \dfrac{1}{1+x^4}dx&=\left[\dfrac{1}{4\sqrt{2}}\ln\left(\dfrac{x^2+\sqrt{2}x+1}{x^2-\sqrt{2}x+1}\right)+\dfrac{1}{2\sqrt{2}}\arctan\left(\sqrt{2}x+1\right)+\dfrac{1}{2\sqrt{2}}\arctan\left(\sqrt{2}x-1\right)\right]_0^1\\ &=\dfrac{1}{4\sqrt{2}}\Big(\pi-\ln\left(3-2\sqrt{2}\right)\Big) \end{align}$

Therefore,

$\boxed{K=\displaystyle \dfrac{\pi^2}{16}-\dfrac{1}{16}\Big(\ln\left(3-2\sqrt{2}\right)\Big)^2}$

Therefore,

$\boxed{\displaystyle\int_0^1 \dfrac{\arctan(x^2)}{1+x^2}dx=\dfrac{1}{16}\Big(\ln\left(3-2\sqrt{2}\right)\Big)^2}$

NB:

$\displaystyle \left(3-2\sqrt{2}\right)=\left(1-\sqrt{2}\right)^2=\frac{1}{\left(1+\sqrt{2}\right)^2}$

therefore,

$\displaystyle \ln^2\left(3-2\sqrt{2}\right)=4\ln^2\left(1+\sqrt{2}\right)$


As @Jack D'Aurizio♦ provided a nice answer, let me simply add a bit of extra information:

  1. A slightly different way of transforming the given integral can be made as follows:

    \begin{align*} \int_{0}^{1}\frac{\arctan(x^2)}{1+x^2}\,dx &= \int_{0}^{\frac{\pi}{4}} \arctan(\tan^2 \theta) \, d\theta \tag{$x=\tan\theta$} \\ &= \int_{0}^{\frac{\pi}{4}} \arctan\left( \frac{1-\cos2\theta}{1+\cos2\theta} \right) \, d\theta \\ &= \int_{0}^{\frac{\pi}{4}} \left( \frac{\pi}{4} - \arctan(\cos2\theta) \right) \, d\theta \\ &= \frac{\pi^2}{16} - \frac{1}{2}\int_{0}^{\frac{\pi}{2}} \arctan(\sin\phi)\,d\phi. \tag{$\phi=\frac{\pi}{2}-2\theta$} \end{align*}

    Here, we utilized double-angle identities and $\arctan\left(\frac{1-x}{1+x}\right) = \frac{\pi}{4} - \arctan x$ for $x \in (-1, \infty)$.

  2. The last integral can also be computed in terms of Legendre chi function $\chi_2$:

    $$ \frac{1}{2} \int_{0}^{\frac{\pi}{2}} \arctan(\sin\phi)\,d\phi = \chi_2(\sqrt{2}-1) = \frac{\pi^2}{16} - \frac{1}{4}\log^2(\sqrt{2}+1). $$

    You may check my previous answer for the detail of derivation. Alternative ways to compute this integral can also be found in this posting.