General Gaussian distribution relation I'm trying to solve a question from Pathria's statistical mechanics textbook (10.21) but it is more math oriented.
Show that, for a general Gaussian distribution of variables $u_j$ , the average of the exponential of a linear combination of the variables obeys the relation:
$\left\langle \exp\left(\sum_j a_j u_j\right) \right\rangle=\exp\left(\dfrac{1}{2}\left\langle\left(\sum_j a_j u_j\right)^2 \right\rangle \right)$
I'm not entirely sure how to write this; I was doing Taylor series expansions of exponentials and I could solve it easily if it were a standard normal (mean=0).  I believe the linear combination of normal variables is normal, so this seems to have something to do with the log-normal distribution?  
I don't need a full solution; just a hint to go forward.
 A: Here is a full solution.
Since $\sum\limits_ja_ju_j$ is normal, you are asking to show that for every normal random variable $u$, $$\langle\mathrm e^u\rangle=\mathrm e^{\langle u\rangle^2/2}.$$ If $u$ is normal with mean $m$ and variance $\sigma^2$, then $u=m+\sigma v$ where $v$ is standard normal hence $$\langle\mathrm e^u\rangle=\mathrm e^m\cdot\varphi(\sigma),\qquad\varphi(t)=\langle\mathrm e^{tv}\rangle.$$ By definition, $$\varphi(t)=\int_\mathbb R\frac1{\sqrt{2\pi}}\mathrm e^{tx}\mathrm e^{-x^2/2}\mathrm dx=\mathrm e^{t^2/2}\int_\mathbb R\frac1{\sqrt{2\pi}}\mathrm e^{-(x-t)^2/2}\mathrm dx=\mathrm e^{t^2/2},$$ hence $$\langle\mathrm e^u\rangle=\mathrm e^m\cdot\mathrm e^{\sigma^2/2}.$$ On the other hand, $$\langle u\rangle^2=m^2+\sigma^2,$$ hence:

The desired identity holds if and only if $\sum\limits_ja_j\langle u_j\rangle$ is $0$ or $2$. 

The hypothesis that $\langle u_j\rangle=0$ for every $j$, which implies that $\sum\limits_ja_j\langle u_j\rangle=0$, is probably missing from the statement of the exercise.
