# Calculating an integral (QM / probability)

1. Mar 27, 2013

### fluidistic

1. The problem statement, all variables and given/known data
Hi guys, I've an integral that poped up in QM, it should be different from 0 (else the particle's position is known with 100% certainty while it should not with the wave function I was given). However I get 0 and I don't see where my mistake(s) is/are.
$<(x-a)^2>=\int _{-\infty } ^\infty (x-a)^2N^2 \exp \{ - \frac{(x-a)^2}{2 \sigma ^2} \}dx$.

2. The attempt at a solution
I make the change of variables $\alpha = (x-a)^2$ so that $d\alpha = 2(x-a)dx$. So as x goes from - infinity to + infinity, alpha goes from + infinity to + infinity and therefore the integral becomes $\int _{\infty} ^\infty \frac{\sqrt \alpha }{2}N^2 \exp \{ - \frac{\alpha }{2 \sigma ^2} \}d\alpha =0$ because of the limits of integration (they are the same).
I've done the exact same change of variables with another integral that yielded 0 this way and it was correct. However here I must not get 0, but I do.
Where did I go wrong?

2. Mar 27, 2013

### Ray Vickson

$x = a \pm \sqrt{\alpha}$, so the integrations for $x < a$ and $x > a$ need to be kept separate. So, no, you do not get 0. However, I don't know why you want to make that change of variable. It would be much, much easier to let $y = (x-a) / \sigma$.

3. Mar 28, 2013

### fluidistic

I see. So if I understand well, even though alpha goes from +infinity to +infinity, it "passes by" 0 (in which case x=a) so I should take this into account in the limits of integration.

4. Mar 28, 2013

### fluidistic

You're a boss Ray Vickson! I reached a result that makes sense (variance is worth $\sigma ^2$).
I chose the change of variables $\alpha = \frac{x-a}{\sqrt 2 \sigma}$. In order to compute $\int _{-\infty}^\infty \alpha ^2 e^{-\alpha ^2 }d\alpha$ I used a trick: I thought the integral as $\int _{-\infty}^\infty \alpha ^2 e^{-\alpha ^2 \gamma}d\alpha$ as if it was dependent on gamma (despite it being worth 1). Then I rewrote the integral as $-\int _{-\infty}^{\infty} \frac{\partial }{\partial \gamma} (e^{-\alpha ^2 \gamma}) d\alpha$.
After a few algebra I had to use the fact that $\int _{-\infty}^\infty e^{-\alpha ^2 \gamma} d\alpha=\sqrt \frac{\pi}{\gamma}$ (that I had demonstrated in a previous exercise).
All in all I solved the original integral, it's worth $\sqrt{2\pi} \sigma ^3N^2$.