TITLE: Integral of derivatives of $e^{-x^2}$
QUESTION [5 upvotes]: Let $m,n,k$ be nonnegative integers. How might I go about evaluating the following integral?
$$ \int_{-\infty}^\infty \left( \frac{\mathrm{d}^m}{\mathrm{d}x^m} e^{-x^2} \right) \left( \frac{\mathrm{d}^n}{\mathrm{d}x^n} e^{-x^2} \right) x^k e^{x^2} \mathrm{d}x $$

REPLY [14 votes]: HINT, not yet a complete answer.
Hermite polynomials:
$$H_n(x)=(-1)^n e^{x^2}\frac{d^n}{dx^n}e^{-x^2}$$
so integral becomes:
$$ I_{m,n,k}=(-1)^{m+n}\int_{-\infty}^\infty H_m(x) H_n(x) x^k e^{-x^2} \mathrm{d}x $$
Particular case $k=0$:
$$ I_{m,n,0}=(-1)^{m+n}\int_{-\infty}^\infty H_m(x) H_n(x) e^{-x^2} \mathrm{d}x =  (-1)^{m+n}\sqrt\pi 2^nn!\delta_{mn}$$
EDIT: The general case
Remembering that:
$$x^k = \frac{k!}{2^k} \sum_{j=0}^{\lfloor \tfrac{k}{2} \rfloor} \frac{1}{j!(k-2j)! } ~H_{k-2j}(x)~$$
and replacing in the general integral, we find:
$$I_{m,n,k}=(-1)^{m+n}\int_{-\infty}^\infty H_m(x) H_n(x) e^{-x^2} \frac{k!}{2^k} \sum_{j=0}^{\lfloor \tfrac{k}{2} \rfloor} \frac{1}{j!(k-2j)! } ~H_{k-2j}(x)~ \mathrm{d}x =$$
$$=\sum_{j=0}^{\lfloor \tfrac{k}{2} \rfloor} \frac{1}{j!(k-2j)! } \frac{k!}{2^k} (-1)^{m+n}\int_{-\infty}^\infty H_m(x) H_n(x) H_{k-2j} e^{-x^2} (x)~ \mathrm{d}x =$$
Now we can make use of the following integral:
$$\int_{-\infty}^\infty H_m(x) H_n(x) H_l(x) e^{-x^2} dx =  \frac{2^{\frac{m+n+l}{2}}l!m!n!\sqrt\pi}{\left(\frac{m+l-n}{2}\right)!\left(\frac{n+l-m}{2}\right)!\left(\frac{m+n-l}{2}\right)!}$$ when $\frac{m+n+l}{2}$ is integer and $m+n\ge l$ and $m+l \ge n$ and $l+n\ge m$ ; Zero otherwise.
Therefore:
$$I_{m,n,k}=\sum_{j=0}^{\lfloor \tfrac{k}{2} \rfloor} \frac{1}{j!(k-2j)! } \frac{k!}{2^k} (-1)^{m+n}  \frac{2^{\frac{m+n+k-2j}{2}}(k-2j)!m!n!\sqrt\pi}{\left(\frac{m+k-2j-n}{2}\right)!\left(\frac{n+k-2j-m}{2}\right)!\left(\frac{m+n-k+2j}{2}\right)!}=$$
Simplifying ( we have employed the fact that if $m+n-k$ is an even integer also $\pm m \pm n \pm k$ and $\pm m \pm n \pm k \pm 2j$ are even integers) we can rewrite:
$$I_{m,n,k} = \begin{cases}2^{\frac{m+n-k}{2}}(-1)^{m+n}m!n!k! \sqrt\pi \sum_{j=0}^{\lfloor \tfrac{k}{2} \rfloor}  \frac{2^{-j}[m+n+\ge k-2j][m+k-2j \ge n][k-2j+n\ge m] }{j!\left(\frac{m+k-2j-n}{2}\right)!\left(\frac{n+k-2j-m}{2}\right)!\left(\frac{m+n-k+2j}{2}\right)!} & \text{when $\frac{m+n+k}{2}$ is integer} \\ 0 & \text{ otherwise} \end{cases}$$
where the Iverson convention (see "Concrete Mathematics" Graham,Knuth,Patshnik, and http://en.wikipedia.org/wiki/Iverson_bracket ) has been employed:
$$[statement]=\begin{cases}1 & \text{when statement is true} \\ 0 & \text{otherwise}\end{cases}$$
ADDENDUM (Alternative solution)
At Wolfram:
http://mathworld.wolfram.com/HermitePolynomial.html
Equation (52) gives another solution of aboveseen integral. I think this alternative solution has a complexity comparable to that I have proposed.
http://mathworld.wolfram.com/images/equations/HermitePolynomial/NumberedEquation14.gif