How to calculate $$ \int_{Q}\left(x_{1}+x_{2}+\ldots+x_{n}\right)^{2} d \lambda_{n} $$ whereas $n \geq 2$ and $$ Q=\left\{\left(x_{1}, \ldots, x_{n}\right) \in \mathbb{R}^{n}: 0 \leq x_{i} \leq 1, i=1, \ldots, n\right\}$$


I know that I have to use induction and Fubini to calculate $$ I(n) = \int\limits_0^1\int\limits_0^1\cdots\int\limits_0^1 \left(x_{1}+x_{2}+\ldots+x_{n}\right)^{2}dx_n\cdots\,dx_2\,dx_1 $$ And I already started to calculate the integrals for $n=2,3,4$ but the numbers I got did not enlighten me and I have no idea for an induction hypothesis. I also exchanged $x$ with $1$ but I still have no clue. Maybe I am doing something wrong. Thanks for help in advance.


Solution 1:

By expanding

$$(x_1 + \cdots + x_n)^2 = \sum_{i = 1}^n x_i^2 + 2\sum_{1\le i < j \le n} x_i x_j$$ we see that $$I(n) = \sum_{i = 1}^n \frac{1}{3} + 2\sum_{1\le i<j \le n} \frac{1}{2}\cdot\frac{1}{2} = \frac{n}{3} + \frac{1}{2} \cdot \frac{n(n-1)}{2} = \frac{n(3n+1)}{12}$$

Alternatively, use the identity $$(x_1 + \cdots + x_n)^2 = (x_1 + \cdots + x_{n-1})^2 + 2x_n(x_1 + \cdots + x_{n-1}) + x_n^2$$ to obtain the recursion $$I(n) = I(n-1) + \frac{n-1}{2} + \frac{1}{3}$$ Since $I(1) = 1/3$, then $$I(n) = \frac{1}{3} + \sum_{j = 1}^{n-1}\left(\frac{j}{2} + \frac{1}{3}\right)$$ which evaluates to $n(3n+1)/12$.