The integral of a Gaussian function The integral of an arbitrary
Gaussian function is \int_{-\infty}^{\infty} e^{-a(x+b)^2}\,dx= \sqrt{\frac{\pi}{a}}. An alternative form is \int_{-\infty}^{\infty}e^{- (a x^2 - b x + c)}\,dx=\sqrt{\frac{\pi}{a}}\,e^{\frac{b^2}{4a}-c}. This form is useful for calculating expectations of some continuous probability distributions related to the normal distribution, such as the
log-normal distribution, for example.
Complex form \int_{-\infty}^{\infty} e^{\frac 12 it^2} dt = e^{i\pi/4} \sqrt{2\pi}and more generally,\int_{\mathbb{R}^N} e^{\frac{1}{2} i \mathbf{x}^T A \mathbf{x}}dx = \det(A)^{-\frac{1}{2}} {\left(e^{i\pi/4} \sqrt{2\pi}\right)}^Nfor any positive-definite symmetric matrix A.
n-dimensional and functional generalization Suppose
A is a symmetric positive-definite (hence invertible)
precision matrix, which is the matrix inverse of the
covariance matrix. Then, \begin{align} \int_{\mathbb{R}^n} \exp{\left(-\frac 1 2 \mathbf{x}^\mathsf{T} A \mathbf{x} \right)} \, d^n \mathbf{x} &= \int_{\mathbb{R}^n} \exp{\left(-\frac 1 2 \sum\limits_{i,j=1}^{n} A_{ij} x_i x_j \right)} \, d^n \mathbf{x} \\[1ex] &= \sqrt{\frac{{\left(2\pi\right)}^n}{\det A}} = \sqrt{\frac{1}{\det \left(A / 2\pi\right)}} \\[1ex] &= \sqrt{\det \left(2 \pi A^{-1}\right)} \end{align} By completing the square, this generalizes to\int_{\mathbb{R}^n} \exp{\left(-\tfrac 1 2 \mathbf{x}^\mathsf{T} A \mathbf{x} + \mathbf{b}^\mathsf{T} \mathbf{x} + c\right)} \, d^n \mathbf{x} = \sqrt{\det \left(2 \pi A^{-1}\right)} \exp\left(\tfrac{1}{2} \mathbf{b}^\mathsf{T} A^{-1} \mathbf{b} + c\right) This fact is applied in the study of the
multivariate normal distribution. Also, \int x_{k_1}\cdots x_{k_{2N}} \, \exp{\left( -\frac{1}{2} \sum\limits_{i,j=1}^{n}A_{ij} x_i x_j \right)} \, d^nx =\sqrt{\frac{(2\pi)^n}{\det A}} \, \frac{1}{2^N N!} \, \sum_{\sigma \in S_{2N}}(A^{-1})_{k_{\sigma(1)}k_{\sigma(2)}} \cdots (A^{-1})_{k_{\sigma(2N-1)}k_{\sigma(2N)}} where
σ is a
permutation of {{math|{1, …, 2
N}}} and the extra factor on the right-hand side is the sum over all combinatorial pairings of {{math|{1, …, 2
N}}} of
N copies of
A−1. Alternatively, \int f(\mathbf x) \exp{\left( - \frac 1 2 \sum_{i,j=1}^n A_{ij} x_i x_j \right)} d^n\mathbf{x} = \sqrt{\frac{{\left(2\pi\right)}^n}{\det A}} \, \left. \exp\left(\frac{1}{2} \sum_{i,j=1}^{n}\left(A^{-1}\right)_{ij}{\partial \over \partial x_i}{\partial \over \partial x_j}\right) f(\mathbf{x})\right|_{\mathbf{x}=0} for some
analytic function f, provided it satisfies some appropriate bounds on its growth and some other technical criteria. (It works for some functions and fails for others. Polynomials are fine.) The exponential over a differential operator is understood as a
power series. While
functional integrals have no rigorous definition (or even a nonrigorous computational one in most cases), we can
define a Gaussian functional integral in analogy to the finite-dimensional case. There is still the problem, though, that (2\pi)^\infty is infinite and also, the
functional determinant would also be infinite in general. This can be taken care of if we only consider ratios: \begin{align} & \frac{\displaystyle\int f(x_1)\cdots f(x_{2N}) \exp\left[{-\iint \frac{1}{2}A(x_{2N+1},x_{2N+2}) f(x_{2N+1}) f(x_{2N+2}) \, d^dx_{2N+1} \, d^dx_{2N+2}}\right] \mathcal{D}f}{\displaystyle\int \exp\left[{-\iint \frac{1}{2} A(x_{2N+1}, x_{2N+2}) f(x_{2N+1}) f(x_{2N+2}) \, d^dx_{2N+1} \, d^dx_{2N+2}}\right] \mathcal{D}f} \\[6pt] = {} & \frac{1}{2^N N!}\sum_{\sigma \in S_{2N}}A^{-1}(x_{\sigma(1)},x_{\sigma(2)})\cdots A^{-1}(x_{\sigma(2N-1)},x_{\sigma(2N)}). \end{align} In the
DeWitt notation, the equation looks identical to the finite-dimensional case.
n-dimensional with linear term If
A is again a symmetric positive-definite matrix, then (assuming all are column vectors) \begin{align} \int \exp\left(-\frac{1}{2}\sum_{i,j=1}^n A_{ij} x_i x_j+\sum_{i=1}^n b_i x_i\right) d^n \mathbf{x} &= \int \exp\left(-\tfrac{1}{2} \mathbf{x}^\mathsf{T} A \mathbf{x} + \mathbf{b}^\mathsf{T} \mathbf{x}\right) d^n \mathbf{x} \\ &= \sqrt{ \frac{(2\pi)^n}{\det A} } \exp\left(\tfrac{1}{2} \mathbf{b}^\mathsf{T} A^{-1} \mathbf{b}\right). \end{align}
Integrals of similar form \int_0^\infty x^{2n} e^{-{x^2}/{a^2}}\,dx = \sqrt{\pi}\frac{a^{2n+1} (2n-1)!!}{2^{n+1}} \int_0^\infty x^{2n+1} e^{-{x^2}/{a^2}} \, dx = \frac{n!}{2} a^{2n+2} \int_0^\infty x^{2n}e^{-bx^2}\,dx = \frac{(2n-1)!!}{b^n 2^{n+1}} \sqrt{\frac{\pi}{b}} \int_0^\infty x^{2n+1}e^{-bx^2}\,dx = \frac{n!}{2b^{n+1}} \int_0^\infty x^{n}e^{-bx^2}\,dx = \frac{\Gamma(\frac{n+1}{2})}{2b^{\frac{n+1}{2}}} where n is a positive integer An easy way to derive these is by
differentiating under the integral sign. \begin{align} \int_{-\infty}^\infty x^{2n} e^{-\alpha x^2}\,dx &= \left(-1\right)^n\int_{-\infty}^\infty \frac{\partial^n}{\partial \alpha^n} e^{-\alpha x^2}\,dx \\[1ex] &= \left(-1\right)^n\frac{\partial^n}{\partial \alpha^n} \int_{-\infty}^\infty e^{-\alpha x^2}\,dx\\[1ex] &= \sqrt{\pi} \left(-1\right)^n\frac{\partial^n}{\partial \alpha^n}\alpha^{-\frac{1}{2}} \\[1ex] &= \sqrt{\frac{\pi}{\alpha}}\frac{(2n-1)!!}{\left(2\alpha\right)^n} \end{align} One could also integrate by parts and find a
recurrence relation to solve this.
Higher-order polynomials Applying a linear change of basis shows that the integral of the exponential of a homogeneous polynomial in
n variables may depend only on
SL(n)-invariants of the polynomial. One such invariant is the
discriminant, zeros of which mark the singularities of the integral. However, the integral may also depend on other invariants. Exponentials of other even polynomials can numerically be solved using series. These may be interpreted as
formal calculations when there is no convergence. For example, the solution to the integral of the exponential of a quartic polynomial is \int_{-\infty}^{\infty} e^{a x^4+b x^3+c x^2+d x+f}\,dx = \frac{1}{2} e^f \sum_{\begin{smallmatrix}n,m,p=0 \\ n+p=0 \bmod 2\end{smallmatrix}}^{\infty} \frac{b^n}{n!} \frac{c^m}{m!} \frac{d^p}{p!} \frac{\Gamma{\left (\frac{3n+2m+p+1}{4} \right)}}{{\left(-a\right)}^{\frac{3n+2m+p+1}4}}. The mod 2 requirement is because the integral from −∞ to 0 contributes a factor of to each term, while the integral from 0 to +∞ contributes a factor of 1/2 to each term. These integrals turn up in subjects such as
quantum field theory. ==See also==