# Finding a Gaussian integral

1. Jan 13, 2012

### Noorac

1. The problem statement, all variables and given/known data
Find the Gaussian integral:

$I = \int_{-\infty}^{\infty} e^{-x^2-4x-1}dx$

(That's all the information the task gives me, minus the $I=$, I just put it there to more easily show what I have tried to do)

2. The attempt at a solution
I tried to square $I$ and get a double integral:

$I^2 = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{(-x^2-4x-1)+(-y^2-4y-1)}dxdy$

and then my plan was to convert to polar-coordinates, however, this is my first time ever with double-integrals and/or switching to polarcoordinates, and I am kind of lost because every single example on the internet use the standard $e^{-x^2}$ gaussian function(and it is easy to see $r^2=x^2+y^2$). Anyone who can push me in the right direction(I'm not even sure what finding the Gassuian integral means(?))?

2. Jan 13, 2012

### Dick

Complete the square. -x^2-4*x-1=(-(x+2)^2+3). Try using that.

3. Jan 13, 2012

### Noorac

Tried that earlier on, but didn't get anywhere with it. Been trying it some more now, but I still don't see it though. I don't see the next step, I'm going to try some more though=) Thanks

4. Jan 13, 2012

### Dick

Next step would be a change of variables, u=x+2. Keep thinking about it.

5. Jan 13, 2012

### Noorac

There! At least I got to the same answer as Wolfram Alpha;

$I = \sqrt{\pi}e^{3}$

I hope it is correct. The steps I did after changeing variables $r^2=(x+2)^2 + (y+2)^2$ was substituting

$u=r^2$

$\frac{du}{dr}= 2r$

$du = 2rdr$

$dr = \frac{du}{2r}$

And just left the 6-constant alone all until I did the actual integral:

$2\pi \int_{0}^{\infty} re^{-u+6} \frac{du}{2r}$

$\pi \int_{0}^{\infty} e^{-u+6}du = \pi e^6$

(I think it's correct)
Thanks for the help=)

6. Jan 13, 2012

### HACR

wow that's great.

7. Jan 13, 2012

### Dick

That is great. But you don't have the repeat the polar coordinate trick every time you see a Gaussian integral. After you've done it once, you should just remember (or look up) $\int_{-\infty}^{\infty} e^{-u^2} du=\sqrt{\pi}$

8. Jan 13, 2012

### Noorac

Yeah, the next task was somewhat similar, same objective, and it took only 3 minutes compared to the 3-4 hours of the last one =)

Now it's on to triple-integrals and what will probably be the most fun weekend since school ended before christmas!

Again, thanks=)