# How to calculate $\int_0^1\cdots\int_0^1\frac{1}{x_1+x_2+\cdots+x_n+1}dx_1\cdots dx_n$

I met an integral $$\int_0^1\cdots\int_0^1\frac{1}{x_1+x_2+\cdots+x_n+1}dx_1\cdots dx_n$$ I calculated $n=1,2,3$ and made an induction! then i got the result: $$\frac{1}{(n-1)!}\sum_{k=1}^{n}(-1)^{n-k}\binom{n}{k}(1+k)^{n-1}\ln(1+k)$$

but how could i get the result without induction? who can help ,thanks!

• I don't think you can do much better than the inductive proof for brevity – Omnomnomnom Dec 8 '15 at 15:29

Your result follows from the fact that the sum of $n$ independent, uniformly distributed random variables over $[0,1]$, has a well-known characteristic function. That fact follows from Fourier inversion.

• Thanks! The result seems very similar! And which book can tell me more details about he Uniform sum distribution? – smallsmallice Dec 9 '15 at 4:13

Yes, you are right ,but if you change $k$ from $0$ to $n$ may be better , though the value does not change.

\boxed{\begin{aligned} \bigstar \int_0^1 \cdots \int_0^1 {\frac{1}{{{x_1} + {x_2} + \cdots + {x_n} + 1}}} d{x_1} \cdots d{x_n} \hfill \\ = \frac{{{{( - 1)}^n}}}{{(n - 1)!}}\sum\limits_{i = 0}^n {{{( - 1)}^i}} {(i + 1)^{n - 1}}\log (i + 1)\left( \begin{gathered} n \\ i \\ \end{gathered} \right) \end{aligned}}

Mathematica Code:

