Integrate (x^2)exp(-x^2)dx from - to + infinity

Click For Summary
SUMMARY

The discussion focuses on evaluating the integral ∫(x^2)exp(-x^2)dx, relevant to quantum mechanics problems, specifically from Griffiths' textbook. The original poster attempts substitution and integration by parts but is advised that the error function is unavoidable for a closed-form solution. A definitive method is provided, utilizing integration by parts and the known result I(α) = ∫(−∞ to ∞) e^{−αx^2} dx = √(π/α) to derive averages of x^{2n} through differentiation with respect to α.

PREREQUISITES
  • Understanding of integration techniques, including integration by parts.
  • Familiarity with Gaussian integrals and their properties.
  • Knowledge of the error function and its significance in calculus.
  • Basic concepts of quantum mechanics as presented in Griffiths' textbook.
NEXT STEPS
  • Study the properties and applications of the error function in calculus.
  • Learn about Gaussian integrals and their derivations, particularly I(α) = ∫(−∞ to ∞) e^{−αx^2} dx.
  • Explore advanced integration techniques, including differentiation under the integral sign.
  • Review quantum mechanics applications of integrals, focusing on expectation values and probability distributions.
USEFUL FOR

Students and professionals in physics, particularly those studying quantum mechanics, mathematicians interested in advanced calculus, and anyone seeking to understand Gaussian integrals and their applications in theoretical contexts.

clope023
Messages
990
Reaction score
130
Hello, I'm doing a quantum mechanics problem from Griffiths chapter 1 where I'm trying to find the expectation value of x^2 given the function ρ(x) = Aexp[-λ(x-μ)^2].
The problem is in the title, but I'll rewrite it here simplified:

∫(x^2)exp(-x^2)dx

Subbing u = x^2 <=> x = sqrt(u) => dx = -0.5(u^(-1/2))du which becomes

-0.5∫(u/sqrt(u))exp(u)du = -0.5∫ sqrt(u)exp(u)du

So from here I tried integration by parts, u = sqrt(u), du = -0.5u^(-3/2)du,
dv = exp(u)du, v = exp(u)

uv - ∫vdu = sqrt(u)exp(u) + 0.5∫u^(-3/2)exp(u)du

From here I equatted this with -0.5∫sqrt(u)exp(u)du and noted

u^(-3/2) = (u^(-1/2))*(u^-1) = (u^(-1/2))/u

so then I did the algebra and got:

∫u^(-1/2)exp(u)du = u^(-1/2)(u/(u-1))exp(u) = sqrt(u)exp(u)/(u-1)

Am I on the right track? I am aware I can do this with the complementary error function or the gamma function but I'm trying to avoid using them. Any help is appreciated thank you.
 
Physics news on Phys.org
clope023 said:
Hello, I'm doing a quantum mechanics problem from Griffiths chapter 1 where I'm trying to find the expectation value of x^2 given the function ρ(x) = Aexp[-λ(x-μ)^2].
The problem is in the title, but I'll rewrite it here simplified:

∫(x^2)exp(-x^2)dx

Subbing u = x^2 <=> x = sqrt(u) => dx = -0.5(u^(-1/2))du which becomes

-0.5∫(u/sqrt(u))exp(u)du = -0.5∫ sqrt(u)exp(u)du

So from here I tried integration by parts, u = sqrt(u), du = -0.5u^(-3/2)du,
dv = exp(u)du, v = exp(u)

uv - ∫vdu = sqrt(u)exp(u) + 0.5∫u^(-3/2)exp(u)du

From here I equatted this with -0.5∫sqrt(u)exp(u)du and noted

u^(-3/2) = (u^(-1/2))*(u^-1) = (u^(-1/2))/u

so then I did the algebra and got:

∫u^(-1/2)exp(u)du = u^(-1/2)(u/(u-1))exp(u) = sqrt(u)exp(u)/(u-1)

Am I on the right track? I am aware I can do this with the complementary error function or the gamma function but I'm trying to avoid using them. Any help is appreciated thank you.

You cannot avoid the error function, as it occurs in one term of the answer. Put it another way: if you could find a closed-form for the integral, involving only elementary functions, you could also find a closed, elementary form for the error function, and this is provably impossible.

RGV
 
Ray Vickson said:
You cannot avoid the error function, as it occurs in one term of the answer.

Sure you can. The definite integral \int_{-\infty}^{\infty} x^2 e^{-x^2} dx (which from the thread title is what is actually desired) can be computed by applying integration by parts once with u=x and dv=x e^{-x^2} dx, and then computing \int_{-\infty}^{\infty} e^{-x^2} dx in the usual way (multiplying by \int_{-\infty}^{\infty} e^{-y^2} dy to give the square of the integral, converting this to a 2D integral in polar coordinates to easily compute it, and then taking the square root)
 
gabbagabbahey said:
Sure you can. The definite integral \int_{-\infty}^{\infty} x^2 e^{-x^2} dx (which from the thread title is what is actually desired) can be computed by applying integration by parts once with u=x and dv=x e^{-x^2} dx, and then computing \int_{-\infty}^{\infty} e^{-x^2} dx in the usual way (multiplying by \int_{-\infty}^{\infty} e^{-y^2} dy to give the square of the integral, converting this to a 2D integral in polar coordinates to easily compute it, and then taking the square root)

Of course the definite integral is doable---but not by the methods the OP posted. In the main body of the post the OP seemed to be wanting the indefinite integral, and I was responding to that.

RGV
 
Do you know the result

$$I(\alpha) = \int_{-\infty}^\infty dx~e^{-\alpha x^2} = \sqrt{\frac{\pi}{\alpha}}?$$

If you are allowed to use that result, you can find the values of the averages of ##x^{2n}## by supposing ##\alpha## is actually a variable parameter and taking derivatives with respect to it. e.g.,

$$I'(\alpha) = -\int_{-\infty}^\infty dx~x^2e^{-\alpha x^2} = -\langle x^2 \rangle_\alpha,$$
where I've used a subscript ##\alpha## to denote that it's still a variable, and you have to set ##\alpha## to be whatever it is supposed to be in your original integral.

This is by far the slickest way to get Gaussian averages, in my opinion.
 
  • Like
Likes   Reactions: Octopus Sad

Similar threads

Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 27 ·
Replies
27
Views
3K