Computing Some Integrals via Gauss Integral $ \displaystyle\int_{-\infty }^\infty e^{-\frac{1}{2} x^2} \; dx $ 
and 
$ \displaystyle\int_{-\infty }^\infty x^{2}e^{-\frac{1}{2}x^2} \; dx $ 
how i compute these integrals via Gauss Integral?
 A: Make the substitution $x = \sqrt{2}\  t$ in both, and use integration by parts in the second, by writing 
$$2t^2 e^{-t^2} = -t \times \frac{d e^{-t^2}}{dt}$$
A: The one on the left is what I usually think of when I hear the term "Gaussian integral".  But some people, maybe especially physicists, omit the fraction $1/2$.  Including the $1/2$ makes sense because then the variance of the probability distribution that you get when you normalize the function to be a probability density is $1$.
If you know that
$$
\int e^{-w^2}\;dw=\sqrt{\pi},
$$
then you can write $x=\sqrt{2}\;w$ and $dx=\sqrt{2}\; dw$.  As $w$ goes from $-\infty$ to $\infty$, so does $x$.  So
$$
\int_{-\infty}^\infty e^{-\frac 12 x^2}\; dx = \int_{-\infty}^\infty e^{-w^2} \sqrt{2} \; dw = \sqrt{2\pi\;{}}.
$$
For $\displaystyle\int_{-\infty}^\infty e^{-\frac 1 2 x^2} \; dx,$ begin by observing that it's an even function integrated over an interval that is symmetric about $0$, so it's equal to
$$
2 \int_0^\infty x^2 e^{-\frac 1 2 x^2} \; dx.
$$
Then substitute $u=\frac 1 2 x^2$, $du = x\;dx = \sqrt{2u} \; dx$, so $\dfrac{du}{\sqrt{2u}} =dx$.  The integral becomes
$$
2\int_0^\infty  2u e^{-u} \frac{du}{\sqrt{2u}} = \frac{4}{\sqrt{2}} \int_0^\infty u^{\frac 3 2 - 1} e^{-u}\;du = 2\sqrt{2}\Gamma\left(\frac 3 2 \right) = 2\sqrt{2}\cdot \frac 1 2 \Gamma\left( \frac 1 2 \right) = \sqrt{2\pi}.
$$
A: An interesting alternate way to evaluate the second integral $\displaystyle\int_{-\infty }^\infty x^{2}e^{-\frac{1}{2}x^2} \; dx$  using the results form the first one is to utilize a technique called "differentiation under the integral sign".
From a substitution and our first integral's value in hand, we can conclude that $ \forall \alpha > 0 \in \mathbb{R} $,
$\displaystyle\int_{-\infty }^\infty e^{-\alpha x^2} \; dx = {\dfrac{\sqrt{\pi}}{\sqrt{\alpha}}} $.
Now we differentiate both sides with respect to $\alpha$ (under the integral sign on the left), and we obtain
$  \displaystyle\int_{-\infty }^\infty -x^2 e^{-\alpha x^2} \; dx$ = $-\dfrac{\sqrt{\pi}}{2\alpha\sqrt{\alpha}}$
Factoring out the $-1$ from both sides and plugging in $\alpha = 1/2$ gives us our answer:
$\displaystyle\int_{-\infty }^\infty x^{2}e^{-\frac{1}{2}x^2} \; dx = \dfrac{\sqrt{\pi}}{\sqrt{1/2}} = \sqrt{2\pi}.$