IMethod[n_]:=Integrate[(1+Sum[Subscript[x,i],{i,1,n}])^(-1),##]&@@Array[{Subscript[x,#],0,1}&,n] JMethod[n_]:=(-1)^n Sum[(-1)^i Binomial[n,i](1+i)^(n-1)Log[1+i],{i,0,n}]/(n-1)! FullSimplify@Table[IMethod[i]-JMethod[i],{i,1,3}]

Let ${P_{j,n}} = \sum\limits_{i = j}^n {{x_i}}$ , the process can be written as follows:

\begin{aligned} {I_0}: &= \int_0^1 \cdots \int_0^1 {\int_0^1 {\int_0^1 {\int_0^1 {\frac{1}{{1 + {x_1} + {P_{2,n}}}}} } } } {\text{d}}{x_1}\;{\text{d}}{x_2}\;{\text{d}}{x_3}\;{\text{d}}{x_4} \cdots {\text{d}}{x_n}\\ {I_1}: &= \int_0^1 \cdots \int_0^1 {\int_0^1 {\int_0^1 {\ln \left[ {1 + \frac{1}{{1 + {x_2} + {P_{3,n}}}}} \right]} } } {\text{d}}{x_2}\;{\text{d}}{x_3}\;{\text{d}}{x_4} \cdots {\text{d}}{x_n}\\ {I_2}: &= \frac{1}{{1!}}\int_0^1 \cdots \int_0^1 {\int_0^1 {\sum\limits_{i = 0} {{{( - 1)}^i}C(2,i){{(1 + i + {x_3} + {P_{4,n}})}}\ln \left[ {1 + i + {x_3} + {P_{4,n}}} \right]} } } {\text{d}}{x_3}\;{\text{d}}{x_4} \cdots\\ {I_3}: &= - \frac{1}{{2!}}\int_0^1 \cdots \int_0^1 {\sum\limits_{i = 0}^2 {{{( - 1)}^i}C(3,i){{(1 + i + {x_4} + {P_{5,n}})}^2}\ln \left[ {1 + i + {x_4} + {P_{5,n}}} \right]} } {\text{d}}{x_4} \cdots {\text{d}}{x_n}\\ {I_{2 \leqslant j \leqslant n - 1}}: &= \frac{{{{( - 1)}^j}}}{{(j - 1)!}}\int_0^1 \cdots \int_0^1 {\sum\limits_{i = 0}^j {{{( - 1)}^i}C(j,i){{(1 + i + {x_j} + {P_{j + 1,n}})}^{j - 1}}\ln \left[ {1 + i + {x_j} + {P_{j + 1,n}}} \right]} } {\text{d}}{x_{j + 1}}\\ &= \cdots \\ {I_{n - 1}}: &= \frac{{{{( - 1)}^{n - 1}}}}{{(n - 2)!}}\int_0^1 {\sum\limits_{i = 1}^{n - 1} {{{( - 1)}^i}C(n - 1,i){{(1 + i + {x_n})}^{n - 2}}\ln \left[ {1 + i + {x_n}} \right]} } {\text{d}}{x_n}\\ {I_n}: &= \frac{{{{( - 1)}^n}}}{{(n - 1)!}}\sum\limits_{i = 0}^n {{{( - 1)}^i}C(n,i){{(1 + i)}^{n - 1}}\ln \left[ {1 + i} \right]} \end{aligned}

Attention:${I_n}$ means the part in the sign of integration , from $\sum$ to $ln$. $C(n,k)$ means $\left( \begin{gathered} n \\ k \\ \end{gathered} \right)$ , because the second one is hard to input as $\LaTeX$

I will explain this for several parts:

Part I : $I_0 \to I_1$

$$\int_0^1 {{I_0}{\text{d}}{x_1}} = \int_0^1 {\frac{1}{{1 + {x_1} + \left( {{x_2} + {P_{3,n}}} \right)}}{\text{d}}{x_1}} = \ln \left[ {1 + \frac{1}{{1 + \left( {{x_2} + {P_{3,n}}} \right)}}} \right] = {I_1}$$

Proof:

$P_{j,n}$ just a constant , and then ... err ... it is ... obviously:

\begin{aligned} \int {\frac{1}{{\left( {{P_{3,n}} + {x_2}} \right) + {x_1} + 1}}} {\mkern 1mu} d{x_1} &= \log \left( {{P_{3,n}} + {x_2} + {x_1} + 1} \right)\\ \int_0^1 {{I_0}{\text{d}}{x_1}} &= \left. {\log \left( {{P_{3,n}} + {x_2} + {x_1} + 1} \right)} \right|_0^1 \\ &= \log \left( {{P_{3,n}} + {x_2} + 2} \right) - \log \left( {{P_{3,n}} + {x_2} + 1} \right) \\ &= \log \frac{{{P_{3,n}} + {x_2} + 2}}{{{P_{3,n}} + {x_2} + 1}} \\ &= \log \left[ {1 + \frac{1}{{1 + \left( {{x_2} + {P_{3,n}}} \right)}}} \right] = I_1 \quad\square \end{aligned}

Part II : $I_1 \to I_2$

$$\int_0^1 {\ln \left[ {1 + \frac{1}{{1 + {x_2} + P}}} \right]{\text{d}}{x_2}} = \sum\limits_{i = 0} {{{( - 1)}^i}C(2,i){{\left( {1 + i + P} \right)}^2}\ln \left[ {1 + i + P} \right]}$$

Prove:

\begin{aligned} \int_0^1 {{I_1}{\text{d}}{x_2}} &= \left[ {\log (P + 3) + (P + 2) {\color{Red} {\log \left( {\frac{{P + 3}}{{P + 2}}} \right)}} } \right] - \left[ {\log (P + 2) + (P + 1) {\color{Red} {\log \left( {\frac{{P + 2}}{{P + 1}}} \right)}} }\right]\\ &= \left[ {\log (P + 3) + (P + 2){\color{Red} {\left( {\log \left( {P + 3} \right) - \log \left( {P + 2} \right)} \right)}}} \right]\\ &- \left[ {\log (P + 2) + (P + 1){\color{Red} {\left( {\log \left( {P + 2} \right) - \log \left( {P + 1} \right)} \right)}}} \right]\\ &= {(P + 1)}\log (P + 1) - 2{(P + 2)}\log (P + 2) + {(P + 3)}\log (P + 3)\\ &= \sum\limits_{i = 0}^2 {{{( - 1)}^i}C(2,i){{\left( {1 + i + P} \right)}}\ln \left[ {1 + i + P} \right]} \quad \square \end{aligned}

Prove it is quite easy , but find it can be written as this sum is not easy , and this is the key to solve the question !

Part III : $I_{j} \to I_{j+1}$

\begin{aligned} \int_0^1 {{I_{j - 1}}{\text{d}}{x_j}} &= \int_0^1 {\sum\limits_{i = 0}^{j - 1} {{{( - 1)}^i}C(j - 1,i){{(P + i + P + {x_j})}^{j - 2}}\ln \left[ {P + i + {x_j}} \right]} } {\text{d}}{x_j} \hfill \\ &= \frac{{ - 1}}{{j - 1}}\sum\limits_{i = 0}^j {{{( - 1)}^i}C(j,i){{(i + P)}^{j - 1}}\ln \left[ {i + P} \right]} = {I_j} \end{aligned}

Proof:

\begin{aligned} &\quad\ {\int {\left( {i + {x_j} + P} \right)} ^{j - 2}}\log \left( {i + {x_j} + P} \right){\mkern 1mu} d{x_j} = \frac{{{{\left( {i + {x_j} + P} \right)}^{j - 1}}}}{{{{(j - 1)}^2}}}\left( {(j - 1)\log \left( {i + {x_j} + P} \right) - 1} \right)\\ \int_0^1 {{I_{j - 1}}{\text{d}}{x_j}} &= \int_0^1 {\sum\limits_{i = 0}^{j - 1} {{{( - 1)}^i}C(j - 1,i){{(P + i + P + {x_j})}^{j - 2}}\ln \left[ {P + i + {x_j}} \right]} } {\text{d}}{x_j}\\ &= \sum\limits_{i = 0}^{j - 1} {{{( - 1)}^i}C(j - 1,i)\int_0^1 {{{(P + i + {x_j})}^{j - 2}}\ln \left[ {P + i + {x_j}} \right]} } {\text{d}}{x_j}\\ &= \sum\limits_{i = 3}^{j - 1} {{{( - 1)}^i}C(j - 1,i)\left[ {\frac{{Some(i)}}{{{{(j - 1)}^2}}}} \right]} + \sum\limits_{i = 0}^2 {{{( - 1)}^i}C(j,i)\left[ {\frac{{Some(i)}}{{{{(j - 1)}^2}}}} \right]} \\ &= \cdots \\ &= \sum\limits_{i = 3}^j {Some(i)} + P\log \left( {\frac{{1 + 1}}{P}} \right) + (P + 2)(\log (P + 1) - \log (P + 2))\\ &= \frac{{ - 1}}{{j - 1}}\sum\limits_{i = 0}^j {{{( - 1)}^i}C(j,i){{(i + P)}^{j - 1}}\ln \left[ {i + P} \right]} = {I_j} \end{aligned}

It is important , but I am sorry that it is too long to input , but here is a Mathematica code instead.

(*From 3 to j-1*) FullSimplify@Function[j,Sum[Integrate[(i+P+Subscript[x,j])^(j-2)Log[P+i+Subscript[x,j]],{Subscript[x,j],0,1},Assumptions->i+P>0](-1)^i Binomial[j-1,i],{i,0,j-1}]]@4 Function[j,-Sum[(-1)^(i)Binomial[j,i](i+P)^(j-1)Log[i+P],{i,0,j}]/(j-1)]@4