# Simple integral or not?

1. Jan 29, 2005

### PICsmith

This should be a fairly simple integral but I can't get it for some reason. Here's the problem:
$$A\int_{-\infty}^{\infty} x e^{-\lambda(x-a)^2}dx$$
Now I know that
$$\int_{-\infty}^{\infty} e^{-x^2}dx=\sqrt{\pi}$$
only for those limits.
Okay so I do parts,
$$u=x$$
$$du=dx$$
$$dv=e^{-\lambda(x-a)^2}dx$$
$$v=?$$
When you evaluate the integral from dv to get v, you substitue say
$$s=\sqrt{\lambda}(x-a)$$
to make it like the second integral i put down, but you can't evaluate it between the limits of -infinity to infinity when doing parts right? And the indefinite integral of this form is not solvable as far as I know.

BTW, This is for my QM class, finding the average/expectation value of x,
$$<x>$$

Am I even going about this the right way? I don't know anymore. Please tell me where I screwed up and point me in the right direction.

2. Jan 29, 2005

### Curious3141

Here's a hint :

$$\frac{d}{dx}e^{-x^2} = -2xe^{-x^2}$$

Use a substitution to get the integrand to a form like the above. You'll still have a term that needs the error function, but you already know how to handle that.

3. Jan 29, 2005

### PICsmith

Awesome, I got it!
Much thanks Curious :D

4. Jan 29, 2005

### Curious3141

5. Jan 29, 2005

### PICsmith

doh!!

I'm stuck again :grumpy:

Okay, so I found <x> and now I have to find <x^2>, which gives,
$$A\int_{-\infty}^{\infty} x^2 e^{-\lambda(x-a)^2}dx$$
$$u=\sqrt{\lambda}(x-a)$$
which gives me a error function term that just equals $$\sqrt{\pi}$$, a term that goes to zero and another term that is,
$$\int_{-\infty}^{\infty}u^2e^{-u^2}du$$
and I'm having trouble solving this now.

Is there another substitution that I should have made initially? I couldn't find one. I swear this is the last time I'll need help . Any help is greatly appreciated.

6. Jan 30, 2005

### learningphysics

You can solve the above integral using integration by parts.

7. Jan 30, 2005

### FulhamFan3

for an equation of form:

$$\int_{-\infty}^{\infty}x^2e^{-x^2}dx$$

do integration by parts with

$$u=x$$
$$dv=xe^{-x^2}dx$$

8. Jan 30, 2005

### PICsmith

Geez how could I not see that? Thanks for spending your 300th post helping me out learningphysics! And thanks to you too FulhamFan3.

9. Jan 30, 2005

### dextercioby

I hope your first integral was zero... :uhh: As u had to integrate the odd function on a symmetric interval wrt to the origin...

Daniel.

P.S.The Cauchy principal value...

10. Jan 30, 2005

### PICsmith

I forget to mention that lambda and a are positive real constants (and A = sqrt(lambda/pi)), so the function is symmetric about x=a not the origin, and the first integral turns out to be just <x> = a, and the second one <x^2> = a^2 + 1/(2*lambda) (for anyone who's interested).

11. Jan 30, 2005

### dextercioby

Yes,you're right,it's not symmetric wrt 0...I should have looked better...

Good thing you finally pulled them through.

Daniel.