The following integral

\begin{align*} \int_{0}^{1} \frac{\arctan\sqrt{x^{2} + 2}}{\sqrt{x^{2} + 2}} \, \frac{dx}{x^{2}+1} = \frac{5\pi^{2}}{96} \tag{1} \end{align*}

is called the Ahmed's integral and became famous since its first discovery in 2002. Fascinated by this unbelievable closed form, I have been trying to generalize this result for many years, though not successful so far.

But suddenly it came to me that some degree of generalization may be possible. My conjecture is as follows: Define the *(generalized) Ahmed integral* of parameter $p$, $q$ and $r$ by

\begin{align*} A(p, q, r) := \int_{0}^{1} \frac{\arctan q \sqrt{p^{2}x^{2} + 1}}{q \sqrt{p^{2}x^{2} + 1} } \, \frac{pqr \, dx}{(r^{2} + 1)p^{2} x^{2} + 1}. \end{align*}

Now suppose that $p q r = 1$, and define its complementary parameters as

\begin{align*} \tilde{p} = r \sqrt{\smash{q}^{2} + 1}, \quad \tilde{q} = p \sqrt{\smash{r}^{2} + 1}, \quad \text{and} \quad \tilde{r} = q \sqrt{\smash{p}^{2} + 1}, \tag{2} \end{align*}

Then my guess is that

\begin{align*} A(p, q, r) = \frac{\pi^{2}}{8} + \frac{1}{2} \left\{ \arctan^{2} (1 / \tilde{p} ) - \arctan^{2} ( \tilde{q} ) - \arctan^{2} ( \tilde{r} ) \right\}. \end{align*}

Plugging the values $(p, q, r) = (1/\sqrt{2}, \sqrt{2}, 1)$, the corresponding complementary parameters become $(\tilde{p}, \tilde{q}, \tilde{r}) = (\sqrt{3}, 1, \sqrt{3})$. Then for these choices, the original Ahmed's integral $\text{(1)}$ is retrieved:

\begin{align*} \int_{0}^{1} \frac{\arctan \sqrt{x^{2} + 2} }{\sqrt{x^{2} + 2} } \, \frac{dx}{x^{2} + 1} &= \frac{\pi^{2}}{8} + \frac{1}{2} \left\{ \arctan^{2} \frac{1}{\sqrt{3}} - \arctan^{2} 1 - \arctan^{2} \sqrt{3} \right\} \\ &= \frac{5\pi^{2}}{96}. \end{align*}

In fact, I have a more generalized conjecture involving dilogarithms depending on complementary parameters. But since this specialized version is sufficiently daunting, I won't deal with it here.

Unfortunately, proving this relation is not successful so far. I just heuristically calculated and made some ansatz to reach this form. Can you help me improve the situation by proving this or providing references to some known results?

**EDIT.** I finally succeeded in proving a general formula: let $k = pqr$ and complementary parameters as in $\text{(2)}$. Then whenever $k \leq 1$, we have

\begin{align*} A(p, q, r) &= 2\chi_{2}(k) - k \arctan (\tilde{p}) \arctan \left( \frac{k}{\tilde{p}} \right) \\ &\quad + \frac{k}{2} \int_{0}^{1} \frac{1}{1-k^{2}x^{2}} \log\left( \frac{1+\tilde{p}^{2}x^{2}}{1+\tilde{p}^{2}} \times \frac{1+\tilde{q}^{2}x^{2}}{1+\tilde{q}^{2}} \times \frac{1+\tilde{r}^{2}x^{2}}{1+\tilde{r}^{2}} \right) \, dx. \end{align*}

Then the proposed conjecture follows as a corollary. I'm planning to gather materials related to the Ahmed's integrals and put into a combined one. You can find an ongoing proof of this formula here.