Closed form of $\int_0^\infty \left(\frac{\arctan x}{x}\right)^ndx$ I know that for $n=1$ the integral is divergent and that for $n=2$ the integral has a closed form. However, I wonder if the general expression has a closed form.
My attempt: $$\int_0^\infty \left(\frac{\arctan(x)}{x}\right)^ndx=\frac{n}{1-n}\int_0^\infty\frac{\arctan^{n-1}(x)}{x^{n-1}(x^2+1)}dx=\frac{n}{1-n}\int_0^{(\frac{\pi}{2})^{n-1}} u^{n-1}\cot^{n-1}\left(u^{1/(n-1)}\right)du$$
I don't know if I'm on the right track here or not but I do not know through what methods to evaluate the last integral. Any help is appreciated.
 A: It wasn't requested, but instead of exact representations the OP might want an asymptotic expression for $n \to \infty.$  This one works well with the technique of Depoissonization.  Make an exponential power series and analyze it asymptotically:
$$ \sum_{n=0}^\infty \frac{y^n}{n!} C_n = \int_0^\infty \exp{\big(\frac{y}{x} \text{arctan}(x) \big)} dx , \quad C_n=\int_0^\infty \Big(\frac{\text{arctan}(x)}{x}\Big)^n dx$$ 
Now $\text{arctan}(x)/x = 1-x^2/3+x^4/5+...$ and with $y$ large and keeping on the first term in the asymptotic expansion
$$ e^{-y} \sum_{n=0}^\infty \frac{y^n}{n!} C_n \sim \int_0^\infty \exp{\big(-y\,\frac{x^2}{3}\big)} dx = \frac{1}{2} \sqrt{\frac{3\pi}{y}}.$$
By Depoissonization we can conclude that
$$ C_n \sim  \frac{1}{2} \sqrt{\frac{3\pi}{n}} .$$
For $n=50$ the asymptotic expression is within 2% of the value from a numerical integration.
A: $$\int_{0}^{+\infty}\left(\frac{\arctan x}{x}\right)^3\,dx \stackrel{x\mapsto\tan\theta}{=}\int_{0}^{\pi/2}\frac{\theta^3\,d\theta}{\tan^3\theta\cos^2\theta}\stackrel{\text{IBP}}{=}-\frac{\pi^3}{16}+\frac{3}{2}\int_{0}^{\pi/2}\frac{\theta^2\,d\theta}{\sin^2\theta}$$
and in general the computation of the wanted integrals boils down to the computation of $\int_{0}^{\pi/2}\left(\frac{\theta}{\sin\theta}\right)^m\,d\theta$ or the computation of $\oint_\gamma \frac{\log^m z}{z\left(z-\frac{1}{z}\right)^m}\,dz$ where $\gamma$ is the quarter circle joining $1$ and $i$. The integration of $\frac{\log^m z}{z\left(z-\frac{1}{z}\right)^m}$ along the segments joining $0$ and $1$ or $0$ and $i$ can be simply performed through Maclaurin series; in particular the wanted integrals can be always expressed in terms of standard or alternating Euler sums.
A: Here is a general answer: Let $m \geq n \geq 2$ be integers, and define
$$ \mathcal{I}(m,n) = \int_{0}^{\infty} \frac{\arctan^m x}{x^n} \, dx. $$
Our aim is to obtain a manageable formula for $\mathcal{I}(m,n)$.

Proposition. $\mathcal{I}(m,n)$ equlas
  $$ \begin{cases}
\displaystyle
(-1)^{\frac{m-n,}{2}} \int_{0}^{\infty} \frac{\sinh^{n-2} x}{\cosh^n x} \cdot \operatorname{Im} \left( x + \frac{i\pi}{2} \right)^{m}  \, dx, & m+n \ \text{even} \\
\displaystyle
(-1)^{\frac{m-n-1}{2}} \int_{0}^{\infty} \frac{\sinh^{n-2} x}{\cosh^n x} \cdot \frac{2 \log \tanh x}{\pi} \cdot \operatorname{Im} \left( x + \frac{i\pi}{2} \right)^{m}  \, dx, & m+n \ \text{odd}
\end{cases}
$$

