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?

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.
