Expected value of $\sum\limits_{i,j=1}^ng(aX_i+bX_j)$? Suppose we have a sequence of identical (but not independent) random variables $\{X_i\}_{i=1}^\infty$ with common pdf $f$ and let $g$ be some function. Then $$\mathbb{E}\big[g(X_i)\big]=\int_\mathbb{R}g(x)f(x)dx.$$
Now let $a$ and $b$ be some nonzero constants. How can we express 
$$\mathbb{E}\bigg[\sum\limits_{i,j=1}^ng(aX_i+bX_j)\bigg]=\sum\limits_{i,j=1}^n\mathbb{E}\bigg[g(aX_i+bX_j)\bigg]$$
in terms of $f$ and $g$?
 A: Let $f_U$ denote the probability density of a random variable $U$ (e.g. $f_{X_i}=f$ in your notation) and let $Z_{ij}:= aX_i + bX_j$. Then
$$
f_{aX_i}(x) = a^{-1}f_{X_i}(a^{-1}x).
$$
If the random variables $X_i$ were independent, you would get for $f_{Z_{ij}}$ the convolution of $f_{aX_i}$ and $f_{bX_j}$,
$$
f_{Z_{ij}}(z)
=
(f_{aX_i}\ast f_{bX_j})(z)
=
\int_{\mathbb R} f_{aX_i}(x)\, f_{bX_j}(z-x)\, \mathrm dx
=
(ab)^{-1}\int_{\mathbb R} f_{X_i}(a^{-1}x)\, f_{X_j}(b^{-1}(z-x))\, \mathrm dx.
$$
Since the random variables $X_i$ are not independent, you will need the conditional density of $X_j$ given $X_i$ or something equivalent. (You need some information on their dependence, right? Otherwise the question is ill-posed..) The formulas are quite similar:
$$
f_{Z_{ij}}(z)
=
\int_{\mathbb R} f_{aX_i}(x)\, f_{bX_j \mid aX_i = x}(z-x)\, \mathrm dx
=
(ab)^{-1}\int_{\mathbb R} f_{X_i}(a^{-1}x)\, f_{X_j|X_i = a^{-1}x}(b^{-1}(z-x))\, \mathrm dx.
$$
The result becomes
$$
\mathbb{E}\bigg[\sum\limits_{i,j=1}^ng(aX_i+bX_j)\bigg]
=
\sum\limits_{i,j=1}^n\mathbb{E}\bigg[g(aX_i+bX_j)\bigg]
=
\sum\limits_{i,j=1}^n \int_{\mathbb R} g(z)f_{Z_{ij}}(z)\, \mathrm dz.
$$
A: When $n=2$ and $a=b=1$ you are asking if we can compute $Eg(2X_1)+Eg(2X_2)+Eg(X_1+X_2)$. The first two terms can be computed in terms of $f$. Computing of the last term for every $g$ is equivalent to finding the distribution of $X_1+X_2$. This cannot be done in general. Just knowing the common density of $X_1$ and $X_2$ does not help in finding the distribution of their sum unless you have more information on how they depend on each other. . 
