# A definite integral related to Ahmed's integral

Further work on a recent question which has just been answered leads me to make this conjecture: $$\int_0^1 \frac{\tan^{-1}\left(\frac{1}{\sqrt{2 + x^2}}\right)} {(1 + x^2)\sqrt{2 + x^2}}\,du = \frac{\pi^2}{32}.$$ I haven't made any effort to prove it (and I wouldn't even know how to begin), but I'll explain the connection with the other problem (later, by editing this question), if anyone expresses an interest.

Hasty update:

I should have looked again at more of the references I looked at yesterday! Google Books shows pages 190 to 193 (your mileage may vary) of the book by Paul J. Nahin, Inside Interesting Integrals, in which this very integral occurs in the course of an evaluation of Ahmed's integral. (Indeed, with hindsight, I have to admit that the connection is "obvious", especially because it follows from an elementary trigonometric identity I already used yesterday.)

What is the etiquette for a situation like this? Should I simply delete this question, or should I explain the details of how this integral is related to Ahmed's integral, and to the other MathSE question I referred to? (Please excuse a blundering old newbie!)

• I think that providing an answer to this question can be very interesting for future references, so please add it. – Jack D'Aurizio Feb 27 '15 at 15:43
• I think it is related to $$\int\frac{dx}{(1+x^2)\sqrt{2+x^2}}=\arctan\frac{x}{\sqrt{2+x^2}},$$ right? – Jack D'Aurizio Feb 27 '15 at 15:46
• Expand the arctangent and you get a series of integrals over rational functions, although I am not sure how easy it is to evaluate the general term. – Ron Gordon Feb 27 '15 at 15:50
• Yes; and its exact origin was in a variation of equation (4) in your answer to the other question. I used the closed form of the indefinite integral of the LHS, provided by Wolfram Alpha (and presumably easily checked, although I haven't bothered) to change the upper limit of the definite integral on the LHS of (4) from $1$ to $1/\sqrt{3}$. This was in order to try to prove my guess (also due essentially to Wolfram Alpha) that the zero integral in the other question was a sum of two terms $\pm\frac{\pi^2}{96}$. I'm sure now it'll work out; I'll write it up in an answer, here, when I have time. – Calum Gilhooley Feb 27 '15 at 15:56

Ahmed's integral is: $$A = \int_0^1 \frac{\tan^{-1}\sqrt{2 + x^2}} {(1 + x^2)\sqrt{2 + x^2}}\,dx.$$ If we denote the unknown integral above by $B$, then: \begin{gather*} A + B = \int_0^1 \frac{\tan^{-1}\sqrt{2 + x^2} + \tan^{-1}\left(\frac{1}{\sqrt{2 + x^2}}\right)} {(1 + x^2)\sqrt{2 + x^2}}\,dx \\ = \frac{\pi}{2}\int_0^1 \frac{dx}{(1 + x^2)\sqrt{2 + x^2}} = \frac{\pi}{2}\left[ \tan^{-1}\left(\frac{x}{\sqrt{2 + x^2}}\right)\right]_0^1 = \frac{\pi^2}{12}. \end{gather*} So the conjecture $B = \pi^2/32$ is equivalent to the known theorem $A = 5\pi^2/96$.
On p.190ff. of Paul J. Nahin's book Inside Interesting Integrals (with an introduction to contour integration): A Collection of Sneaky Tricks, Sly Substitutions, and Numerous Other Stupendously Clever, Awesomely Wicked, and Devilishly Seductive Maneuvers for Computing Nearly 200 Perplexing Definite Integrals From Physics, Engineering, and Mathematics (Plus 60 Challenge Problems with Complete, Detailed Solutions (2014), there is an ingenious and well-explained derivation of these two results, which amounts to proving, in the same way, the above equation $A + B = \pi^2/12$, along with the simultaneous equation $A - B = \pi^2/48$.
Part of the highly condensed argument given by MathSE user Jack D'Aurizio in answer to a recent question is equivalent to the case $\tau = 1$ of the following argument, for $0 < \tau \leqslant 1$, which I've expanded considerably for the sake of those unused to this kind of calculation (i.e. me).
For all real $a$, $$\tan^{-1} a = \int_0^1 \frac{a}{1 + a^2u^2}\,du.$$ Using Wolfram Alpha to evaluate the inner integral after changing the order of integration: \begin{gather*} \int_0^\tau \frac{\tan^{-1}\sqrt{\frac{1 - t^2}{2}}}{1 + t^2}\,dt = \int_0^\tau \int_0^1 \frac{\sqrt{\frac{1 - t^2}{2}}} {(1 + t^2)\left(1 + \frac{1 - t^2}{2}u^2\right)}\,du\,dt \\ = \int_0^1\int_0^\tau \frac{\sqrt{\frac{1 - t^2}{2}}} {(1 + t^2)\left(1 + \frac{1 - t^2}{2}u^2\right)}\,dt\,du \\ = \int_0^1 \left( \frac{\tan^{-1}\left(\frac{\sqrt{2}\tau}{\sqrt{1 - \tau^2}}\right)} {u^2 + 1} - \frac{\tan^{-1}\left(\frac{\sqrt{2}\tau}{\sqrt{1 - \tau^2}\sqrt{u^2 + 2}}\right)} {(u^2 + 1)\sqrt{u^2 + 2}} \right)du. \end{gather*} But we have already seen the values of these integrals: $$\int_0^1 \frac{du}{u^2 + 1} = \frac{\pi}{4}, \ \ \int_0^1 \frac{du}{(u^2 + 1)\sqrt{u^2 + 2}} = \frac{\pi}{6}, \ \ \int_0^1 \frac{\tan^{-1}\left(\frac{1}{\sqrt{u^2 + 2}}\right)} {(u^2 + 1)\sqrt{u^2 + 2}}\,du = \frac{\pi^2}{32}.$$ Hence, taking $\tau = 1$ and $\tau = \frac{1}{\sqrt{3}}$ respectively: $$\int_0^1 \frac{\tan^{-1}\sqrt{\frac{1 - t^2}{2}}}{1 + t^2}\,dt = \frac{\pi}{2}\cdot\frac{\pi}{4} - \frac{\pi}{2}\cdot\frac{\pi}{6} = \frac{\pi^2}{24},$$ and: $$\int_0^{\frac{1}{\sqrt{3}}} \frac{\tan^{-1}\sqrt{\frac{1 - t^2}{2}}}{1 + t^2}\,dt = \frac{\pi}{4}\cdot\frac{\pi}{4} - \frac{\pi^2}{32} = \frac{\pi^2}{32}.$$
The familiar trigonometrical identities: $$\tan\left(\theta - \frac{\pi}{2}\right) = -\frac{1}{\tan\theta}, \ \ \tan3\theta = \frac{3\tan\theta - \tan^3\theta}{1 - 3\tan^2\theta}$$ combine to give: $$\tan^{-1}\left(\frac{\sqrt{2}(1-3t^2)}{(5+t^2)\sqrt{1-t^2}}\right) = 3\tan^{-1}\sqrt{\frac{1-t^2}{2}} - \frac{\pi}{2}.$$ Therefore: \begin{align*} \int_0^1 \frac{\tan^{-1} \left(\frac{\sqrt{2}(1-3t^2)}{(5+t^2)\sqrt{1-t^2}}\right)} {1 + t^2}\,dt & = 3\cdot\frac{\pi^2}{24} - \frac{\pi}{2}\cdot\frac{\pi}{4} = 0, \\ \int_0^{\frac{1}{\sqrt{3}}} \frac{\tan^{-1} \left(\frac{\sqrt{2}(1-3t^2)}{(5+t^2)\sqrt{1-t^2}}\right)} {1 + t^2}\,dt & = 3\cdot\frac{\pi^2}{32} - \frac{\pi}{2}\cdot\frac{\pi}{6} = \frac{\pi^2}{96}. \end{align*} Finally, making the change of variables $t = \tan\phi$, and subtracting these two integrals, we get: \begin{align*} \int_{0}^{\frac{\pi}{4}}\tan^{-1}\!\! \left(\frac{\sqrt{2}\cos3 \phi} {\left(2\cos 2 \phi+ 3\right)\sqrt{\cos 2 \phi}}\right)d\phi & = 0, \\ \int_{0}^{\frac{\pi}{6}}\tan^{-1}\!\! \left(\frac{\sqrt{2}\cos3 \phi} {\left(2\cos 2 \phi+ 3\right)\sqrt{\cos 2 \phi}}\right)d\phi & = \frac{\pi^2}{96}, \\ \int_{\frac{\pi}{6}}^{\frac{\pi}{4}}\tan^{-1}\!\! \left(\frac{\sqrt{2}\cos3 \phi} {\left(2\cos 2 \phi+ 3\right)\sqrt{\cos 2 \phi}}\right)d\phi & = -\frac{\pi^2}{96} \end{align*}