# Thread: Integration In multidimensional domain

1. ## Integration In multidimensional domain

How to resolve?:

$\displaystyle \int_{X} \exp{ \left( -\frac{X^{T}QX}{2} \right)}\left( -\frac{X^{T}QX}{2} \right)dX$

where $\displaystyle X$ is a vector $\displaystyle [x_{1},...,x_{n}]^T$ and $\displaystyle Q$ a n*n matrix. The integral should be calculated over $\displaystyle \mathbb{R}^n$..

In analogy with the 1dimensional case, I supposed to consider the argument as a sort of $\displaystyle Qx^2$, and resolve the integral by parts , dividing the last term and trying to obtain the derivate of the term $\displaystyle \left( -\frac{X^{T}QX}{2} \right)$.
But I am not shure how to proceed in the multidimensional domain. Is my thought valid? Someone can help me?
Thanks
Pollo

2. To simplify the question (and reduce to a more classical one), you could consider diagonalizing $\displaystyle Q$.

This is not always possible, but for every $\displaystyle X$, $\displaystyle X^TQ X=X^T\frac{Q+Q^T}{2}X$, hence you can replace $\displaystyle Q$ by $\displaystyle A=\frac{Q+Q^T}{2}$, which is real and symmetric. As a consequence, $\displaystyle A$ diagonalizes in an orthonormal basis. Let $\displaystyle \lambda_1,\ldots,\lambda_n$ be its eigenvalues. Changing from one orthonormal basis to another doesn't change the volume (this is a rotation, perhaps plus a symmetry, anyway it is an orthogonal transformation), hence your integral becomes, using this change of basis:
$\displaystyle \int \frac{1}{2}\left(\sum_{i=1}^n \lambda_i x_i^2\right) \exp\left(-\frac{1}{2}\sum_{i=1}^n \lambda_i x_i^2\right) dx_1\cdots dx_n$.
(I swapped the factors to avoid confusion) You can expand the first sum so that you get the sum of $\displaystyle n$ integrals, and then integrate each of them rather simply. I think the integral converges iff the $\displaystyle \lambda_i$'s are positive.

One question remains: what is the connection between the $\displaystyle \lambda_i$'s and $\displaystyle Q$? Don't you in fact assume that $\displaystyle Q$ itself is symmetric (and positive)?

I think what you finally get is: $\displaystyle \frac{1}{2}(2\pi)^{n/2}{\rm Tr}(A)$, which is also $\displaystyle \frac{1}{2}(2\pi)^{n/2}{\rm Tr}(Q)$. The previous question becomes: for which $\displaystyle Q$ does the integral converge? (or: for which $\displaystyle Q$ is $\displaystyle A$ positive?) I don't know the answer. Does anyone?

3. Thanks for the response. The fact is: this integral came out from a more general problem of Information Theory: I need to prove that a gaussian vector $\displaystyle X$ having a covariance matrix $\displaystyle Q$, and then having a probability function
$\displaystyle f(X)=\frac{1}{\sqrt{(2\pi)^n\det{(Q)}}}\exp\left(-\frac{X^{T}Q^{-1}X}{2}\right)$
has entropy
$\displaystyle h(X)=\frac{1}{2}\log\left((2\pi e)^n\det(Q)\right)$

where the general definition of the entropy is
$\displaystyle h(X)=\int_{X}-f(X)\log(f(X))dX$

then, developing the formula, and exploiting the property of the probability function $\displaystyle \int_{X}f(X)dX=1$, I stop when I have to calculate the purposed integral.

4. Originally Posted by pollo
covariance matrix $\displaystyle Q$
Hence $\displaystyle Q$ is symmetric (and probably positive, if the distribution is not degenerate), and you can reread what I wrote with $\displaystyle Q$ instead of $\displaystyle A$.

I made a mistake in my (unwritten) computation: in fact I get $\displaystyle \frac{1}{2}(2\pi)^{n/2}n$. I think this coincides with your result (this term gives the "$\displaystyle e$").