I've played around a little with this integral, and I can straightforwardly evaluate it with a substitution $\tan x\mapsto x$ in terms of the Beta function if the bounds were $(0,\pi /2)$. But for the bounds $(0,\pi /4)$ the substitution takes the bounds to $(0,1)$ which can't be done with the Beta function.
Alternatively, if we substitute $\tan 2x \mapsto x$, we get that $$I(n)=\frac{1}{4}\int\limits_{0}^{\infty}\frac{\left(\sqrt{x^{2}+1}-1\right)^{n}\tan^{-1}x}{x^{n}\left(1-x^{2}\right)}dx=\frac{1}{4}\int\limits_{0}^{\infty}\frac{x^{n}\tan^{-1}x}{\left(1-x^{2}\right)\left(\sqrt{x^{2}+1}+1\right)^{n}}dx$$
I'm wondering if there is a nice expression for this integral.
Side note, I'm only actually interested in what it is for $n\geq1$.
Checking with Wolfram Alpha, it seems that the integral behaves slightly differently for odd and even $n$.
For $n=2k-1$,
| $k$ | $n$ | $I(2k-1)$ |
|---|---|---|
| $1$ | $1$ | $\frac{1}{2}G-\frac{\pi}{8}\ln 2$ |
| $2$ | $3$ | $-\left(\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{1}{4}\pi+\frac{1}{2}\right)$ |
| $3$ | $5$ | $\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{1}{4}\pi+\frac{2}{3}$ |
| $4$ | $7$ | $-\left(\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{1}{3}\pi+\frac{73}{90}\right)$ |
| $5$ | $9$ | $\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{1}{3}\pi+\frac{284}{315}$ |
| $6$ | $11$ | $-\left(\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{23}{60}\pi+\frac{3103}{3150}\right)$ |
| $7$ | $13$ | $\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{23}{60}\pi+\frac{54472}{51975}$ |
| $9$ | $15$ | $-\left(\frac{1}{2}G-\frac{\pi}{8}\ln 2-\frac{44}{105}\pi+\frac{10459489}{9459450}\right)$ |
(where $G$ is Catalan's constant.)
$I(n)$ for odd $n$ takes the form of $(-1)^{k-1}\left(\frac{1}{2}G-\frac{\pi}{8}\ln 2-p_{k}\pi+q_{k}\right)$ where $p$ and $q$ form some kind of sequence of rational numbers.
If we plot a graph of $p_{k}$ (purple) and $q_{k}$ (red) against $k$, we get something that looks like a logarithm but is also not really:
Whereas for $n=2k$,
| $k$ | $n$ | $I(2k)$ |
|---|---|---|
| $1$ | $2$ | $\frac{1}{4}\pi-\frac{1}{32}\pi^{2}-\frac{1}{2}\ln 2$ |
| $2$ | $4$ | $-\left(\frac{1}{6}+\frac{1}{6}\pi-\frac{1}{32}\pi^{2}-\frac{2}{3}\ln2\right)$ |
| $3$ | $6$ | $\frac{13}{60}+\frac{13}{60}\pi-\frac{1}{32}\pi^{2}-\frac{23}{30}\ln 2$ |
| $4$ | $8$ | $-\left(\frac{29}{105}+\frac{19}{105}\pi-\frac{1}{32}\pi^{2}-\frac{88}{105}\ln2\right)$ |
| $5$ | $10$ | $\frac{2333}{7560}+\frac{263}{1260}\pi-\frac{1}{32}\pi^{2}-\frac{563}{630}\ln 2$ |
The first thing I noticed was the denominator. If we make them the same each time, we get
| $k$ | $n$ | $I(2k)$ |
|---|---|---|
| $1$ | $2$ | $\frac{1}{4}\pi-\frac{1}{32}\pi^{2}-\frac{2}{4}\ln 2$ |
| $2$ | $4$ | $-\left(\frac{1}{6}+\frac{1}{6}\pi-\frac{1}{32}\pi^{2}-\frac{4}{6}\ln2\right)$ |
| $3$ | $6$ | $\frac{13}{60}+\frac{13}{60}\pi-\frac{1}{32}\pi^{2}-\frac{46}{60}\ln 2$ |
| $4$ | $8$ | $-\left(\frac{29}{105}+\frac{19}{105}\pi-\frac{1}{32}\pi^{2}-\frac{88}{105}\ln2\right)$ |
| $5$ | $10$ | $\frac{2333}{7560}+\frac{1578}{7560}\pi-\frac{1}{32}\pi^{2}-\frac{6756}{7560}\ln 2$ |
Which indicates that $I(n)$ for even $n$ takes the form of $(-1)^{k-1}\left(-\frac{1}{32}\pi^{2}+\frac{1}{r_{k}}\left(a_{k}+b_{k}\pi-c_{k}\ln{2}\right)\right)$ where $r,a,b,c$ form a sequence in the natural numbers.
Plotting $r$ (black), $b$ (blue) and $c$ (green) against $k$ yields these exponential graphs:

But $a_{1}=0$, and its graph (red) looks like this:
Seems like they're in pairs, but I also fail to see any relation between the numbers at all.
If we plot $\frac{a}{r},\frac{b}{r},\frac{c}{r}$ against $k$, we get
We see that $\frac{b}{r}$ approaches some value around $0.19$.
None of the number sequences mentioned above show up on OEIS.
I have been stuck here for a few days, and any insight would be highly welcomed.
Kisaragi Ayami



