# Ahmed's Integral Variation

I was just wondering if anyone knows how to approach either (or both) of the following integrals. I'm not sure how much the bounds change between them, but regardless the integrands are the same. It's not exactly Ahmed's, but it seems pretty close. The Two Integrals $\int_1^\infty \dfrac{\tan^{-1}(\sqrt{2a^2+1})}{(1+3a^2)\sqrt{2a^2+1}}da \hspace{1cm} \int_0^1 \dfrac{\tan^{-1}(\sqrt{2a^2+1})}{(1+3a^2)\sqrt{2a^2+1}}da$

Feel free to give them a shot and thanks in advance. I came across both of these while trying to evaluate Coxeter's integral using tangent-half-angle substitution and then differentiation under the integral sign.

Perform the change of variable $y=\dfrac{1}{x^2}$,

\begin{align}J&=\int_1^{\infty} \dfrac{\arctan(\sqrt{2x^2+1})}{(1+3x^2)\sqrt{2x^2+1}}\,dx\\ &=\frac{1}{2}\int_0^{1}\frac{\arctan\left(\sqrt{1+\frac{2}{x}}\right)}{\sqrt{x+2}(x+3)}\,dx \end{align}

Perform integration by parts,

\begin{align}J&=\Big[\arctan\left(\sqrt{x+2}\right)\arctan\left(\sqrt{1+\frac{2}{x}}\right)\Big]_0^{1}+\int_0^{1}\frac{\arctan\left(\sqrt{x+2}\right)}{2\sqrt{x}(1+x)\sqrt{x+2}}\,dx\\ &=\frac{\pi^2}{9}-\frac{\pi}{2}\arctan\left(\sqrt{2}\right)+\int_0^{1}\frac{\arctan\left(\sqrt{x+2}\right)}{2\sqrt{x}(1+x)\sqrt{x+2}}\,dx\\ \end{align}

Perform the change of variable $y=\sqrt{x}$,

\begin{align}J&=\frac{\pi^2}{9}-\frac{\pi}{2}\arctan\left(\sqrt{2}\right)+\int_0^{1}\frac{\arctan\left(\sqrt{x^2+2}\right)}{(1+x^2)\sqrt{x^2+2}}\,dx\\ \end{align}

The latter integral is Ahmed's integral therefore,

\begin{align}\boxed{J=\frac{47\pi^2}{288}-\frac{\pi}{2}\arctan\left(\sqrt{2}\right)} \end{align}

PS: For the computation of Ahmed's integral:

Let,

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

For $u$ real,

$\displaystyle \frac{\arctan u}{u}=\int_0^1 \frac{1}{1+t^2u^2}\,dt$

Therefore,

\begin{align}H&=\int_{0}^{\infty} \left(\int_0^1 \frac{1}{(1+x^2)\left(1+t^2(2+x^2)\right)}\,dt\right)\,dx\\ &=\int_{0}^{\infty} \left(\int_0^1 \left(\frac{1}{(1+t^2)(1+x^2)}-\frac{t^2}{(1+t^2)\left(1+t^2(2+x^2)\right)}\right)\,dt\right)\,dx\\ &=\int_{0}^{\infty} \left(\int_0^1 \frac{1}{(1+t^2)(1+x^2)}\,dt\right)\,dx-\int_{0}^{\infty} \left(\int_0^1 \frac{t^2}{(1+t^2)\left(1+t^2(2+x^2)\right)}\,dt\right)\,dx\\ &=\frac{\pi^2}{8}-\int_0^1 \left[\frac{t}{(1+t^2)\sqrt{1+2t^2}}\arctan\left(\frac{tx}{\sqrt{1+2t^2}}\right)\right]_{x=0}^{x=\infty}\,dt\\ &=\frac{\pi^2}{8}-\frac{\pi}{2}\int_0^1 \frac{t}{(1+t^2)\sqrt{1+2t^2}}\,dt\\ &=\frac{\pi^2}{8}-\frac{\pi}{2}\Big[\arctan\left(\sqrt{1+2t^2}\right)\Big]_0^1\\ &=\frac{\pi^2}{8}-\frac{\pi}{2}\left(\frac{\pi}{3}-\frac{\pi}{4}\right)\\ &=\frac{\pi^2}{12}\\ \end{align}

Moreover,

\begin{align}H&=\int_{0}^{1}\frac{\arctan\sqrt{2+x^2}}{(1+x^2)\sqrt{2+x^2}}\,dx+\int_{1}^{\infty}\frac{\arctan\sqrt{2+x^2}}{(1+x^2)\sqrt{2+x^2}}\,dx\\ &=\frac{5\pi^2}{96}+\int_{1}^{\infty}\frac{\arctan\sqrt{2+x^2}}{(1+x^2)\sqrt{2+x^2}}\,dx\\ \end{align}

