Compute $\int_{-\infty}^{\infty} (x^2e^{-ax^2+bx}) dx$

142 Views Asked by At

I'm trying to compute $\int_{-\infty}^{\infty} (x^2e^{-ax^2+bx}) dx$. The shape of the integral seems to suggests 2 approaches: Integration by parts and completing the square. However, both approaches don't quite work, there always are $x$ terms that get in the way. For example, trying integration by parts gives:$$\int_{-\infty}^{\infty} (x^2e^{-ax^2+bx}) dx = [x^2\frac{e^{-ax^2+bx}}{-2ax+b}]|_{-\infty}^{\infty} - \int_{-\infty}^{\infty} (2x\frac{e^{-ax^2+bx}}{-2ax+b}) dx$$ And while the first summand goes to zero the second summand is an even nastier integral than the first. I tried completing the square in the exponent, but that too doesn't solve the problem. What's the trick here? How does one crack this integral?

1

There are 1 best solutions below

2
On BEST ANSWER

\begin{align*} &\int_{-\infty}^{\infty}x^{2}e^{-a(x-b/2a)^{2}}e^{b^{2}/4a}dx\\ &=e^{b^{2}/4a}\int_{-\infty}^{\infty}(x+b/2a)^{2}e^{-ax^{2}}dx\\ &=e^{b^{2}/4a}\left(\int_{-\infty}^{\infty}x^{2}e^{-ax^{2}}dx+\dfrac{b}{a}\int_{-\infty}^{\infty}xe^{-ax^{2}}dx+\dfrac{b^{2}}{4a^{2}}\int_{-\infty}^{\infty}e^{-ax^{2}}dx\right). \end{align*}