# Confusing integral (from a QM problem, of course)

1. Jul 2, 2014

### Gebri Mishtaku

1. The problem statement, all variables and given/known data
The mathematical complication I'm having comes from Problem 1.9 in Griffiths' Introduction to Quantum Mechanics. I'm just going to provide the mathematics here:
The norm squared of the wave function is $\ \left|\Psi \right|^{2}$ = $(\frac{2am}{h\pi})^{1/2} e^{\frac{-2amx^{2}}{h}}$ where h is actually h bar (h/2pi). To find the expectation value $<x^{2}>$ I need to evaluate $\int x^{2} \left|\Psi \right|^{2}dx$.

2. Relevant equations
$\ \left|\Psi \right|^{2}$ = $(\frac{2am}{h\pi})^{1/2} e^{\frac{-2amx^{2}}{h}}$

$\int x^{2} \left|\Psi \right|^{2}dx (-\infty to \infty)$

3. The attempt at a solution
I tried integration by parts together the gaussian integral but still nothing, with and without the argument that the integrand is even. I'm left with infinities. The solution on the manual (Problem 1.9) http://www.thebestfriend.org/wp-content/uploads/IntroductiontoQuantumMechanics2thEdition.pdf skips the steps I'm having trouble with and immediately gives a finite result. I tried mathematica even and it gives me some sort of error function I've never seen before. Please, if you do have the time I would really appreciate if you made a step by step calculation of the integral in order for me to understand the process. I'm still quite not acquainted with the higher level special functions (for instance, the error function) because I'm not an undergrad yet so please keep that in mind if you so desire to provide an explanation.

2. Jul 2, 2014

### Saitama

Hi Gebri!

$$\int_{-\infty}^{\infty} x^2e^{-bx^2}\,dx$$
and you know the following result:
$$\int_{-\infty}^{\infty} e^{-bx^2}\,dx=\sqrt{\frac{\pi}{b}}\,\,\,\,\,\,(b>0)$$
Differentiate the above with respect to $b$ to obtain the required integral.

3. Jul 2, 2014

### pasmith

Consider $$I = \int_{-\infty}^\infty x^2e^{-Ax^2}\,dx = \int_{-\infty}^\infty x \frac{d}{dx}\left(-\frac{1}{2A}e^{-Ax^2}\right)\,dx$$ with $A > 0$. Integrating once by parts gives $$I = \left[ -\frac{xe^{-Ax^2}}{2A}\right]_{-\infty}^\infty + \frac{1}{2A}\int_{-\infty}^\infty e^{-Ax^2}\,dx.$$ The first term vanishes since if $A > 0$ then $$\lim_{x \to \infty} xe^{-Ax^2} = 0.$$ The second term is the integral of a Gaussian function, and its value is $\sqrt{\pi/A}$. Hence $$\int_{-\infty}^\infty x^2e^{-Ax^2}\,dx = \frac{1}{2}\sqrt{\frac{\pi}{A^3}}.$$

4. Jul 2, 2014

### Gebri Mishtaku

My only confusion about it relies on the fact that I just don't get the "why". Why exactly do I have to differentiate the outcome of the gaussian with respect to b? If it's some mathematical tool I'm not not acknowledging I'd be very appreciative of an explanation.

5. Jul 2, 2014

### Saitama

Differentiation under the integral symbol
Since we want a $x^2$ with the gaussian, differentiating with respect to $b$ immediately gives that factor of $x^2$. Do you see now? You can even do it by using integration by parts as pasmith did.

6. Jul 2, 2014

### Gebri Mishtaku

Thank you both so much! :D I was approaching the problem the way @pasmith did but @Pranav-Arora really opened my eyes on the "why". I am quite suprprised to be honest because I had never seen a single instance when while doing clever circumventions(like the one on @pasmith's first integral equation, which I quite enjoy) to need to differentiate by the square of the position in order to attain a factor. I guess the physical thought of it just didn't allow me to see the right mathematical way. Many thanks again :D