The Hermite polynomials $H_n(x)$ have the following explicit expression:
$$H_n(x)=\sum_{m=0}^{\lfloor n/2\rfloor}\frac{(-1)^mn!2^{n-2m}}{m!(n-2m)!}\,x^{n-2m}\,.$$
On the other hand, the Legendre polynomials have the following explicit expression:
$$P_n(x)=\frac1{2^n}\sum_{k=0}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}\,,$$
which implies
$$t^{n+1}P_n(x/t)=\frac1{2^n}\sum_{k=0}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}\,t^{2k+1}\,.$$
For $k\geq0$, let $A_k=\int_x^\infty e^{-t^2}t^{2k+1}\,dt$. Integrating by parts we obtain
$$\begin{align*}
A_k=&\,\int_x^\infty\frac{t^{2k}}{-2}e^{-t^2}(-2t)\,dt\\[2mm]
=&\,\frac{t^{2k}e^{-t^2}}{-2}\biggl|_{t=x}^{t=\infty}-\int_x^\infty-ke^{-t^2}t^{2k-1}\,dt\\[2mm]
=&\,\frac{x^{2k}e^{-x^2}}2+kA_{k-1}\,;
\end{align*}$$
in particular $A_0=e^{-x^2}/2$, and so for each $k\geq0$ we have
$$\sum_{r=1}^k\frac{A_r-rA_{r-1}}{r!}=\sum_{r=1}^k\frac{x^{2r}e^{-x^2}}{2\cdot r!}$$
that is
$$\frac{A_k}{k!}-\frac{A_0}{0!}=\frac{e^{-x^2}}2\sum_{r=1}^k\frac{x^{2r}}{r!}\,.$$
Therefore we have, for $k\geq0$:
$$A_k=\frac{e^{-x^2}}2\sum_{r=0}^k\frac{k!}{r!}\,x^{2r}\,,$$
which in turn implies that
$$\begin{align*}
2^{n+1}e^{x^2}\int_x^\infty e^{-t^2}t^{n+1}P_n(x/t)\,dt=&\,2^{n+1}e^{x^2}\int_x^\infty e^{-t^2}\frac1{2^n}\sum_{k=0}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}t^{2k+1}\,dt\\[2mm]
=&\,2^{n+1}e^{x^2}\frac1{2^n}\sum_{k=0}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}\underbrace{\int_x^\infty e^{-t^2}t^{2k+1}\,dt}_{=A_k}\\[2mm]
=&\,2e^{x^2}\sum_{k=0}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}\,\frac{e^{-x^2}}2\sum_{r=0}^k\frac{k!}{r!}\,x^{2r}\\[2mm]
=&\,\sum_{k=0}^{\lfloor n/2\rfloor}\sum_{r=0}^k\frac{(-1)^k(2n-2k)!}{k!(n-k)!(n-2k)!}\,x^{n-2k}\,\frac{k!}{r!}\,x^{2r}\\[2mm]
=&\,\sum_{k=0}^{\lfloor n/2\rfloor}\sum_{r=0}^k\frac{(-1)^k(2n-2k)!}{r!(n-k)!(n-2k)!}\,x^{n-2(k-r)}\,.
\end{align*}$$
Our objective is to show that
$$\sum_{m=0}^{\lfloor n/2\rfloor}\frac{(-1)^mn!2^{n-2m}}{m!(n-2m)!}\,x^{n-2m}=\sum_{k=0}^{\lfloor n/2\rfloor}\sum_{r=0}^k\frac{(-1)^k(2n-2k)!}{r!(n-k)!(n-2k)!}\,x^{n-2(k-r)}\,.$$
Note that when $k$ and $r$ ranges as in the right-hand side double sum above, then the quantity $k-r$ varies precisely on the set $\bigl\{0,1,\dots,\lfloor n/2\rfloor\bigr\}$. Given $m$ in this set, then the possible pairs $(k,r)$ with $k-r=m$ are precisely those satisfying $m\leq k\leq\lfloor n/2\rfloor$ and $r=k-m$, so the right-hand side sum above can be rewritten as
$$\begin{align*}
&\,\sum_{m=0}^{\lfloor n/2\rfloor}\,\Biggl[\,\sum_{k=m}^{\lfloor n/2\rfloor}\frac{(-1)^k(2n-2k)!}{(k-m)!(n-k)!(n-2k)!}\Biggr]\,x^{n-2m}\\[2mm]
=&\,\sum_{m=0}^{\lfloor n/2\rfloor}\,\Biggl[\,\sum_{k=m}^{\lfloor n/2\rfloor}(-1)^k\,\binom{2n-2k}n\,\binom nk\,\binom km\,m!\,\Biggr]\,x^{n-2m}\,,
\end{align*}$$
so it remains to prove that for any $n,m$ with $0\leq m\leq\lfloor n/2\rfloor$ the following equality holds:
$$\frac{(-1)^mn!2^{n-2m}}{m!(n-2m)!}=\sum_{k=m}^{\lfloor n/2\rfloor}(-1)^k\,\binom{2n-2k}n\,\binom nk\,\binom km\,m!\,,$$
or, equivalently,
$$(-1)^m2^{n-2m}\,\binom n{2m}\,\binom{2m}m=\sum_{k=0}^n(-1)^k\,\binom{2n-2k}n\,\binom nk\,\binom km\tag{$\boldsymbol{\ast}$}$$
(the summands with $k<m$ or $\lfloor n/2\rfloor<k\leq n$ are equal to $0$).
I already have a proof of this fact, but it is too long to write down, so I will include later. This proves the result.
ADDENDUM
Let $n$ and $m$ be as before, fixed. Let $f(z)=\sum_{j=0}^\infty(-1)^j\,\binom nj\,\binom jm\,z^j$ and $g(z)=\sum_{j=0}^\infty\binom{2j}n\,z^j$. Then the right-hand side of $\boldsymbol{(\ast)}$ is precisely the coefficient of $z^n$ in the power series expansion of $f(z)g(z)$. I use Mathematica to obtain the formulas for $f$ and $g$, and afterwards I $\ $ construct $\ \ $ try to construct a direct proof of the equalities (thanks Mathematica!). Now
$$\begin{align*}
f(z)=&\,\sum_{j=m}^n(-1)^j\,\frac{n!j!}{j!(n-j)!m!(j-m)!}\,\frac{(n-m)!}{(n-m)!}\,z^j\\[2mm]
=&\,\sum_{j=m}^n(-1)^j\,\binom{n-m}{j-m}\,\binom nm\,z^j\\[2mm]
=&\,\sum_{j=0}^{n-m}(-1)^{j+m}\,\binom{n-m}j\,\binom nm\,z^{j+m}\\[2mm]
=&\,\binom nm\,(-z)^m(1-z)^{n-m}\,.
\end{align*}$$
On the other hand, denote by $\lceil x\rceil$ the least integer greater or equal than $x$. Then
$$g(z)=\sum_{\substack{j\geq0\\2j\geq n}}\binom{2j}n\,z^j=\sum_{j=\lceil n/2\rceil}^\infty\binom{2j}n\,z^j\,.$$
If $k=2j-n$ then $k\equiv n(\bmod\ 2)$, and $k\geq0$ iff$j\geq\lceil n/2\rceil$. Therefore the sum above can be rewritten as
$$\begin{align*}
g(z)=&\,\sum_{\substack{k\geq0\\k\equiv n(\bmod\ 2)}}\binom{k+n}n\,z^{\,(k+n)/2}\\
=&\,\frac{(-1)^n}2\sum_{k=0}^\infty\binom{k+n}n\,\bigl[(-1)^k-(-1)^{n+1}\bigr]\,z^{\,(k+n)/2}\\
=&\,\frac{(-1)^nz^{n/2}}2\sum_{k=0}^\infty\binom{k+n}n\,\bigl[(-1)^k-(-1)^{n+1}\bigr]\,z^{\,k/2}\\
=&\,\frac{(-1)^nz^{n/2}}2\sum_{k=0}^\infty\binom{k+n}n\,\bigl[\bigl(-\sqrt z\bigr)^k-(-1)^{n+1}\bigr(\sqrt z\bigr)^k\bigr]\,.\\
\end{align*}$$
Now we use the fact that $(1-\alpha)^{-(n+1)}=\sum_{k=0}^\infty\binom{k+n}k\,\alpha^k=\sum_{k=0}^\infty\binom{k+n}n\,\alpha^k$ (for $|\alpha|$ small), obtaining
$$\begin{align*}
g(z)=&\,\frac{(-1)^nz^{n/2}}2\Biggl[\frac1{\ \ \bigl[1-\bigl(-\sqrt z\bigr)\bigr]^{\,n+1}}-(-1)^{n+1}\frac1{\ \ \bigl[1-\sqrt z\,\bigr]^{\,n+1}}\Biggr]\\
=&\,\frac{(-1)^nz^{n/2}}2\,\frac{\bigl(\sqrt z-1\bigr)^{\,n+1}-\bigl(\sqrt z+1\bigr)^{\,n+1}}{(z-1)^{n+1}}\,.
\end{align*}$$
Therefore
$$\begin{align*}
f(z)g(z)=&\,\binom nm\,(-z)^m(1-z)^{n-m}\,\frac{(-1)^nz^{n/2}}2\,\frac{\bigl(\sqrt z-1\bigr)^{\,n+1}-\bigl(\sqrt z+1\bigr)^{\,n+1}}{(z-1)^{n+1}}\\
=&\,\binom nm\,z^m\,\frac{z^{n/2}}2\,\frac{\bigl(\sqrt z-1\bigr)^{\,n+1}-\bigl(\sqrt z+1\bigr)^{\,n+1}}{(z-1)^{m+1}}\\
=&\,\binom nm\,\frac{z^m}{2(z-1)^{m+1}}\,z^{n/2}\ \sum_{k=0}^{n+1}\binom{n+1}k\,\bigl(\sqrt z\bigr)^{\,k}\bigl[(-1)^{n+1-k}-1\bigr]\\
=&\,\binom nm\,\frac{z^m}{(z-1)^{m+1}}\sum_{\substack{0\leq k\leq n+1\\k\equiv n(\bmod\ 2)}}-\binom{n+1}k\,z^{\,(k+n)/2}\\
=&\,(-1)^m\binom nm\,z^m\Biggl[\sum_{\substack{0\leq k\leq n+1\\k\equiv n(\bmod\ 2)}}\binom{n+1}k\,z^{\,(k+n)/2}\Biggr]\sum_{r=0}^\infty\binom{r+m}m\,z^r\,.
\end{align*}$$
Taking $k=2j-n$, we see that $0\leq k\leq n+1$ iff $\frac n2\leq j\leq n+\frac12$, which implies
$$\begin{align*}
f(z)g(z)=&\,(-1)^m\binom nm\,z^m\Biggl[\sum_{j=\lceil n/2\rceil}^n\binom{n+1}{2j-n}\,z^j\,\Biggr]\sum_{r=0}^\infty\binom{r+m}m\,z^r\\
=&\,(-1)^m\binom nm\,z^m\Biggl[\sum_{j=0}^\infty\binom{n+1}{2j-n}\,z^j\,\Biggr]\sum_{r=0}^\infty\binom{r+m}m\,z^r\\
\end{align*}$$
It remains to show that the coefficient of $z^{n-m}$ in $\Bigl[\sum_{j=0}^\infty\binom{n+1}{2j-n}\,z^j\,\Bigr]\sum_{r=0}^\infty\binom{r+m}m\,z^r$ is equal to $2^{n-2m}\binom{n-m}m$. Unfortunately, I was unable to prove this, but Mathematica says that it is true: taking $n=2\ell$ the software confirms that
$$2^{2(\ell-m)}\,\binom{2\ell-m}m-\sum_{j=\ell}^{2\ell-m}\binom{2\ell+1}{2(j-\ell)}\,\binom{2\ell-j}m=0\,,$$
and similarly it is confirmed that for $n=2\ell+1$ the equality
$$2^{2(\ell-m)+1}\,\binom{2\ell+1-m}m-\sum_{j=\ell+1}^{2\ell+1-m}\binom{2(\ell+1)}{2(j-\ell)-1}\,\binom{2\ell+1-j}m=0$$
holds.
- Method 1: recurrence relations and symmetries of the Hermite polynomials
Hint: I would use the relations
$$H_{n+1}(x)=xH_n(x)-H'_n(x), $$
$$H'_n(x)=nH_{n-1}(x) $$
and an induction argument, as follows. Let us suppose the steps $k=1,\dots,n-1$ are true; we want to show that
$$\int e^{-x^2}H_n^2(x)x^2dx=2^nn!\sqrt{\pi}(n+\frac{1}{2}). $$
Using the above relations the l.h.s is
$$\int e^{-x^2}H_n^2(x)x^2dx=\int e^{-x^2}x^2(xH_{n-1}(x)-H'_{n-1}(x))^2dx=
\int e^{-x^2}x^4H^2_{n-1}(x)dx \\
-2\int e^{-x^2}x^3H_{n-1}(x)H^{'}_{n-1}(x)dx
+\int e^{-x^2}x^2(H^{'}_{n-1}(x))^2dx=\\
\int e^{-x^2}x^4H^2_{n-1}(x)dx -2(n-1)\int e^{-x^2}x^3H_{n-1}(x)H_{n-2}(x)dx
+\\(n-1)^2\int e^{-x^2}x^2(H_{n-2}(x))^2dx. ~(*)
$$
Let us discuss $(*)$: the first 2 terms can be reduced using integration by parts on the products
$$e^{-x^2}x^4H^2_{n-1}(x)=-(-\frac{1}{2}(2x)e^{-x^2})x^3H_{n-1}(x),$$
$$e^{-x^2}x^3H_{n-1}(x)H_{n-2}(x)=-(-\frac{1}{2}(2x)e^{-x^2})x^2H_{n-1}(x)H_{n-2}(x), $$
while the last term can be evaluated by the induction hypothesis.
All we need is to remember that
$$\int e^{-x^2}x^{2q+1}H^2_{r}(x)dx=0,$$
$$\int e^{-x^2}x^{2q}H_{r}(x)H_{r-1}(x)dx=0,$$
for all $q\in\mathbb N$, $r\geq 1$ for symmetry. For the second equality we used
$H_r$ odd/even $\Leftrightarrow$ $H_{r-1}$ even/odd, which follows directly from the definition of the Hermite polynomials.
- Method 2: generating function
Using the generating function suggested by the OP, one needs to integrate w.r.t $x$ on the whole real axis both sides of
$$x^2e^{-x^2}e^{-\frac{t}{1+t}x^2}\frac{1}{\sqrt{1-t^2}}= \sum_{n=1}^\infty x^2e^{-x^2}\frac{H_n^2(x)}{2^nn!}t^n,$$
and expanding w.r.t. $t$. The integral on the l.h.s. is Gaussian and can be evaluated with standard techniques reducing to the case
$$\int_{-\infty}^\infty x^2e^{-\alpha(t)x^2}dx=\frac{1}{2}\sqrt{\frac{\pi}{\alpha(t)^3}}, ~(1)$$
for $\alpha(t)>0$ and $|t|<1$.
- Generating function with $\alpha(t)=\frac{1-t}{1+t}$
In the case under exam, multiplying both sides of the generating function identity w.r.t the product $x^2 e^{-x^2}$ ($e^{-x^2}$ is the weight for the integral identities involving the Hermite polynomials) and integrating, we arrive at (the exchange between summation and integration is allowed by the properties of Hermite poly.)
$$\frac{1}{\sqrt{1-t^2}} \int_{-\infty}^\infty x^2 e^{-x^2} e^{-\frac{t}{1+t}x^2}dx= \sum_{n=1}^\infty \int_{-\infty}^\infty x^2e^{-x^2}\frac{H_n^2(x)}{2^nn!}t^n; $$
to arrive at the thesis we write (using (1))
$$g(t):=\frac{1}{\sqrt{1-t^2}}\int_{-\infty}^\infty x^2e^{-\frac{1-t}{1+t}x^2}dx=\frac{1}{\sqrt{1-t^2}}\frac{1}{2}\sqrt{\frac{\pi}{\left(\frac{1-t}{1+t}\right)^3}}=\frac{\sqrt{\pi}}{2}\frac{1+t}{(1-t)^2}$$
for $|t|<1$ and we expand w.r.t $t$ at $t=0$ the function $g(t)$, obtaining
$$g(t)=\frac{\sqrt{\pi}}{2}\left(1+3t+\frac{1}{2!}10t^2+O(t^3)\right)$$
(the higher terms are easily computed, as well). This gives the thesis. I hope it helps.
Best Answer
Finally I found how to do it. I post it, if someone is interested.
\begin{align} D_{ln}(\varkappa) &= \frac{1}{\sqrt{2^nn!}\sqrt{2^ll!}}\frac{1}{\sqrt{\pi}}\int_{-\infty}^{+\infty}H_n(\tilde{x})e^{-\tilde{x}^2+\varkappa \tilde{x}}H_l(\tilde{x})\;\mathrm{d}\tilde{x} \notag\\ &= \frac{1}{\sqrt{2^nn!}\sqrt{2^ll!}}\frac{1}{\sqrt{\pi}}\int_{-\infty}^{+\infty}H_n(\tilde{x})e^{-\tilde{x}^2+\varkappa \tilde{x}-\varkappa^2/4}e^{\varkappa^2/4}H_l(\tilde{x})\;\mathrm{d}\tilde{x} \notag\\ &= \frac{1}{\sqrt{2^nn!}\sqrt{2^ll!}}\frac{1}{\sqrt{\pi}}e^{\varkappa^2/4}\underbrace{\int_{-\infty}^{+\infty}H_n(\tilde{x})e^{-(\tilde{x}-\varkappa/2)^2}H_l(\tilde{x})\;\mathrm{d}\tilde{x}}_I \end{align}
If we pose $x = \tilde{x}-\frac{\varkappa}{2}$ in this expression, the integral $I$ becomes
\begin{equation*} I = \int_{-\infty}^{+\infty}H_n(x+\varkappa/2)e^{-x^2}H_l(x+\varkappa/2)\;\mathrm{d}x \end{equation*}
We know that
\begin{equation*} H_n(x+a) = \sum_{p=0}^n \frac{n!}{(n-p)!p!}(2a)^{n-p}H_p(x) \end{equation*}
Hence, the integral $I$ becomes
\begin{align*} I &= \int_{-\infty}^{+\infty} \sum_{p=0}^n \frac{n!}{(n-p)!p!}\varkappa^{n-p}H_p(x) e^{-x^2} \sum_{q=0}^l \frac{l!}{(l-q)!q!}\varkappa^{l-q}H_q(x)\;\mathrm{d}x \\ &= \sum_{p=0}^n\sum_{q=0}^l \frac{n!}{(n-p)!p!}\varkappa^{n-p}\frac{l!}{(l-q)!q!}\varkappa^{l-q}\int_{-\infty}^{+\infty}H_p(x) e^{-x^2}H_q(x)\;\mathrm{d}x \\ \end{align*}
The Hermite polynomials are orthogonal in the range $(-\infty,\infty)$ with respect to the weighting function $e^{-x^2}$ and satisfy
\begin{alignat*}{2} &&&\int_{-\infty}^{+\infty}H_p(x) e^{-x^2}H_q(x)\;\mathrm{d}x = \sqrt{\pi}2^pp!\;\delta_{pq} \\ &\Rightarrow\quad&& I = \sum_{p=0}^n\sum_{q=0}^l \frac{n!}{(n-p)!p!}\frac{l!}{(l-q)!q!}\varkappa^{n+l-p-q}\cdot \sqrt{\pi}2^pp!\;\delta_{pq} \end{alignat*}
As this integral is nil if we have not $p=q$, we can replace the two sums by only one that goes from 0 to $\min(n,l)$. Let us say that $n<l$. Hence, the full expression for the $D$-matrix is
\begin{align} D_{ln}(\varkappa) &= \frac{1}{\sqrt{2^nn!}\sqrt{2^ll!}}\frac{1}{\sqrt{\pi}}e^{\varkappa^2/4} \sum_{p=0}^n \frac{n!}{(n-p)!p!}\frac{l!}{(l-p)!p!}2^pp!\sqrt{\pi}\;\varkappa^{n+l-2p} \notag\\ &= \frac{\varkappa^{n+l}}{\sqrt{2^nn!}\sqrt{2^ll!}}e^{\varkappa^2/4} \sum_{p=0}^n \frac{n!}{(n-p)!p!}\frac{l!}{(l-p)!}2^p\;\varkappa^{-2p} \notag\\ &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{n+l}e^{\varkappa^2/4} \sum_{p=0}^n \frac{l!}{(n-p)!(l-p)!p!}\left(\frac{\varkappa^2}{2}\right)^{-p} \notag\\ &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{l-n}e^{\varkappa^2/4} \sum_{p=0}^n \frac{l!}{(n-p)!(l-p)!p!}\left(\frac{\varkappa^2}{2}\right)^{n-p} \end{align}
Associated Laguerre polynomials $L_a^b(x)$ are given by
\begin{equation*} L_a^b(x) = \sum_{k=0}^{a}(-1)^k \frac{(a+b)!}{(a-k)!(b+k)!k!}x^k \end{equation*}
It suggests us to transform the expression of the $D$-matrix by posing $k=n-p$. Hence, we have
\begin{align} D_{ln}(\varkappa) &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{l-n}e^{\varkappa^2/4} \sum_{k=n}^0 \frac{(l)!}{(n-(n-k))!(l-(n-k))!(n-k)!}\left(\frac{\varkappa^2}{2}\right)^{n-(n-k)} \notag\\ &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{l-n}e^{\varkappa^2/4} \sum_{k=0}^n \frac{l!}{k!(l-n+k)!(n-k)!}\left(\frac{\varkappa^2}{2}\right)^{k} \notag\\ &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{l-n}e^{\varkappa^2/4} \sum_{k=0}^n (-1)^k\frac{([l-n]+n)!}{(n-k)!([l-n]+k)!k!}\left(-\frac{\varkappa^2}{2}\right)^{k} \notag\\ &= \sqrt{\frac{n!}{l!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{l-n}e^{\varkappa^2/4}L_n^{l-n}\left(-\frac{\varkappa^2}{2}\right) \end{align}
It should be remembered that we had supposed that $n<l$. But that could be otherwise. In order to be general, $n_<$ and $n_>$ will be defined as $n_<=\min{(n,l)}$ and $n_>=\max{(n,l)}$ and $l-n=|l-n|$. We then have
\begin{equation} D_{ln}(\varkappa) = \sqrt{\frac{n_<!}{n_>!}}\left(\frac{\varkappa}{\sqrt{2}}\right)^{|l-n|}L_{n_<}^{|l-n|}\left(-\frac{\varkappa^2}{2}\right)e^{\varkappa^2/4} \end{equation}