TOPICS
Search

Gaussian Integral


The Gaussian integral, also called the probability integral and closely related to the erf function, is the integral of the one-dimensional Gaussian function over (-infty,infty). It can be computed using the trick of combining two one-dimensional Gaussians

int_(-infty)^inftye^(-x^2)dx=sqrt((int_(-infty)^inftye^(-x^2)dx)(int_(-infty)^inftye^(-x^2)dx))
(1)
=sqrt((int_(-infty)^inftye^(-y^2)dy)(int_(-infty)^inftye^(-x^2)dx))
(2)
=sqrt(int_(-infty)^inftyint_(-infty)^inftye^(-(x^2+y^2))dydx).
(3)

Here, use has been made of the fact that the variable in the integral is a dummy variable that is integrates out in the end and hence can be renamed from x to y. Switching to polar coordinates then gives

int_(-infty)^inftye^(-x^2)dx=sqrt(int_0^(2pi)int_0^inftye^(-r^2)rdrdtheta)
(4)
=sqrt(2pi[-1/2e^(-r^2)]_0^infty)
(5)
=sqrt(pi).
(6)

There also exists a simple proof of this identity that does not require transformation to polar coordinates (Nicholas and Yates 1950).

The integral from 0 to a finite upper limit a can be given by the continued fraction

int_0^ae^(-t^2)dt=1/2sqrt(pi)erf(a)
(7)
=1/2sqrt(pi)-(e^(-a^2))/(2a+)1/(a+)2/(2a+)3/(a+)4/(2a+...),
(8)

where erfx is erf (the error function), as first stated by Laplace, proved by Jacobi, and rediscovered by Ramanujan (Watson 1928; Hardy 1999, pp. 8-9).

The general class of integrals of the form

 I_n(a)=int_0^inftye^(-ax^2)x^ndx
(9)

can be solved analytically by setting

x=a^(-1/2)y
(10)
dx=a^(-1/2)dy
(11)
y^2=ax^2.
(12)

Then

I_n(a)=a^(-1/2)int_0^inftye^(-y^2)(a^(-1/2)y)^ndy
(13)
=a^(-(n+1)/2)int_0^inftye^(-y^2)y^ndy.
(14)

For n=0, this is just the usual Gaussian integral, so

 I_0(a)=(sqrt(pi))/2a^(-1/2)=1/2sqrt(pi/a).
(15)

For n=1, the integrand is integrable by quadrature,

 I_1(a)=a^(-1)int_0^inftye^(-y^2)ydy=a^(-1)[-1/2e^(-y^2)]_0^infty=1/2a^(-1).
(16)

To compute I_n(a) for n>1, use the identity

-partial/(partiala)I_(n-2)(a)=-partial/(partiala)int_0^inftye^(-ax^2)x^(n-2)dx
(17)
=-int_0^infty-x^2e^(-ax^2)x^(n-2)dx
(18)
=int_0^inftye^(-ax^2)x^ndx
(19)
=I_n(a).
(20)

For n=2s even,

I_n(a)=(-partial/(partiala))I_(n-2)(a)
(21)
=(-partial/(partiala))^2I_(n-4)
(22)
=...=(-partial/(partiala))^(n/2)I_0(a)
(23)
=(partial^(n/2))/(partiala^(n/2))I_0(a)
(24)
=(sqrt(pi))/2(partial^(n/2))/(partiala^(n/2))a^(-1/2),
(25)

so

int_0^inftyx^(2s)e^(-ax^2)dx=((s-1/2)!)/(2a^(s+1/2))
(26)
=((2s-1)!!)/(2^(s+1)a^s)sqrt(pi/a),
(27)

where n!! is a double factorial. If n=2s+1 is odd, then

I_n(a)=(-partial/(partiala))I_(n-2)(a)
(28)
=(-partial/(partiala))^2I_(n-4)(a)
(29)
=...=(-partial/(partiala))^((n-1)/2)I_1(a)
(30)
=(partial^((n-1)/2))/(partiala^((n-1)/2))I_1(a)
(31)
=1/2(partial^((n-1)/2))/(partiala^((n-1)/2))a^(-1),
(32)

so

 int_0^inftyx^(2s+1)e^(-ax^2)dx=(s!)/(2a^(s+1)).
(33)

The solution is therefore

 int_0^inftye^(-ax^2)x^ndx={((n-1)!!)/(2^(n/2+1)a^(n/2))sqrt(pi/a)   for n even; ([1/2(n-1)]!)/(2a^((n+1)/2))   for n odd.
(34)

The first few values are therefore

I_0(a)=1/2sqrt(pi/a)
(35)
I_1(a)=1/(2a)
(36)
I_2(a)=1/(4a)sqrt(pi/a)
(37)
I_3(a)=1/(2a^2)
(38)
I_4(a)=3/(8a^2)sqrt(pi/a)
(39)
I_5(a)=1/(a^3)
(40)
I_6(a)=(15)/(16a^3)sqrt(pi/a).
(41)

A related, often useful integral is

 H_n(a)=1/(sqrt(pi))int_(-infty)^inftye^(-ax^2)x^ndx,
(42)

which is simply given by

 H_n(a)={(2I_n(a))/(sqrt(pi))   for n even; 0   for n odd.
(43)

The more general integral of x^ne^(-ax^2+bx) has the following closed forms,

int_(-infty)^inftyx^ne^(-ax^2+bx)dx=i^(-n)a^(-(n+1)/2)sqrt(pi)e^(b^2/(4a))U(-1/2n;1/2;-b^2/4a)
(44)
=sqrt(pi/a)e^(b^2/(4a))sum_(k=0)^(|_n/2_|)(n!)/(k!(n-2k)!)((2b)^(n-2k))/((4a)^(n-k))
(45)
=sqrt(pi/a)e^(b^2/(4a))sum_(k=0)^(|_n/2_|)(n; 2k)(2k-1)!!(2a)^(k-n)b^(n-2k)
(46)

for integer n>0 (F. Pilolli, pers. comm.). For (45) and (46), a,b in C-{0} (the punctured plane), R[a]>0, and (-1)!!=1. Here, U(a;b;x) is a confluent hypergeometric function of the second kind and (n; k) is a binomial coefficient.


See also

Erf, Gauss Integral, Gaussian Function, Leibniz Integral Rule, Normal Distribution

Explore with Wolfram|Alpha

References

Guitton, E. "Démonstration de la formule." Nouv. Ann. Math. 65, 237-239, 1906.Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.Nicholas, C. B. and Yates, R. C. "The Probability Integral." Amer. Math. Monthly 57, 412-413, 1950.Papoulis, A. Probability, Random Variables, and Stochastic Processes, 2nd ed. New York: McGraw-Hill, pp. 147-148, 1984.Watson, G. N. "Theorems Stated by Ramanujan (IV): Theorems on Approximate Integration and Summation of Series." J. London Math. Soc. 3, 282-289, 1928.

Referenced on Wolfram|Alpha

Gaussian Integral

Cite this as:

Weisstein, Eric W. "Gaussian Integral." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/GaussianIntegral.html

Subject classifications