Evaluating $\int_0^1\int_0^1\cdots\int_0^1\frac{n\max\{x_1,x_2,\cdots,x_n\}}{x_1+x_2+\cdots+x_n}dx_1dx_2\cdots dx_n$ I was trying to compute the following integral:
$$I=\int_0^1\int_0^1\cdots \int_0^1 \frac{n \max\{x_1,x_2,\ldots,x_n\}}{x_1+x_2+\ldots+x_n}dx_1dx_2\ldots dx_n.$$
My attempt was: Let $X_1,X_2, \ldots, X_n$ be a collection of i.i.d. uniform random variables on $(0,1)$. Then,
$$I= n\mathbb{E}\left[\frac{\max\{X_1,X_2,\ldots,X_n\}}{X_1+X_2+\ldots+X_n} \right] = n\mathbb{E}\left[\max_{1\leqslant i \leqslant n}\frac{X_i}{X_1+X_2+\ldots+X_n} \right].$$
Now, I understand that
$$\left\{\frac{X_i}{X_1+X_2+\ldots+X_n}\right\}_{1\leqslant i \leqslant n}$$
is an identically distributed sequence of random variables but I don't know how to proceed further. Any further help using either probability or general integral calculus is much appreciated. Thank you very much for your time and attention.
 A: Two answers have already given explicit formulas for $I$. It may be of interest to see the behaviour of $I$ for large $n$, which is not immediate from the expression given by C-RAM. An asymptotic expansion for large $n$ may be derived via Laplace's method applied to the integral representation given by Carl Schildkraut:
\begin{align*}
I &= (n - 1)\int_0^{ + \infty } {\left( {\frac{{1 - {\rm e}^{ - u} }}{u}} \right)^n {\rm d}u}  = (n - 1)\int_0^{ + \infty } {\exp \left( { - n\log \left( {\frac{u}{{1 - {\rm e}^{ - u} }}} \right)} \right){\rm d}u} \\ &
\sim \frac{{n - 1}}{n}\sum\limits_{k = 0}^\infty  {\frac{{a_k }}{{n^k }}}  = 2 + \sum\limits_{k = 1}^\infty  {\frac{{b_k }}{{n^k }}}  = 2 - \frac{4}{{3n}} + \frac{8}{{45n^3 }} + \frac{{56}}{{135n^4 }} + \frac{{152}}{{189n^5 }} + \frac{{1256}}{{945n^6 }} +  \ldots ,
\end{align*}
where $b_k  = a_k  - a_{k - 1}$ and
$$
a_k  = \left[ {\frac{{{\rm d}^k }}{{{\rm d}u^k }}\left( {\frac{u}{{\log \left( {\frac{u}{{1 - {\rm e}^{ - u} }}} \right)}}} \right)^{k + 1} } \right]_{u = 0} = \left[ {\frac{{{\rm d}^k }}{{{\rm d}u^k }}\left( {\frac{u}{{\frac{u}{2} - \log \left( {\frac{{\sinh (u/2)}}{{u/2}}} \right)}}} \right)^{k + 1} } \right]_{u = 0}.
$$
Using the known power series of $\log(\sinh (z)/z)$, it may be shown that
$$
a_k  = \sum\limits_{m = 0}^k 2^{m + k + 1} \frac{{(m + k)!}}{{m!}}B_{k,m} \!\left( {\frac{1}{{24}},0, - \frac{1}{{2880}}, \ldots ,\frac{{B_{k - m + 2} }}{{(k - m + 2)(k - m + 2)!}}} \right) ,
$$
where $B_{k,m}$ are the ordinary Bell polynomials and $B_m$ are the Bernoulli numbers.
A: Let $n\geq 2$. First, note that $x_1,x_2,\cdots,x_n$ are equally distributed, and each has a $1/n$ chance of being the largest element, so your integral is equal to $n$ times the integral over the region of $[0,1]^n$ where $x_n$ is the largest element of $x_1,x_2,\cdots, x_n$. More explicitly, we have that
\begin{equation}
\begin{split}
I&=n\int_0^1\int_0^1\cdots\int_0^1\frac{\max\{x_1,x_2,\cdots,x_n\}}{x_1+x_2+\cdots+x_n}dx_1dx_2\cdots dx_n\\
&=n^2\int_0^1\int_0^{x_n}\cdots\int_0^{x_n}\frac{x_n}{x_1+x_2+\cdots+x_n}dx_1dx_2\cdots dx_n\\
&=n^2\int_0^1\int_0^{x_n}\cdots\int_0^{x_n}\frac{1}{x_1/x_n+x_2/x_n+\cdots+1}dx_1dx_2\cdots dx_n\\
&=n^2\int_0^1\int_0^1\cdots\int_0^1\frac{x_n^{n-1}}{x_1+x_2+\cdots+1}dx_1dx_2\cdots dx_n\\
&=n^2\left[\int_0^1 x_n^{n-1}dx_n\right]\left[\int_0^1\cdots\int_0^1\frac{1}{x_1+x_2+\cdots+1}dx_1dx_2\cdots dx_{n-1}\right]\\
&=n\int_0^1\cdots\int_0^1\frac{1}{x_1+x_2+\cdots+1}dx_1dx_2\cdots dx_{n-1}\\
\end{split}
\end{equation}
Letting $A_k(u)$ be the PDF of the distribution for the sum $X_1+X_2+\cdots+X_k$ of $k$ uniform variables on $[0,1]$ (known as the Irwin-Hall distribution), we may simplify
$$I=n\int_0^{n-1} \frac{A_{n-1}(u)}{u+1}du$$
In fact, $A_{n-1}(u)$ has the explicit closed form
$$A_{n-1}(u)=\frac{1}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}(u-k)^{n-2}H(u-k)$$
where
$$H(x)=
\begin{cases}
1,&x\geq 0\\
0,&x<0\\
\end{cases}$$
is the Heavside step function.
\begin{equation}
\begin{split}
I&=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_0^{n-1}\frac{(u-k)^{n-2}}{u+1}H(u-k)du\\
&=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_k^{n-1}\frac{(u-k)^{n-2}}{u+1}du\\
&=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\int_k^{n-1}\sum_{m=0}^{n-2}(-1)^m(u+1)^{n-3-m}(k+1)^mdu\\
&=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}\left[(-1)^n(k+1)^{n-2} \log(u+1)+\sum_{m=0}^{n-3}(-1)^m\frac{(u+1)^{n-2-m}}{n-2-m}(k+1)^m\right]_{u=k}^{n-1}\\
&=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^k{n-1\choose k}[(-1)^{n+1}(k+1)^{n-2}\log(k+1)+P_n(k)]\\
\end{split}
\end{equation}
Where $P_n(k)$ is a polynomial in $k$ of degree $n-2$. It is well known that for any function $f(x)$, the $p$-th forward difference of $f(x)$ at $0$ is given by
$$\Delta^p[f](0)=\sum_{k=0}^p(-1)^{p-k}{p\choose k}f(k)$$
so since $P_n(k)$ has degree $n-2$, then
$$0=\Delta^{n-1}[P_n](0)=\sum_{k=0}^{n-1}(-1)^{n-k-1}{n-1\choose k}P_n(k)$$
We may therefore simplify to get
$$I=\frac{n}{(n-2)!}\sum_{k=0}^{n-1}(-1)^{n-k-1}{n-1\choose k}(k+1)^{n-2}\log(k+1)$$
Some reindexing and algebraic manipulation brings us to our final closed form
$$\boxed{I=\frac{1}{(n-2)!}\sum_{k=2}^n(-1)^{n-k}{n\choose k}k^{n-1}\log(k)}$$
for $n\geq 2$, and $I=1$ for $n=1$.
A: Here's a start, which reduces the problem to a one-variable integral of a simple function, and may be of interest even though I don't know how to finish it yet.

