I am trying to prove the lhs of the following equation is equal to rhs.
\begin{align*} \int_{-\infty}^\infty H_n(x)e^{-x^2/2}\,\mathrm{d}x = \begin{cases} \frac{2\pi n!}{(n/2)!},& \text{if } n=\text{even}\\ 0, & \text{if } n=\text{odd} \end{cases} \end{align*}
This question is already asked here but I do not understand the answer. Here is what I have done so far. Generating function of Hermite function is,
\begin{align*} e^{-t^2+2tx} = \sum_{n=0}^\infty H_n(x)\frac{t^n}{n!} \end{align*}
Multiply both sides by $e^{-x^2/2}$ and integrate from $x=-\infty$ to $x=\infty$,
\begin{align*} \int_{-\infty}^\infty e^{-t^2+2tx}e^{-x^2/2}\,\mathrm{d}x &= \sum_{n=0}^\infty \frac{t^n}{n!} \int_{-\infty}^\infty H_n(x)e^{-x^2/2}\,\mathrm{d}x \\ \sqrt{2\pi}e^{t^2} &= \sum_{n=0}^\infty \frac{t^n}{n!} \int_{-\infty}^\infty H_n(x)e^{-x^2/2}\,\mathrm{d}x \end{align*}
Set $t=1$ and expand exponential on left hand side,
\begin{align*} \sqrt{2\pi}\sum_{n=0}^\infty \frac{1}{n!} = \sum_{n=0}^\infty \frac{1}{n!} \int_{-\infty}^\infty H_n(x)e^{-x^2/2}\,\mathrm{d}x \end{align*}
I cannot go further from this point on. Any hint?
While setting $t=1$ in the second-to-last equation gives a valid identity, it's not a very useful one. What you should instead do is expand the LHS of that equation in powers of $t$ just as you did already for the generating function. If you match this term-by-term to the RHS (i.e. require that the coefficient of $t^n$ be the same on both side) then you immediately obtain the desired result.