Expectation of a function of a random variable How can I compute 
$E[\sum_{i=1}^{n} (X_i + 1)]$ using only the formula of the expectation of a function of a random variable, and not the linearity of expectation?
 A: This question is instructive because its answer proves that the expected value is a linear operator (even though the variables involved may not be independent).
You have many r.v.'s so the expected value is understood as taken with respect to their joint distribution. Denoting $\mathbf X$ the multivariate vector of the $n$ r.v.'s their joint density can be written as $f_{\mathbf X}(\mathbf x)= f_{X_1,...,X_n}(x_1,...,x_n)$ and their joint support 
$D = S_{X_1} \times ...\times S_{X_n}$
Setting also $\sum_{i=1}^{n} (X_i + 1) = g(\mathbf X)$ We can start by writing
$$E[\sum_{i=1}^{n} (X_i + 1)] = \int_D g(\mathbf x)f_{\mathbf X}(\mathbf x)d\mathbf x$$.
Under convergence regularity conditions we can decompose into 
$$E[\sum_{i=1}^{n} (X_i + 1)] = \int_{S_{X_n}}...\int_{S_{X_1}}\left[\sum_{i=1}^{n} x_i + n\right]f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n $$
\
$$=\int_{S_{X_n}}...\int_{S_{X_1}}\left[\sum_{i=1}^{n} x_i \right]f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n \\ + n\int_{S_{X_n}}...\int_{S_{X_1}}f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n$$
\
$$ = \int_{S_{X_n}}...\int_{S_{X_1}}x_1f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n \\ + ...\\ +\int_{S_{X_n}}...\int_{S_{X_1}}x_nf_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n \\ +n\int_{S_{X_n}}...\int_{S_{X_1}}f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n$$
First, regarding the last integral note that $\int_{S_{X_1}}f_{X_1,...,X_n} (x_1,...,x_n)dx_1 = f_{X_2,...,X_n}(x_2,...,x_n)$, i.e. it is the "marginal-joint " density of $X_2,...,X_n$ since $X_1$ has been integrated out. Then $\int_{S_{X_2}}f_{X_2,...,X_n} (x_2,...,x_n)dx_2 = f_{X_3,...,X_n}(x_3,...,x_n)$ e.t.c. We will end up with 
$$ n\int_{S_{X_n}}...\int_{S_{X_1}}f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n = n\int_{S_{X_n}}f_{X_n}(x_n)dx_n = n\cdot 1 = n \qquad [1]$$
For all other multiple integrals we can re-arrange the order of integration so that, in each, the outer integration is with respect to the variable that is outside the joint density. Namely,
$$\int_{S_{X_n}}...\int_{S_{X_1}}x_1f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_n = \\\int_{S_{X_1}}x_1\int_{S_{X_n}}...\int_{S_{X_2}}f_{X_1,...,X_n}(x_1,...,x_n)dx_2...dx_ndx_1$$ 
and in general
$$\int_{S_{X_n}}...\int_{S_{X_j}}...\int_{S_{X_1}}x_jf_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_j...dx_n =$$
$$=\int_{S_{X_j}}x_j\int_{S_{X_n}}...\int_{S_{X_{j-1}}}\int_{S_{X_{j+1}}}...\int_{S_{X_1}}f_{X_1,...,X_n}(x_1,...,x_n)dx_1...dx_{j-1}dx_{j+1}......dx_ndx_j$$
Now, for each multiple integral, we can apply the same variable-by-variable integration as we did in order to derive $[1]$, integrating out each variable one-by-one and obtaining in each step the "joint-marginal" distribution of the other variables. Each multiple integral will end up as $\int_{S_{X_j}}x_jf_{X_j}(x_j)dx_j$.
Bringing it all together we have 
$$E[\sum_{i=1}^{n} (X_i + 1)] = \int_{S_{X_1}}x_1f_{X_1}(x_1)dx_1 +...+\int_{S_{X_n}}x_nf_{X_n}(x_n)dx_n +n $$
$$= E(X_1) + ...+E(X_n) +n $$
