Need help with the integral $\int_{0}^\infty e^{-x^{2}}x^{2n+1}dx $

I thought it might be instructive to present a way forward that relies on differentiating under the integral. To that end, we proceed.


Let $I(a)$ be given by the integral

$$I(a)=\int_0^\infty e^{-ax^2}\,x\,dx=\frac1{2a} \tag1$$

Differentiating $(1)$ $n$ times reveals

$$\begin{align} I^{(n)}(a)&=(-1)^n\int_0^\infty e^{-ax^2}\,x^{2n+1}\,dx\\\\ &=\frac12 \frac{d^n}{da^n}\left(\frac1a\right)\\\\ &=\frac1{2a^{n+1}}(-1)^n\,n!\tag2 \end{align}$$

Finally, setting $a=1$ in $(2)$, we find that

$$\bbox[5px,border:2px solid #C0A000]{\int_0^\infty e^{-x^2}\,x^{2n+1}\,dx=\frac12\,n!}$$

And we are done!


$n\geq 0$ integer.

$\displaystyle J=\int_{0}^\infty e^{-x^{2}}x^{2n+1}dx$

Perform the change of variable $y=x^2$,

$\begin{align}J&=\frac{1}{2}\int_{0}^\infty e^{-x}x^{n}dx\\ &=\frac{1}{2}\Gamma(n+1)\\ &=\boxed{\frac{1}{2} n!}\\ \end{align}$


Let's pretend that we have no idea about the Gamma function. Apply a substitution,

$$t = x^2$$

From which, $$I_n = \int_0^\infty e^{-t} (x^2)^n \cdot \frac x {2x} \mathrm d t$$ $$I_n = \frac 1 2 \int_0^\infty e^{-t} t^n \mathrm dt$$

As we are trying to prove that $2I_n = n!$, it is sufficient to prove that, from the recursive definition of the factorial,

$$2I_1 = 1$$ $$I_n = nI_{n-1}$$

Can you take it from here with IBP?