For $n=1$, the integral is clearly $1$. Now, let $c_n=\mathbb E[1/(X_1+\cdots+X_n)]$ where $X_1,\dots,X_n\sim\operatorname{Unif}([0,1])$ independently. Write $X=X_1+\cdots+X_n$ for notational simplicity. We have
$$I_n=n\mathbb E\left[\frac{\max X_i}X\right]=nc_n-n\mathbb E\left[\frac{1-\max X_i}X\right].$$
Note that $1-\max X_i$ is the probability that, if $T\sim\operatorname{Unif}([0,1])$, $T>X_1,\dots,X_n$. This means that
\begin{align*}
I_n&=nc_n-n\int_0^1\mathbb E\left[\frac{[t>X_1][t>X_2]\cdots[t>X_n]}X\right]dt\\&=nc_n-n\int_0^1t^n\mathbb E\left[\frac1X\bigg|X_1,\dots,X_n<t\right]dt.
\end{align*}
Conditioned on being less than $t$, each $X_i$ follows the distribution $\operatorname{Unif}([0,1])$, and so $\mathbb E[1/X\mid X_1,\dots,X_n<t]=t^{-1}c_n$, giving
$$I_n=nc_n-n\int_0^1 t^{n-1}c_ndt=(n-1)c_n.$$
So, it suffices to compute $c_n$, i.e.
$$c_n=\int_{[0,1]^n}\frac1{x_1+\cdots+x_n}d\mathbf x.$$
We once again do this by way of an additional variable:
\begin{align*}
c_n&=\int_{[0,1]^n}\frac1{x_1+\cdots+x_n}d\mathbf x\\
&=\int_{[0,1]^n}\int_0^1 t^{x_1+\cdots+x_n}\frac{dt}td\mathbf x\\
&=\int_0^1 \left(\int_0^1 t^x dx\right)^n\frac{dt}t=\int_0^1 \left(\frac{t-1}{\log t}\right)^n\frac{dt}t=\int_0^1 \frac{(1-t)^n}{t\log(1/t)^n}dt.
\end{align*}
Substituting $u=\log(1/t)$, so that $du=-dt/t$, we have
$$c_n=\int_0^\infty \left(\frac{1-e^{-u}}u\right)^ndu.$$
So
$$\boxed{I=(n-1)\int_0^\infty\left(\frac{1-e^{-u}}u\right)^ndu}.$$