Therefore,

\begin{align} \int_{1}^{\infty}\frac{\arctan\sqrt{2+x^2}}{(1+x^2)\sqrt{2+x^2}}\,dx=\frac{\pi^2}{32}\\ \end{align}

On the other hand,

Perform the change of variable $y=\dfrac{1}{x^2}$,

\begin{align}K&=\int_0^1 \dfrac{\arctan(\sqrt{2x^2+1})}{(1+3x^2)\sqrt{2x^2+1}}\,dx\\ &=\frac{1}{2}\int_1^{\infty}\frac{\arctan\left(\sqrt{1+\frac{2}{x}}\right)}{\sqrt{x+2}(x+3)}\,dx \end{align}

Perform integration par parts,

\begin{align}K&=\Big[\arctan\left(\sqrt{x+2}\right)\arctan\left(\sqrt{1+\frac{2}{x}}\right)\Big]_1^{\infty}+\int_1^{\infty}\frac{\arctan\left(\sqrt{x+2}\right)}{2\sqrt{x}(1+x)\sqrt{x+2}}\,dx\\ &=\frac{\pi^2}{8}-\frac{\pi^2}{9}+\int_1^{\infty}\frac{\arctan\left(\sqrt{x+2}\right)}{2\sqrt{x}(1+x)\sqrt{x+2}}\,dx\\ \end{align}

Perform the change of variable $y=\sqrt{x}$,

\begin{align}K&=\frac{\pi^2}{72}+\int_1^{\infty}\frac{\arctan\left(\sqrt{x^2+2}\right)}{(1+x^2)\sqrt{x^2+2}}\,dx\\ &=\frac{\pi^2}{72}+\frac{\pi^2}{32}\\ &=\boxed{\frac{13\pi^2}{288}} \end{align}

$$\int_{0}^{1}\frac{\arctan\sqrt{2a^2+1}}{(1+3a^2)\sqrt{2a^2+1}}\,da=\int_{1}^{3}\frac{\arctan\sqrt{b}}{\sqrt{2}(3b-1)\sqrt{b(b-1)}}\,db=\sqrt{2}\int_{1}^{\sqrt{3}}\frac{\arctan(z)\,dz}{(3z^2-1)\sqrt{z^2-1}}$$ by Feynman's trick and the substitution $x\mapsto\frac{1}{z}$ equals $$\sqrt{2}\int_{0}^{1}\int_{1/\sqrt{3}}^{1}\frac{z^2}{(3-z^2)(z^2+a^2)\sqrt{1-z^2}}\,dz\,da$$ or $$\sqrt{2}\int_{0}^{1}\int_{\arctan(1/\sqrt{2})}^{\pi/2}\frac{\sin^2\theta}{(3-\sin^2\theta)(a^2+\sin^2\theta)}\,d\theta\,da$$ or, by partial fraction decomposition, $$\sqrt{2}\int_{0}^{1}\frac{\pi}{\sqrt{6}}\cdot\frac{1}{3+a^2}\,da-\sqrt{2}\int_{0}^{1}\frac{\arctan\sqrt{\frac{2}{1+1/a^2}}}{(3+a^2)\sqrt{1+1/a^2}}\,da$$ which equals $$\frac{\pi^2}{18}-\frac{1}{\sqrt{2}}\int_{0}^{1}\frac{\arctan\sqrt{\frac{2a}{a+1}}}{(3+a)\sqrt{a+1}}\,da = \frac{\pi^2}{18}-\frac{1}{2}\int_{0}^{1}\frac{\arctan\sqrt{z}}{(3-z)\sqrt{2-z}}\,dz$$ or $$\frac{\pi^2}{18}-\int_{1}^{\sqrt{2}}\frac{\arctan\sqrt{2-z^2}}{1+z^2}\,dz\stackrel{\text{IBP}}{=}\frac{\pi^2}{18}+\frac{\pi^2}{16}-\frac{1}{2}\int_{1}^{2}\frac{\arctan\sqrt{z}}{(3-z)\sqrt{2-z}}\,dz.$$ By keep playing with the functional relations for the arctangent function, Feynman's trick and integration by parts the following conjectural identity should follow: $$\int_{0}^{1}\frac{\arctan\sqrt{2a^2+1}}{(1+3a^2)\sqrt{2a^2+1}}\,da=\frac{13\pi^2}{288}.$$