The probability density of a normal random variable with mean \( \mu \) and variance \( \sigma^2 \) is \begin{align} p(x) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \end{align}
One way to show that the probability density integrates to one is to consider the following integral and switch to polar co-oridinates.
\begin{align}
&\int_{-\infty}^{\infty} e^{-\frac{x^2}{2}}\int_{-\infty}^{\infty}e^{-\frac{y^2}{2}} dx dy \\
&\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-\frac{x^2 + y^2}{2}} dx dy
\end{align}
switching to polar co-ordinates \( x = r \cos \theta \), \( y = r \sin \theta \)
We calculate the Jacobian to change integration variables.
\begin{align}
&\left|
\frac{\partial (x,y)}{\partial (r,\theta)}
\right | =
\left |
\begin{array}{cc}
\frac{\partial x}{\partial r}& \frac{\partial y}{\partial r}\\
\frac{\partial x}{\partial \theta} & \frac{\partial y}{\partial \theta}\\
\end{array}
\right | \\
&=\left |
\begin{array}{cc}
\cos \theta & \sin \theta\\
-r \sin \theta & r \cos \theta \\
\end{array}
\right | = r \cos^2 \theta + r \sin^2 \theta = r
\end{align}
\begin{align}
&\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-\frac{x^2 + y^2}{2}} dx dy \\
= &\int_{0}^{\infty} \int_{0}^{2 \pi} \left|
\frac{\partial (x,y)}{\partial (r,\theta)}
\right | e^{-\frac{r^2}{2}} dr d\theta \\
= &\int_{0}^{\infty} \int_{0}^{2 \pi} r e^{-\frac{r^2}{2}} dr d\theta \\
& = 2 \pi [-e^{-\frac{r^2}{2}}]^{\infty}_0 = 2 \pi
\end{align}
so that
\begin{align}
\int_{-\infty}^{\infty} e^{-\frac{x^2}{2}} = \sqrt{2 \pi}
\end{align}
i.e.
\begin{align}
\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} e^{-\frac{x^2}{2}} dx = 1
\end{align}
Moments of a Normal Distribution.
\begin{align}
\mathbb{E}[X] = & \frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x e^{-\frac{x^2}{2}} dx \\
=& \frac{1}{\sqrt{2 \pi}} \left[-e^{-\frac{x^2}{2}}\right]^{\infty}_{-\infty} = 0
\end{align}
This is also obvious by symmetry. \( p(x) \) is a symmetric function i.e. \( p(x) = p(-x) \) so multiplying p(x) by an odd function \( f(x) \) i.e. \( f(x) = -f(-x) \) and calculating \( \int_{-\infty}^{\infty} p(x) f(x) dx = 0 \).
Since \( \int_{-\infty}^{0} p(x) f(x) dx = -\int^{\infty}_{0} p(x) f(x) dx \). Substitute \( y = -x \) to see this.
\begin{align}
\mathbb{E}[X^2] = &\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{\infty} x^2 e^{-\frac{x^2}{2}} dx \\
&=\frac{1}{\sqrt{2 \pi}} \left ( [- x e^{-\frac{x^2}{2}}]^{\infty}_{-\infty} + \int_{-\infty}^{\infty} e^{-\frac{x^2}{2}} dx \right) = 1
\end{align}