# Ahmed integral revisited $\int_0^1 \frac{\tan ^{-1}\left(\sqrt{x^2+4}\right)}{\left(x^2+2\right) \sqrt{x^2+4}} \, dx$

How can we prove (it is numerically verified already): $$\int_0^1 \frac{\tan ^{-1}\left(\sqrt{x^2+4}\right)}{\left(x^2+2\right) \sqrt{x^2+4}} dx=-\frac{5 \pi ^2}{16}-\frac{1}{4} \tan ^{-1}\left(\sqrt{2}\right)^2+\frac{1}{2} \pi \tan ^{-1}\left(\sqrt{2}\right)+\frac{1}{4} \pi \tan ^{-1}\left(\sqrt{5}\right)+\frac{1}{4} \pi \tan ^{-1}\left(3 \sqrt{2}+2 \sqrt{5}\right)$$ I came across this Ahmed integral on "Art of problem solving". The OP states that he established this formula but offers no proof (In fact he's also the founder of other fascinating Ahmed integrals, see here and here). As usual I've come up with no idea for now (:-)). Any kind of help will be appreciated.

• Could you provide the original link? – pisco May 27 at 8:19
• @pisco My network stuck now. Please search for creasson's posts on AOPS. – Hypergeometric May 27 at 8:27
• OK, I see. This integral can actually be obtained by what you and me did here: math.stackexchange.com/questions/3330757/…. – pisco May 27 at 8:29

To evaluate that integral we can use Feynman's trick: $$I=\int _0^1\frac{\arctan \left(\sqrt{x^2+4}\right)}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx$$ $$I\left(a\right)=\int _0^1\frac{\arctan \left(a\sqrt{x^2+4}\right)}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx$$ $$I'\left(a\right)=\int _0^1\frac{1}{\left(x^2+2\right)\left(a^2x^2+4a^2+1\right)}\:dx=\frac{1}{2a^2+1}\int _0^1\frac{1}{x^2+2}-\frac{a^2}{a^2x^2+4a^2+1}\:dx$$ $$=\frac{1}{2a^2+1}\left(\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)}{\sqrt{2}}-\frac{a\arctan \left(\frac{a}{\sqrt{4a^2+1}}\right)}{\sqrt{4a^2+1}}\right)$$ Now lets integrate again: $$\int _1^{\infty }I'\left(a\right)\:da=\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)}{\sqrt{2}}\int _1^{\infty }\frac{1}{2a^2+1}\:da-\underbrace{\int _1^{\infty }\frac{a\arctan \left(\frac{a}{\sqrt{4a^2+1}}\right)}{\sqrt{4a^2+1}\left(2a^2+1\right)}\:da}_{a=\frac{1}{x}}$$ $$\frac{\pi }{2}\int _0^1\frac{1}{\left(x^2+2\right)\sqrt{x^2+4}}dx-I\:=\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)}{2\sqrt{2}}\left(\frac{\pi \sqrt{2}}{2}-\sqrt{2}\arctan \left(\sqrt{2}\right)\right)-\int _0^1\frac{\arctan \left(\frac{1}{\sqrt{x^2+4}}\right)}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx$$ $$=\frac{\pi \arctan \left(\frac{1}{\sqrt{2}}\right)}{4}-\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)\arctan \left(\sqrt{2}\right)}{2}-\frac{\pi }{2}\int _0^1\frac{1}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx+\underbrace{\int _0^1\frac{\arctan \left(\sqrt{x^2+4}\right)}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx}_{I}$$ $$-2I\:=\frac{\pi \:\arctan \left(\frac{1}{\sqrt{2}}\right)}{4}-\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)\arctan \left(\sqrt{2}\right)}{2}-\pi \underbrace{\int _0^1\frac{1}{\left(x^2+2\right)\sqrt{x^2+4}}\:dx}_{t=\arctan \left(\frac{x}{\sqrt{x^2+4}}\right)}$$ $$I\:=-\frac{\pi \:\arctan \left(\frac{1}{\sqrt{2}}\right)}{8}+\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)\arctan \left(\sqrt{2}\right)}{4}+\frac{\pi }{4}\int _0^{\arctan \left(\frac{1}{\sqrt{5}}\right)}\:dt$$ $$\boxed{I=-\frac{\pi \:\arctan \left(\frac{1}{\sqrt{2}}\right)}{8}+\frac{\arctan \left(\frac{1}{\sqrt{2}}\right)\arctan \left(\sqrt{2}\right)}{4}+\frac{\pi }{4}\arctan \left(\frac{1}{\sqrt{5}}\right)}$$

This numerically agrees with Wolfram Alpha.

Let

$$I(a)=\int_0^1 \frac{\arctan(a\sqrt{x^2+4})}{(x^2+2)\sqrt{x^2+4}}dx,I(0)=0,I=I(1)$$

\begin{align} I'(a)&=\int_0^1 \frac{1}{(x^2+4)[1+a^2(x^2+4)]}dx \\ &=\int_0^1 \frac{1}{x^2+4}dx-a^2\int_0^1 \frac{1}{1+a^2(x^2+4)}dx \\ &=\frac{1}{2} \arctan \frac{1}{2}-\frac{a}{\sqrt{1+4a^2}}\arctan \frac{a}{\sqrt{1+4a^2}} \\ \end{align}

Note

$$\int \frac{a}{\sqrt{1+4a^2}}\arctan \frac{a}{\sqrt{1+4a^2}} da$$ $$=\frac{1}{4} \int \arctan \frac{a}{\sqrt{1+4a^2}} d(\sqrt{1+4a^2})$$

Using integration by parts,then I believe you can finish it