# Homework Help: Tough Gaussian Integral

1. Aug 31, 2014

### jaydnul

1. The problem statement, all variables and given/known data
I'm trying to solve the Gaussian integral:
$$\int_{-∞}^{∞}xe^{-λ(x-a)^2}dx$$
and
$$\int_{-∞}^{∞}x^2e^{-λ(x-a)^2}dx$$

2. Relevant equations
I can't find anything online that gives the Gaussian integral of x times the exponential of -λ(x+(some constant))squared. I was hoping someone here would know. It is the (-a) in the exponential that is throwing me off.

Thanks!

2. Aug 31, 2014

### nrqed

Well, let's start with something simpler. Do you know how to do the integrals from mini infinity to plus infinity of $e^{-x^2}, xe^{-x^2}, x^2 e^{-x^2}$? That's the first step. If you know how to do these, it will be easy to show how to the ones you are asking about.

3. Aug 31, 2014

### Orodruin

Staff Emeritus
How about a change of variables?

4. Aug 31, 2014

### jaydnul

Ya I "know" how do them. It's a QM problem, not a mathematical one, so it is having me look up the integrals. So respectively, the solutions are $\int_{0}^{∞}x^{2n}e^{\frac{-x^2}{a^2}}dx=\sqrt{π}\frac{(2n)!}{n!}(\frac{a}{2})^{2n+1}$

In the original problem, when you expand the squared term, you end up with an x and x squared term which is confusing me.

5. Aug 31, 2014

### nrqed

Then do a change of variable to avoid having an x term in the exponent, as Orodruin suggested.

6. Aug 31, 2014

### jaydnul

Ahh I see. Just to be clear, the correct substitution would be u=x-a, du=dx cause then x=u+a and you end up with:
$$\int_{-∞}^{∞}ue^{-λ(u)^2}+ae^{-λ(u)^2}du$$

Right? Sorry, running on fumes today :)

7. Aug 31, 2014

### nrqed

That's it! And the same trick will work for the second integral (if you know the integral of $x e^{-x^2}$ which is trivial, using symmetry.)

8. Aug 31, 2014

### Orodruin

Staff Emeritus
Add a few parentheses so that the expression makes sense, but otherwise yes.

9. Aug 31, 2014

### jaydnul

Ha! I feel like an idiot.

Thanks a bunch nrqed and Orodruin!

10. Aug 31, 2014

### Orodruin

Staff Emeritus
Don't! I have seen much worse examples among university students ...