f (x ) = e −x 2 的图像,这个函数与 x 轴之间的面积等于
π
{\displaystyle \scriptstyle\sqrt{\pi} }
。
高斯积分 (英语:Gaussian integral ),有时也被称为概率积分 ,是高斯函数 (e −x 2 )在整个实数线 上的积分 。它得名于德国 数学家 兼物理学家 卡尔·弗里德里希·高斯 之姓氏。
∫
−
∞
∞
e
−
x
2
d
x
=
π
{\displaystyle \int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}}
高斯积分用处很广。例如,利用换元积分法,它可以用来计算正态分布 的归一化常数 。在极限为有限值的时候,高斯积分与正态分布 的误差函数 和累积分布函数 密切相关。在物理学中,这种积分也经常出现:例如在量子力学 中,谐振子基态的概率密度;在路径积分公式中,谐振子的传播子;以及统计力学 中的配分函数,以上的计算都要用到这个积分。
我们可以通过Risch算法 证明误差函数不具有初等函数 形式;尽管如此,高斯积分可以通过多元微积分 方法分析求解。虽然不定积分
∫
e
−
x
2
d
x
{\displaystyle \int e^{-x^2}\,dx}
无法用初等函数表示,但定积分
∫
−
∞
∞
e
−
x
2
d
x
{\displaystyle \int_{-\infty}^\infty e^{-x^2}\,dx}
是可以计算的。
任意高斯函数 的定积分为
∫
−
∞
∞
e
−
a
(
x
+
b
)
2
d
x
=
π
a
.
{\displaystyle \int_{-\infty}^{\infty} e^{-a(x+b)^2}\,dx= \sqrt{\frac{\pi}{a}}.}
计算方式
通过极限计算
要想找到高斯积分的闭合形式,首先定义一个近似函数:
I
(
a
)
=
∫
−
a
a
e
−
x
2
d
x
{\displaystyle I(a)=\int_{-a}^a e^{-x^2}dx}
,
高斯积分可以通过它的极限来运算:
lim
a
→
∞
I
(
a
)
=
∫
−
∞
+
∞
e
−
x
2
d
x
.
{\displaystyle \lim_{a\to\infty} I(a) = \int_{-\infty}^{+\infty} e^{-x^2}\, dx.}
对
I
{\displaystyle I}
取平方获得
I
2
(
a
)
=
(
∫
−
a
a
e
−
x
2
d
x
)
⋅
(
∫
−
a
a
e
−
y
2
d
y
)
=
∫
−
a
a
(
∫
−
a
a
e
−
y
2
d
y
)
e
−
x
2
d
x
=
∫
−
a
a
∫
−
a
a
e
−
(
x
2
+
y
2
)
d
x
d
y
.
{\displaystyle I^2(a)= \left ( \int_{-a}^a e^{-x^2}\, dx \right )\cdot \left ( \int_{-a}^a e^{-y^2}\, dy \right )= \int_{-a}^a \left ( \int_{-a}^a e^{-y^2}\, dy \right )\,e^{-x^2}\, dx = \int_{-a}^a \int_{-a}^a e^{-(x^2+y^2)}\,dx\,dy.}
根据富比尼定理 ,以上的双重积分可以被看作是直角坐标系 上一个正方形的面积积分
∫
e
−
(
x
2
+
y
2
)
d
(
x
,
y
)
{\displaystyle \int e^{-(x^2+y^2)}\,d(x,y)}
,其顶点 为
{
(
−
a
,
a
)
,
(
a
,
a
)
,
(
a
,
−
a
)
,
(
−
a
,
−
a
)
}
{\displaystyle \{(-a, a), (a, a), (a, -a), (-a, -a)\}}
。
不论
x
{\displaystyle x}
为任何实数,指数函数
e
x
{\displaystyle e^x}
均大于0,所以这个正方形的内切圆 的积分必须小于
I
(
a
)
2
{\displaystyle I(a)^2}
。同理,正方形的外接圆 积分必须大于
I
(
a
)
2
{\displaystyle I(a)^2}
。通过从直角坐标系转化到极坐标系
x
=
r
cos
θ
{\displaystyle x=r\,\cos \theta}
,
y
=
r
sin
θ
{\displaystyle y= r\,\sin\theta}
,
d
(
x
,
y
)
=
r
d
(
r
,
θ
)
{\displaystyle d(x,y) = r\, d(r,\theta)}
,可以计算出这两个圆面的积分:
∫
0
2
π
∫
0
a
r
e
−
r
2
d
r
d
θ
<
I
2
(
a
)
<
∫
0
2
π
∫
0
a
2
r
e
−
r
2
d
r
d
θ
{\displaystyle \int_0^{2\pi}\int_0^a re^{-r^2}\,dr\,d\theta < I^2(a) < \int_0^{2\pi}\int_0^{a\sqrt{2}} re^{-r^2}\,dr\,d\theta}
,
得到
π
(
1
−
e
−
a
2
)
<
I
2
(
a
)
<
π
(
1
−
e
−
2
a
2
)
.
{\displaystyle \pi (1-e^{-a^2}) < I^2(a) < \pi (1 - e^{-2a^2}). }
使用夹挤定理 获得高斯积分
∫
−
∞
∞
e
−
x
2
d
x
=
π
.
{\displaystyle \int_{-\infty}^\infty e^{-x^2}\, dx = \sqrt{\pi}.}
与Γ函数的关系
由于被积分的函数是一个偶函数 ,
∫
−
∞
∞
e
−
x
2
d
x
=
2
∫
0
∞
e
−
x
2
d
x
{\displaystyle \int_{-\infty}^{\infty} e^{-x^2} dx = 2 \int_0^\infty e^{-x^2} dx}
通过替代变量它可以变成一个欧拉积分
∫
0
∞
e
−
t
t
−
1
2
d
t
=
Γ
(
1
2
)
{\displaystyle \int_0^\infty e^{-t} \ t^{-\frac{1}{2}} dt \, = \, \Gamma\left(\frac{1}{2}\right)}
这里
Γ
{\displaystyle ~\Gamma}
是Γ函数 。这说明了为什么一个半整数的阶乘 是
π
{\displaystyle \sqrt \pi}
的倍数。更广义地,
b
∫
0
∞
e
−
a
x
b
d
x
=
a
−
1
b
Γ
(
1
b
)
.
{\displaystyle b\int_0^\infty e^{-ax^b} dx = a^{-\frac{1}{b}} \, \Gamma\left(\frac{1}{b}\right).}
推广
高斯函数的积分
任一高斯函数 的积分都可以用以下的公式计算:
∫
−
∞
∞
e
−
a
(
x
+
b
)
2
d
x
=
π
a
{\displaystyle \int_{-\infty}^{\infty} e^{-a(x+b)^2}\,dx= \sqrt{\frac{\pi}{a}}}
更为广泛的形式为:
∫
−
∞
∞
e
−
a
x
2
+
b
x
+
c
d
x
=
π
a
e
b
2
4
a
+
c
{\displaystyle \int_{-\infty}^{\infty}e^{- a x^2 + b x + c}\,dx=\sqrt{\frac{\pi}{a}}\,e^{\frac{b^2}{4a}+c}}
这一公式在计算有关正态分布 的一些连续概率分布 的数学期望值的时候特别有用,例如对数正态分布 。
n维和泛函推广
令
A
{\displaystyle A}
为一个对称的、正定 的(因而可逆 )
n
×
n
{\displaystyle n \times n}
精密矩阵 (即协方差矩阵 的逆矩阵),则
∫
−
∞
∞
e
(
−
1
2
∑
i
,
j
=
1
n
A
i
j
x
i
x
j
)
d
n
x
=
∫
−
∞
∞
e
(
−
1
2
x
T
A
x
)
d
n
x
=
(
2
π
)
n
det
A
=
1
det
(
A
/
2
π
)
=
det
(
2
π
A
−
1
)
{\displaystyle \int_{-\infty}^\infty e^{\left(-\frac 1 2 \sum\limits_{i,j=1}^{n}A_{ij} x_i x_j \right)} \, d^nx =\int_{-\infty}^\infty e^{\left(-\frac 1 2 x^{T} A x \right)} \, d^nx=\sqrt{\frac{(2\pi)^n}{\det A}} =\sqrt{\frac{1}{\det (A / 2\pi)}} =\sqrt{\det (2 \pi A^{-1})}}
这里的积分是对R n 的。上式被用于研究多元正态分布 。
同样,
∫
x
k
1
⋯
x
k
2
N
e
(
−
1
2
∑
i
,
j
=
1
n
A
i
j
x
i
x
j
)
d
n
x
=
(
2
π
)
n
det
A
1
2
N
N
!
∑
σ
∈
S
2
N
(
A
−
1
)
k
σ
(
1
)
k
σ
(
2
)
⋯
(
A
−
1
)
k
σ
(
2
N
−
1
)
k
σ
(
2
N
)
{\displaystyle \int x^{k_1}\cdots x^{k_{2N}} \, e^{\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)}}}
这里的 σ 表示的是有序集 {1, ..., 2N } 的不同排列 。等式右边的系数是对
N
{\displaystyle N}
个重复的 A−1 的 {1, ..., 2N } 中所有的组合的求和(the sum over all combinatorial pairings of {1, ..., 2N } of N copies of A −1 )。[来源请求]
或者,
∫
f
(
x
→
)
e
(
−
1
2
∑
i
,
j
=
1
n
A
i
j
x
i
x
j
)
d
n
x
=
(
2
π
)
n
det
A
e
(
1
2
∑
i
,
j
=
1
n
(
A
−
1
)
i
j
∂
∂
x
i
∂
∂
x
j
)
f
(
x
→
)
|
x
→
=
0
{\displaystyle \int f(\vec x) e^{\left( - \frac 1 2 \sum\limits_{i,j=1}^{n}A_{ij} x_i x_j \right)} d^nx=\sqrt{(2\pi)^n\over \det A} \, \left. e^{\left({1\over 2}\sum\limits_{i,j=1}^{n}(A^{-1})_{ij}{\partial \over \partial x_i}{\partial \over \partial x_j}\right)}f(\vec{x})\right|_{\vec{x}=0}}
以上积分中的
f
{\displaystyle f}
是解析函数 ,且函数值的增长必须满足某些边界条件以及另一些特定要求。微分算子的幂可以理解为幂级数 。
虽然泛函积分 没有严格的定义,但是我们仍然可以依照有限维的情况“定义”高斯泛函积分。[来源请求] 然而,
(
2
π
)
∞
{\displaystyle (2\pi)^\infty}
无穷大的问题依然存在,且大部分的泛函行列式 也是无穷大的。如果只考虑比例:
∫
f
(
x
1
)
⋯
f
(
x
2
N
)
e
−
∬
1
2
A
(
x
2
N
+
1
,
x
2
N
+
2
)
f
(
x
2
N
+
1
)
f
(
x
2
N
+
2
)
d
d
x
2
N
+
1
d
d
x
2
N
+
2
D
f
∫
e
−
∬
1
2
A
(
x
2
N
+
1
,
x
2
N
+
2
)
f
(
x
2
N
+
1
)
f
(
x
2
N
+
2
)
d
d
x
2
N
+
1
d
d
x
2
N
+
2
D
f
=
1
2
N
N
!
∑
σ
∈
S
2
N
A
−
1
(
x
σ
(
1
)
,
x
σ
(
2
)
)
⋯
A
−
1
(
x
σ
(
2
N
−
1
)
,
x
σ
(
2
N
)
)
.
{\displaystyle \frac{\int f(x_1)\cdots f(x_{2N}) e^{-\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}} \mathcal{D}f}{\int e^{-\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}} \mathcal{D}f} =\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)}).}
则可以解决这个问题。在德维特标记法 下,此公式与有限维的情况一致。
带线性项的n维
如果A是一个对称的正定矩阵,则有(假设均为列向量)
∫
e
−
1
2
∑
i
,
j
=
1
n
A
i
j
x
i
x
j
+
∑
i
=
1
n
B
i
x
i
d
n
x
=
∫
e
−
1
2
x
→
T
A
x
→
+
B
→
T
x
→
d
n
x
=
(
2
π
)
n
det
A
e
1
2
B
→
T
A
−
1
B
→
.
{\displaystyle \int e^{-\frac{1}{2}\sum\limits_{i,j=1}^{n}A_{ij} x_i x_j+\sum\limits_{i=1}^{n}B_i x_i} d^nx=\int e^{-\frac{1}{2}\vec{x}^T \mathbf{A} \vec{x}+\vec{B}^T \vec{x}} d^nx= \sqrt{ \frac{(2\pi)^n}{\det{A}} }e^{\frac{1}{2}\vec{B}^{T}\mathbf{A}^{-1}\vec{B}}.}
形式相似的积分
∫
0
∞
x
2
n
e
−
x
2
a
2
d
x
=
π
a
2
n
+
1
(
2
n
−
1
)
!
!
2
n
+
1
{\displaystyle \int_0^\infty x^{2n} e^{-\frac{x^2}{a^2}}\,dx = \sqrt{\pi}\frac{a^{2n+1} (2n-1)!!}{2^{n+1}}}
∫
0
∞
x
2
n
+
1
e
−
x
2
a
2
d
x
=
n
!
2
a
2
n
+
2
{\displaystyle \int_0^\infty x^{2n+1} e^{-\frac{x^2}{a^2}}\,dx = \frac{n!}{2} a^{2n+2}}
∫
0
∞
x
2
n
e
−
a
x
2
d
x
=
(
2
n
−
1
)
!
!
a
n
2
n
+
1
π
a
{\displaystyle \int_0^\infty x^{2n}e^{-ax^2}\,dx = \frac{(2n-1)!!}{a^n 2^{n+1}} \sqrt{\frac{\pi}{a}}}
∫
0
∞
x
2
n
+
1
e
−
a
x
2
d
x
=
n
!
2
a
n
+
1
{\displaystyle \int_0^\infty x^{2n+1}e^{-ax^2}\,dx = \frac{n!}{2a^{n+1}}}
∫
0
∞
x
n
e
−
a
x
2
d
x
=
Γ
(
n
+
1
2
)
2
a
n
+
1
2
{\displaystyle \int_0^\infty x^{n}e^{-ax^2}\,dx = \frac{\Gamma(\frac{n+1}{2})}{2a^{\frac{n+1}{2}}}}
其中,n 为正整数,“!!”表示双阶乘 。
这类积分的一种简单的计算方式是应用莱布尼兹积分规则 对参数进行微分:
∫
−
∞
∞
x
2
n
e
−
α
x
2
d
x
=
(
−
1
)
n
∫
−
∞
∞
∂
n
∂
α
n
e
−
α
x
2
d
x
=
(
−
1
)
n
∂
n
∂
α
n
∫
−
∞
∞
e
−
α
x
2
d
x
=
π
(
−
1
)
n
∂
n
∂
α
n
α
−
1
2
=
π
α
(
2
n
−
1
)
!
!
(
2
α
)
n
{\displaystyle \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 ~= \left(-1\right)^n\frac{\partial^n}{\partial \alpha^n} \int_{-\infty}^\infty e^{-\alpha x^2}\,dx\\
&= \sqrt{\pi} \left(-1\right)^n\frac{\partial^n}{\partial \alpha^n}\alpha^{-\frac{1}{2}} ~= \sqrt{\frac{\pi}{\alpha}}\frac{(2n-1)!!}{\left(2\alpha\right)^n}
\end{align}}
也可以先分部积分 ,然后找出递推关系 之后求解。
另见
参考资料
埃里克·韦斯坦因 . Gaussian Integral . MathWorld .
Griffiths, David. Introduction to Quantum Mechanics 2nd.
Abramowitz, M.; Stegun, I. A. Handbook of Mathematical Functions. New York: Dover Publications.