When $m+n$ is even, this integral can be written as a linear combination of values of the Dirichlet $\eta$-function using the well-known formula $\int_{0}^{\infty} x^{s-1}/(e^x + 1) \, dx = \Gamma(s)\eta(s)$.
Here is a Mathematica code for numerical verification:
{m, n} = {7, 5};
NIntegrate[ArcTan[x]^m/x^n, {x, 0, Infinity}, WorkingPrecision -> 20]
(-1)^((m - n)/2) Im[NIntegrate[ Tanh[x]^(n - 2) Sech[x]^2 (x + (I Pi)/2)^m, {x, 0, Infinity}, WorkingPrecision -> 20]]
Clear[m, n];


Proof. We only prove the case where $m+n$ is even. (The proof for the other case goes almost the same.) We begin by noticing that
$$ \arctan x = \int_{0}^{1} \frac{x \, ds}{1+x^2s^2} = \lim_{\delta \to 0^+} \int_{i\delta}^{1+i\delta} \frac{x \, ds}{1+x^2s^2}. $$
We temporarily fix $0 < \delta_1 < \cdots < \delta_m$ and consider the line segment $L_k$ beginning at $i\delta_k$ and ending at $1+i\delta_k$. Writing $\vec{\delta} = (\delta_1, \cdots, \delta_k)$, we consider the following perturbed version of $\mathcal{I}(m,n)$.
$$ \mathcal{I}_{\vec{\delta}}(m,n) := \int_{0}^{\infty} x^{m-n} \prod_{k=1}^{m} \left( \int_{L_k} \frac{dz_k}{1+x^2 z_k^2} \right) \, dx. $$
As $\vec{\delta} \to 0$, this converges to the original integral $\mathcal{I}(m,n)$. Now, we invoke the following lemma.

Lemma. If $\alpha_1, \cdots, \alpha_n$ are distinct complex numbers and $m \in \{0, \cdots,n-1\}$, then
  $$ \frac{x^m}{(1-\alpha_1 x)\cdots (1-\alpha_n x)} = \sum_{k=1}^{n} \frac{\alpha_k^{n-1-m}}{1-\alpha_k x} \prod_{l \neq k} \frac{1}{\alpha_k - \alpha_l}. $$

