Computing $\int_{0}^{+\infty}\arctan\left(\frac{1}{x^n}\right)\,\mathrm{d}x$ Let $n \in (1,+\infty)$, I've shown that the function
$$
I(n)=\int_{0}^{+\infty}\arctan\left(\frac{1}{x^n}\right)\,\mathrm{d}x
$$
is defined on $(1,+\infty)$ and that it can be expressed by
$$
I(n)=\frac{1}{n}\int_{0}^{+\infty}\frac{\arctan\left(x\right)}{x^{(n+1)/n}}\,\mathrm{d}x
$$
I wanted to know if there was a way to compute this kind of integral. I know that
$$
I\left(2\right)=\frac{\pi}{\sqrt{2}}, \quad I\left(3\right)=\frac{\pi}{\sqrt{3}}.
$$
Despite that I did not manage to prove it, it was starting well to find a beautiful formula however it becomes difficult to compute for odd integer value of $n$ and gives strange value for even integer value.
Any help?
 A: Another solution is to invoke the formula
$$ \forall 0 < m < n \ : \quad \int_{0}^{\infty} \frac{x^{m-1}}{1+x^n} \, dx
= \frac{\pi}{n}\csc\left(\frac{\pi m}{n}\right) \tag{1} $$
whose proof can be found here. Indeed,
\begin{align*}
I(n)
&= \int_{0}^{\infty} \frac{\arctan(x^n)}{x^2} \, dx \tag{$x\mapsto 1/x$} \\
&= \left[-\frac{1}{x}\arctan(x^n) \right]_{x=0}^{x=\infty}
+ \int_{0}^{\infty} \frac{nx^{n-2}}{1 + x^{2n}} \, dx \tag{IbP} \\
&= n \cdot \frac{\pi}{2n}\csc\left(\frac{\pi (n-1)}{2n}\right) \tag{by (1)} \\
&= \frac{\pi}{2}\sec\left(\frac{\pi}{2n}\right).
\end{align*}
A: It is:
$$I(n)=\color{red}{\int_0^{\infty } \tan ^{-1}\left(\frac{1}{x^n}\right) \, dx}=\\\int_0^{\infty } \mathcal{L}_a^{-1}\left[\tan ^{-1}\left(\frac{a}{x^n}\right)\right](s) \, dx=\\\mathcal{L}_s\left[\int_0^{\infty } \left(\frac{\pi  \delta (s)}{2}-\frac{\sin \left(s x^n\right)}{s}\right) \,
   dx\right](1)=\\\mathcal{L}_s\left[-s^{-1-\frac{1}{n}}
   \Gamma \left(1+\frac{1}{n}\right) \sin \left(\frac{\pi }{2 n}\right)\right](1)=\\-\Gamma \left(1+\frac{1}{n}\right)
   \Gamma \left(-\frac{1}{n}\right) \sin \left(\frac{\pi }{2 n}\right)=\\\color{red}{\frac{1}{2} \pi  \sec \left(\frac{\pi }{2
   n}\right)}$$
A: Here is yet another approach that uses Feynman's trick of differentiating under the integral sign.
We begin by enforcing a substitution of $x \mapsto x^{1/n}$. This gives
$$\int_0^\infty \tan^{-1} \left (\frac{1}{x^n} \right ) \, dx = \frac{1}{n} \int_0^\infty \frac{\tan^{-1} x}{x^{1 + \frac{1}{n}}} \, dx, \quad n > 1.$$
Now let
$$I(a) = \frac{1}{n} \int_0^\infty \frac{\tan^{-1} (ax)}{x^{1 + \frac{1}{n}}}  \, dx, \quad a > 0.$$
Note that $I(0) = 0$ and we are required to find the value of $I(1)$. 
Differentiating with respect to the parameter $a$ yields
$$I'(a) = \frac{1}{n} \int_0^\infty \frac{x^{-1/n}}{1 + a^2 x^2} \, dx,$$
or
$$I'(a) = \frac{a^{\frac{1}{n} - 1}}{2n} \int_0^\infty \frac{t^{-\frac{1}{2n}-\frac{1}{2}}}{1 + t} \, dt,$$
after a substitution of $x \mapsto \sqrt{t}/a$ has been enforced. The integral appearing above can be expressed in terms of Euler's Beta function $\text{B}(x,y)$. Here
\begin{align*}
I'(a) &= \frac{a^{\frac{1}{n} - 1}}{2n} \int_0^\infty \frac{t^{(\frac{1}{2} - \frac{1}{2n}) - 1}}{(1 + t)^{(\frac{1}{2}-\frac{1}{2n}) + (\frac{1}{2} + \frac{1}{2n})}} \, dt\\
&= \frac{a^{\frac{1}{n}-1}}{2n} \text{B} \left (\frac{1}{2} - \frac{1}{2n}, \frac{1}{2} + \frac{1}{2n} \right )\\
&= \frac{a^{\frac{1}{n} - 1}}{2n} \Gamma \left (\frac{1}{2} - \frac{1}{2n} \right ) \Gamma \left (\frac{1}{2} + \frac{1}{2n} \right )\\
&= \frac{a^{\frac{1}{n} - 1}}{2n} \Gamma \left [1 - \left (\frac{1}{2} + \frac{1}{2n} \right ) \right ] \Gamma \left (\frac{1}{2} + \frac{1}{2n} \right )\\
&= \frac{a^{\frac{1}{n} - 1}}{2n} \frac{\pi}{\sin \pi \left (\frac{1}{2} + \frac{1}{2n} \right )} \tag1\\
&= \frac{\pi}{2n} \sec \left (\frac{\pi}{2n} \right ) a^{\frac{1}{n} - 1},
\end{align*}
where in (1) Euler's reflection formula has been used.
So on integrating up with respect to the parameter $a$ we have
\begin{align*}
I(1) &= \int_0^1 I'(a) \, da = \frac{\pi}{2n} \sec \left (\frac{\pi}{2n} \right ) \int_0^1 a^{\frac{1}{n} - 1} \, da = \frac{\pi}{2} \sec \left (\frac{\pi}{2n} \right ) \Big{[} a^{\frac{1}{n}} \Big{]}_0^1
\end{align*}
giving
$$\int_0^\infty \tan^{-1} \left (\frac{1}{x^n} \right ) \, dx = \frac{\pi}{2} \sec \left (\frac{\pi}{2n} \right ),$$
as expected.
