In Stewart's Calculus book I came across the following Gaussian integral.
Using $\int_{-\infty}^{\infty}\exp{(-x^2)}dx = \frac{\sqrt{\pi}}{2}$ evaluate $$ \int_0^{\infty} x^2 e^{-x^2}dx $$
I read in this pdf that
$$ \int_{-\infty}^{\infty} e^{-ax^2}dx =\sqrt{ \frac{\pi}{a}} $$
and how to use differentiation under the integral sign to evaluate it (recreated below for convenience).
$$ \begin{align*} I(a) &= \int_{-\infty}^{\infty} e^{-ax^2} dx =\sqrt{ \frac{\pi}{a}} \\ I'(a)&= -\int_{-\infty}^{\infty} x^2 e^{-ax^2}dx = -\frac{1}{2}\sqrt{\pi} a^{-3/2} \\I'(1) &= \frac{\sqrt{\pi}}{2} \end{align*} $$ Using the results above (and Wolfram Alpha), I was able to conclude that $$ \int_0^{\infty} x^2 e^{-x^2}dx = \frac{\sqrt{\pi}}{4} $$ however, I was wondering if there is some substitution or an another way to evaluate the aforementioned integral seeing as Leibniz's rule is not mentioned anywhere in the chapter.
Observe that $$\left(e^{-x^2}\right)'=-2xe^{-x^2} \implies xe^{-x^2}=-\frac12\left(e^{-x^2}\right)'$$ so that the integral can be written as $$-\frac12\int_{0}^{+\infty}x\left(e^{-x^2}\right)'dx$$ and integration by parts gives $$-\frac12\int_{0}^{+\infty}x\left(e^{-x^2}\right)'dx=-\frac12\left[xe^{-x^2}\right]_{0}^{+\infty}du+\frac12\int_{0}^{+\infty}e^{-x^2}dx$$ (notice the abuse of notation in the upper limit. It should be $\lim_{t\to \infty}$ instead of $\infty$). It remains to show that $\lim_{x\to \infty}xe^{-x^2}=0$ which can be done by L'Hopitals rule, since $$\lim_{x\to \infty}xe^{-x^2}=\lim_{x\to\infty}\frac{x}{e^{x^2}}\overset{\frac{\infty}{\infty}}=\lim_{x\to\infty}\frac{1}{2xe^{x^2}}=0$$