Since $0 \leq m-n < 2m$, we can apply Lemma to write
$$ \frac{x^{m-n}}{\prod_{k=1}^{m} (1+z_k^2 x^2)}
= \frac{x^{m-n}}{\prod_{k=1}^{m} (1 - i z_k x)(1 + i z_k x)}
= (-1)^{\frac{m-n}{2}} \sum_{k=1}^{m} \frac{z_k^{m+n-2}}{1+z_k^2 x^2} \prod_{l \neq k} \frac{1}{z_k^2 - z_l^2}. $$
(At this step the assumption that $m+n$ is even is utilized.) Plugging this back to $\mathcal{I}_{\vec{\delta}}(m,n)$ and interchanging the order of integration, we obtain
$$ \mathcal{I}_{\vec{\delta}}(m,n)
:= (-1)^{\frac{m-n}{2}} \frac{\pi}{2} \sum_{k=1}^{m} \int_{L_1} dz_1 \cdots \int_{L_n} dz_n \left( z_k^{m+n-3} \prod_{l \neq k} \frac{1}{z_k^2 - z_l^2} \right). $$
Now for $l \neq k$, writing $z_k = s_k + i\delta_k$ shows
\begin{align*}
\int_{L_l} \frac{dz_l}{z_k^2 - z_l^2}
&= \frac{1}{2z_k}\left( \log(z_k + 1 + i\delta_l) - \log(z_k + i\delta_l) - \log(z_k - 1 - i\delta_l) + \log(z_k - i\delta_l) \right) \\
&\xrightarrow[\vec{\delta} \to 0]{}
\frac{1}{2s_k}\left( \log\left(\frac{1 + s_k}{1 - s_k} \right) + i\pi\operatorname{sign}(l-k) \right)
\end{align*}
Plugging this back,
\begin{align*}
\mathcal{I}(m,n)
&= (-1)^{\frac{m-n}{2}} \frac{\pi}{2} \sum_{k=1}^{m} \int_{0}^{1} s^{n-2} \left( \operatorname{artanh}(s) - \frac{i\pi}{2} \right)^{k-1}\left( \operatorname{artanh}(s) + \frac{i\pi}{2} \right)^{n-k} \, ds \\
&= (-1)^{\frac{m-n}{2}} \operatorname{Im} \int_{0}^{1} s^{n-2} \left( \operatorname{artanh}(s) + \frac{i\pi}{2} \right)^{m} \, ds \\
&= (-1)^{\frac{m-n}{2}} \operatorname{Im} \int_{0}^{\infty} \frac{\sinh^{n-2} x}{\cosh^n x} \left( x + \frac{i\pi}{2} \right)^{m}  \, dx,
\end{align*}
completing the proof.
A: As user90369 doesn't have the time apparently I thought I repesent my own solution explicitly for those interested.
Starting with 
\begin{align}
\int_{-\pi/2}^{\pi/2} \frac{x^n \left(\cos x\right)^{n-2}}{\left(\sin x\right)^n} \, {\rm d}x &\stackrel{y=2x}{=} 2^{-n+1} \, i^n \int_{-\pi}^{\pi} y^n \, e^{-iy} \, \frac{\left(1+e^{-iy}\right)^{n-2}}{\left(1-e^{-iy}\right)^n} \, {\rm d}y \\
&\stackrel{z=e^{iy}}{=} -i \, 2^{-n+1} \int_\gamma \left(\log z\right)^n \, \frac{(z+1)^{n-2}}{(z-1)^n} \, {\rm d}z
\end{align}
where $\gamma$ is the unit circle in positive direction. The integrand is holomorph off the negative real line and the contour can be deformed to only enclose the cut $[-1,0]$.
Then
\begin{align}
&=i \, 2^{-n+1} (-1)^n \int_0^1 \frac{(1-z)^{n-2}}{(1+z)^n} \, \left\{ \left(\log z + i\pi\right)^n - \left(\log z - i\pi\right)^n \right\} {\rm d}z \\
&=2^{-n+2} (-1)^{n+1} \sum_{k=0}^n \sum_{p=0}^{n-2} \sum_{q=0}^\infty  \begin{pmatrix} n \\ k \end{pmatrix} \begin{pmatrix} n-2 \\ p \end{pmatrix} \begin{pmatrix} -n \\ q \end{pmatrix} (-1)^p \pi^{n-k} \sin\left(\frac{\pi}{2}(n-k)\right) \\
&\qquad \times \int_0^1 z^{p+q} \, \left( \log z \right)^k \, {\rm d}z
\end{align}
and using the two formulas
\begin{align}
\int_0^1 x^n \, \left(\log x\right)^m \, {\rm d}x &=  \frac{(-1)^m \, m!}{(n+1)^{m+1}} \tag{1} \\
\begin{pmatrix} -n \\ q \end{pmatrix} &= (-1)^q \begin{pmatrix} n+q-1 \\ q \end{pmatrix} = (-1)^q \, \frac{(q+1)\cdots(q+n-1)}{(n-1)!} \\ &= \frac{(-1)^q}{(n-1)!} \sum_{m=0}^{n-1} \left[ {n-1 \atop m} \right] (q+1)^m \tag{2}
\end{align}
with the Stirling numbers of the first kind we arrive at
\begin{align}
=2^{-n+2} (-1)^{n+1} \sum_{k=0}^n \sum_{p=0}^{n-2} \sum_{m=0}^{n-1} \sum_{q=0}^\infty   \begin{pmatrix} n-2 \\ p \end{pmatrix} \left[ {n-1 \atop m} \right]  \frac{(q+1)^m (-1)^{k+p+q} \pi^{n-k} n! \sin\left(\frac{\pi}{2}(n-k)\right)}{(p+q+1)^{k+1} (n-1)! (n-k)!} \, .
\end{align}
Next we reverse the summation $k \rightarrow n-k$ and decompose another time the factor $(q+1)^{m}=(p+q+1-p)^{m}$ in the nominator
\begin{align}
&=-2^{-n+2}\,n \sum_{k=0}^n \sum_{p=0}^{n-2} \sum_{m=0}^{n-1} \sum_{l=0}^m \begin{pmatrix} n-2 \\ p \end{pmatrix} \left[ {n-1 \atop m} \right] \begin{pmatrix} m \\ l \end{pmatrix} (-p)^{m-l} \\
&\qquad \frac{(-\pi)^{k}  \sin\left(\frac{\pi}{2}k\right)}{k!} \sum_{q=0}^\infty \frac{(-1)^{q+p}}{(p+q+1)^{n-k-l+1}} \\
&=-2^{-n+2} \, n \sum_{k=0}^n \sum_{p=0}^{n-2} \sum_{l=0}^{n-1} \sum_{m=l}^{n-1} \begin{pmatrix} n-2 \\ p \end{pmatrix} \left[ {n-1 \atop m} \right] \begin{pmatrix} m \\ l \end{pmatrix} (-p)^{m-l}\\
&\qquad \frac{(-\pi)^{k} \sin\left(\frac{\pi}{2}k\right)}{k!} \left\{ \eta\left(n-k-l+1\right) -\sum_{q=1}^p \frac{(-1)^{q+p}}{(p-q+1)^{n-k-l+1}}  \right\} \tag{3}
\end{align}
where $\eta(s)$ is the Dirichlet Eta-Function.
It seems as if
\begin{align}
&\quad \sum_{p=0}^{n-2} \sum_{q=1}^{p} \sum_{l=0}^{n-1} \sum_{m=l}^{n-1} \begin{pmatrix} n-2 \\ p \end{pmatrix} \left[ {n-1 \atop m} \right] \begin{pmatrix} m \\ l \end{pmatrix} \frac{(-p)^{m-l} (-1)^{q+p}}{(p-q+1)^{n-k-l+1}} \\
&=\sum_{p=0}^{n-2} \sum_{q=1}^{p} \begin{pmatrix} n-2 \\ p \end{pmatrix} \frac{(-1)^{q+p}}{(p-q+1)^{n-k+1}} \sum_{m=0}^{n-1}  \left[ {n-1 \atop m} \right](-q+1)^m \\
&=(-1)^{n-1}(n-1)! \sum_{p=0}^{n-2} \sum_{q=1}^{p} \begin{pmatrix} n-2 \\ p \end{pmatrix} \begin{pmatrix} q-1 \\ n-1 \end{pmatrix} \frac{(-1)^{q+p}}{(p-q+1)^{n-k+1}} \\
&= 0 \, ,
\end{align}
since $q\leq n-2$ and $\begin{pmatrix} n-3 \\ n-1 \end{pmatrix}=0$, so the second term in the curly bracket does not contribute.
Here is a Maple Code of the result (3) for verification:
restart; 
n := 5; 
eta := proc (s) options operator, arrow; limit((1-2^(1-S))*Zeta(S), S = s) end proc; 
r1 := simplify(-2^(-n+2)*n*add(add(add(add(binomial(n-2, p)*Stirling1(n-1, m)*(-1)^(n-1-m)*binomial(m, l)*(-p)^(m-l)*(-Pi)^k*sin((1/2)*Pi*k)*eta(n-k-l+1)/factorial(k), m = l .. n-1), l = 0 .. n-1), p = 0 .. n-2), k = 0 .. n)); 
r2 := simplify(int(x^n*cos(x)^(n-2)/sin(x)^n, x = -(1/2)*Pi .. (1/2)*Pi)); 
evalf([r1, r2])

