Compute integral $\int_{-\infty}^{\infty} x^{4n} e^{-x^2/2} \, dx$ While solving a more general problem, I came across the following integral
$$I= \int_{-\infty}^{\infty} x^{4n} e^{-x^2/2} \, dx$$
To start off, I defined $t:=x^2/2$ to get
\begin{align*}
I= \int_{-\infty}^\infty x^{4n} e^{-x^2/2} \, dx &= 2\int_0^\infty x^{4n} e^{-x^2/2} \, dx \\
&= 2 \int_0^\infty (\sqrt{2t})^{4n} e^{-t} \frac{dt}{\sqrt{2t}} \\
&= 2 (\sqrt{2})^{4n - 1} \int_0^\infty t^{2n - 1/2} e^{-t} \, dt 
\end{align*}
This seems to be a gamma function integral. I would start integrating by parts
\begin{align*}
\int_0^{+\infty} t^{2n-\frac{1}{2}}e^{-t} \, dt&=[ -t^{2n-\frac{1}{2}}e^{-t}]_0^{+\infty} - (-)(2n-\frac{1}{2})\int_0^{+\infty}t^{2n-\frac{1}{2}-1}e^{-t} \, dt \\
    &=(2n-\frac{1}{2})\int_0^{+\infty}t^{2n-\frac{1}{2}-1}e^{-t} \, dt
\end{align*}
But how to proceed further?
I looked up in a table and the result should be
$$I=2 (\sqrt{2})^{4n - 1} \Gamma\left(2n+ \frac 1 2 \right)$$
PS: Alternative methods avoiding the gamma function are very welcomed! :)
EDIT: I think that what Yves suggested was the following
$$I= \int_{-\infty}^\infty x^{4n} e^{-x^2/2}= (2n-\frac{1}{2}) (2n-\frac{3}{2}) (2n-\frac{5}{2})\cdots\frac{3}{2}\frac{1}{2} \int_0^{+\infty}t^{-\frac{1}{2}}e^{-t}\,dt=(2n-\frac{1}{2}) (2n-\frac{3}{2}) (2n-\frac{5}{2})\cdots\frac{3}{2}\frac{1}{2}\ \ 2\int_0^{+\infty}e^{-t} \, d(\sqrt{t})$$
Alrigtht! I see that $(2n-\frac{1}{2}) (2n-\frac{3}{2}) (2n-\frac{5}{2})\cdots\frac{3}{2}\frac{1}{2} = \Gamma\left(2n+ \frac 1 2 \right)$
NAIVE question though: how to see that $\int_0^{+\infty}e^{-t} \, d(\sqrt{t})=2 (\sqrt{2})^{4n - 1}$?

You're really done after the first integration by parts: as $\displaystyle \Gamma(z) = \int_0^\infty x^{z-1} e^{-x}\,dx,$
$\displaystyle 2 (\sqrt{2})^{4n - 1} \int_{0}^{\infty} t^{2n -\frac{1}{2}} e^{-t} dt  =2 (\sqrt{2})^{4n - 1} \int_{0}^{\infty} t^{2n + \frac{1}{2}-1} e^{-t} dt =2 (\sqrt{2})^{4n - 1} \Gamma\left(2n+ \frac 1 2 \right).$
In other words, your integral is the gamma function with $z = 2n+\frac{1}{2}$.
Regarding the other method, you have:
You've shown that if $\displaystyle I_n = \int_0^{\infty} t^{2n-\frac{1}{2}}\,{dt} $ then $I_n = \left(2n-\frac{1}{2}\right)I_{n-1}$ so that $$I_n =(2n-\frac{1}{2}) \cdot (2n-\frac{3}{2}) \cdot (2n-\frac{5}{2})\cdots\frac{3}{2} \cdot I_1 $$
Where $\displaystyle I_1 = \int_0^{+\infty}t^{\frac{1}{2}}e^{-t}\,dt$, then  $t = x^2$ shows that
$$\displaystyle I_1 = 2 \int_0^{\infty} x^2 e^{-x^2}\,{dx}. $$
Which evaluates to $\displaystyle \frac{1}{2}\sqrt{\pi}$ (see here). Therefore
$$\begin{aligned} I &= \sqrt{\pi} \cdot (2n-\frac{1}{2}) \cdot (2n-\frac{3}{2}) \cdot (2n-\frac{5}{2})\cdots\frac{3}{2} \cdot \frac{1}{2}\\& =\frac{\sqrt{\pi}}{2^{2n}}(4n-1) (4n-3) (4n-5)\cdots  3 \cdot 1 \\& =\frac{\sqrt{\pi}}{2^{2n}}\frac{(4n-1)(4n-2) (4n-3)(4n-4) (4n-5)\cdots 1}{(4n-2) (4n-4)  \cdots 2 }  \\& =\frac{\sqrt{\pi}}{2^{2n}}\frac{(4n-1)(4n-2) (2n-3)(2n-4) (2n-5)\cdots 3 \cdot \cdot 2 \cdot 1}{2^{2n} (2n-1) (2n-2) \cdots  1 }  \\& = \frac{(4n)!\sqrt{\pi}}{2^{4n}(2n)!}.\end{aligned}  $$
Therefore your original integral is $\displaystyle I =2 (\sqrt{2})^{4n - 1} \frac{(4n)!\sqrt{\pi}}{2^{4n}(2n)!}.$
This agrees with $\displaystyle I = 2 (\sqrt{2})^{4n - 1} \Gamma\left(2n+ \frac 1 2 \right)$ as $\displaystyle \Gamma\left(2n+ \frac 1 2 \right) = \frac{(4n)!\sqrt{\pi}}{2^{4n}(2n)!}$
(see here).
