Whats the result of double integral $\int_{0}^{1}\int_{0}^{1}\frac{1+x^2}{1+x^2+y^2}dxdy$

By symmetry one has $$Q:=\int_0^1\int_0^1{1+x^2\over1+x^2+y^2}\>dy\>dx={1\over2}\int_0^1\int_0^1{2+x^2+y^2\over1+x^2+y^2}\>dy\>dx$$ and therefore $$Q={1\over2}\int_0^1\int_0^1\left(1+{1\over 1+x^2+y^2}\right)\>dy\>dx={1\over2}+\int_0^{\pi/4}\int_0^{\sec\phi}{r\over 1+r^2}\>dr\>d\phi\ .$$ The last inner integral evaluates to $${1\over2}\log(1+r^2)\biggr|_0^{\sec\phi}={1\over2}\log(1+\sec^2\phi)\ ,$$ so that we finally obtain $$Q={1\over2}+{1\over2}\int_0^{\pi/4}\log(1+\sec^2\phi)\>d\phi\doteq0.819755\ .$$ (Mathematica can evaluate the last integral in terms of arcsines and polylogs.)


$\begin{align} J&=\int_{0}^{1}\int_{0}^{1}\frac{1+x^2}{1+x^2+y^2}dxdy\\ &=\int_0^1 \left[\sqrt{1+x^2}\arctan\left(\frac{y}{\sqrt{1+x^2}}\right)\right]_{y=0}^{y=1}\,dx\\ &=\int_0^1 \sqrt{1+x^2}\arctan\left(\frac{1}{\sqrt{1+x^2}}\right)\,dx \end{align}$

Perform the change of variable $\displaystyle x=\tan \theta$,

$\begin{align} J&=\int_{0}^{\frac{\pi}{4}}\frac{1+\tan^2\theta}{\cos\theta}\arctan\left(\cos \theta\right)d\theta\\ &=\int_{0}^{\frac{\pi}{4}}\frac{\arctan\left(\cos \theta\right)}{\cos^3\theta}\,d\theta\\ &=\left[\frac{\tan\theta\arctan\left(\cos \theta\right)}{\cos\theta}\right]_{0}^{\frac{\pi}{4}}-\int_{0}^{\frac{\pi}{4}}\tan \theta\left(\frac{\sin \theta\arctan\left(\cos \theta\right)}{\cos^2 \theta}-\frac{\sin x}{\cos x(1+\cos^2 x)}\right)\,d\theta\\ &=\sqrt{2}\arctan\left(\frac{1}{2}\right)-\int_{0}^{\frac{\pi}{4}}\frac{(1-\cos^2x)\arctan\left(\cos \theta\right)}{\cos^3 \theta}\,d\theta+\int_{0}^{\frac{\pi}{4}}\frac{\tan^2\theta}{\cos^2\theta(2+\tan^2 \theta)}\,d\theta\\ &=\sqrt{2}\arctan\left(\frac{1}{2}\right)-J+\int_{0}^{\frac{\pi}{4}}\frac{\arctan\left(\cos \theta\right)}{\cos \theta}\,d\theta+\int_0^1 \frac{x^2}{2+x^2}\,dx\\ &=\sqrt{2}\arctan\left(\frac{1}{2}\right)-J+\int_{0}^{\frac{\pi}{4}}\frac{\arctan\left(\cos \theta\right)}{\cos \theta}\,d\theta+\left[x-\sqrt{2}\arctan\left(\frac{x}{\sqrt{2}}\right)\right]_0^1\\ &=1-J+\int_{0}^{\frac{\pi}{4}}\frac{\arctan\left(\cos \theta\right)}{\cos \theta}\,d\theta\\ \end{align}$

Perform the change of variable $x=\cos \theta$,

$\begin{align}J&=\frac{1}{2}+\frac{1}{2}\int_{\frac{1}{\sqrt{2}}}^1\frac{\arctan x}{x\sqrt{1-x^2}}\,dx\\ &=\frac{1}{2}+\frac{1}{2}\int_{0}^1\frac{\arctan x}{x\sqrt{1-x^2}}\,dx-\frac{1}{2}\int_0^{\frac{1}{\sqrt{2}}}\frac{\arctan x}{x\sqrt{1-x^2}}\,dx\end{align}$

But, it is well known that,

$\displaystyle \int_{0}^1\frac{\arctan x}{x\sqrt{1-x^2}}\,dx=\frac{\pi}{2}\ln(1+\sqrt{2})$

(see Definite integral $\int_0^1 \frac{\arctan x}{x\,\sqrt{1-x^2}}\,\text{d}x$ )

and, thanks to Vladimir Reshetnikov for,

$\displaystyle \int\frac{\arctan x}{x\,\sqrt{1-x^2}}\,dx=\frac i2\left[\operatorname{Li}_2\left(\frac{-1-\sqrt2}{1+\sqrt{1-x^2}}\,ix\right)-\operatorname{Li}_2\left(\frac{1+\sqrt2}{1+\sqrt{1-x^2}}\,ix\right)\\ -\operatorname{Li}_2\left(\frac{1-\sqrt2}{1+\sqrt{1-x^2}}\,ix\right)+\operatorname{Li}_2\left(\frac{-1+\sqrt2}{1+\sqrt{1-x^2}}\,ix\right)\right]\color{gray}{+C}$

(see Definite integral $\int_0^1 \frac{\arctan x}{x\,\sqrt{1-x^2}}\,\text{d}x$)

Therefore,

$\begin{align}J&=\frac{1}{2}+\frac{\pi}{4}\ln(1+\sqrt{2})-\frac{i}{4}\left[\operatorname{Li}_2(-i)-\operatorname{Li}_2(i)-\operatorname{Li}_2\Big(-(3-2\sqrt{2})i\Big)+\operatorname{Li}_2\Big(\left(3-2\sqrt{2}\right)i\Big)\right]\\ &=\frac{1}{2}+\frac{\pi}{4}\ln(1+\sqrt{2})+\frac{1}{2}\Im\left(\operatorname{Li}_2(-i)\right)+\frac{1}{2}\Im\left(\operatorname{Li}_2\Big((3-\sqrt{2})i\right)\Big)\\ &=\boxed{\frac{1}{2}+\frac{\pi}{4}\ln(1+\sqrt{2})-\frac{1}{2}\text{G}+\frac{1}{2}\Im\left(\operatorname{Li}_2\Big((3-\sqrt{2})i\right)\Big)} \end{align}$

($\text{G}$ is the Catalan constant)