A: A complete asymptotic expansion for large $n$ follows from Laplace's method:
\begin{align*}
\int_0^{ + \infty } {\left( {\frac{{\arctan t}}{t}} \right)^n \mathrm{d}t} & = \int_0^{ + \infty } {\exp \left( { - n\log \left( {\frac{t}{{\arctan t}}} \right)} \right)\mathrm{d}t}  \sim \frac{1}{2}\sqrt {\frac{{3\pi }}{n}} \sum\limits_{k = 0}^\infty  {\frac{{a_k }}{{n^k }}} \\ & = \frac{1}{2}\sqrt {\frac{{3\pi }}{n}} \left( {1 + \frac{{39}}{{40n}} + \frac{{4763}}{{4480n^2 }} + \frac{{25401}}{{25600n^3 }} + \frac{{13025883}}{{12615680n^4 }} +  \ldots } \right),
\end{align*}
where
$$
a_k  = \left( {\frac{3}{4}} \right)^k \frac{1}{{k!}}\left[ {\frac{{\mathrm{d}^{2k} }}{{\mathrm{d}t^{2k} }}\left( {\frac{{t^2 }}{{3\log \left( {\frac{t}{{\arctan t}}} \right)}}} \right)^{k + 1/2} } \right]_{t = 0} .
$$
