# $\int_{\mathbb{R}^n} dx_1 \dots dx_n \exp(−\frac{1}{2}\sum_{i,j=1}^{n}x_iA_{ij}x_j)$?

Let $A$ be a symmetric positive-definite $n\times n$ matrix and $b_i$ be some real numbers How can one evaluate the following integrals?

1. $\int_{\mathbb{R}^n} dx_1 \dots dx_n \exp(−\frac{1}{2}\sum_{i,j=1}^{n}x_iA_{ij}x_j)$
2. $\int_{\mathbb{R}^n} dx_1 \dots dx_n \exp(−\frac{1}{2}\sum_{i,j=1}^{n}x_iA_{ij}x_{j}-b_i x_i)$
-
Diagonalize the quadratic form. –  Sanchez Jan 10 '13 at 20:58
Let's $x=(x_1,\ldots,x_n)\in\mathbb{R}^n$. We have \begin{align} \int_{\mathbb{R}^n}e^{-\frac{1}{2}\langle x,x \rangle_{A}} d x = & \int_{\mathbb{R}^n}e^{-\frac{1}{2}\langle x,Ax \rangle} d x \\ = & \int_{\mathbb{R}^n}e^{-\frac{1}{2}\langle Ux,Ux \rangle} d x \\ = & \int_{\mathbb{R}^n}e^{-\frac{1}{2}\langle x,x \rangle}\|U\| d x \\ = & \|U\|\cdot \left(\int_{R} e^{-\frac{1}{2}x^2} d x \right)^n\\ = & \|U\|\cdot\left( \frac{1}{2}\sqrt{2\pi}\right)^n \end{align} For second itegral use the change of variable $y_i+s_i=x_i$ such that $(2\cdot s^TA+b^T)=0$, \begin{align} (y+s)^TA(y+s) +b(y+s)= & y^TAy+(2\cdot s^TA+b^T)y+s^T(b+As) \\ = & y^TAy+s^T(b+As) \\ \end{align} Then $$\int_{\mathbb{R}^n}e^{-\frac{1}{2}\langle x,x \rangle_{A}+b^Tx} d x =n\cdot \|U\|\cdot \int_{\mathbb{R}^n} e^{-\frac{1}{2}y^2}\cdot e^{s^T(b+As)} d y \\ = \cdot e^{s^T(b+As)}\cdot \|U\|\cdot \left( \frac{1}{2}\sqrt{2\pi}\right)^n$$