[proofplan]
We first reduce to the standard normal $Z \sim N(0, 1)$ by writing $X = \mu + \sigma Z$. For $Z$, we compute $\mathbb{E}[Z] = 0$ by the symmetry (odd function) argument, and $\operatorname{Var}(Z) = \mathbb{E}[Z^2] = 1$ by integration by parts (or by completing the square in the exponent). Linearity of expectation then gives $\mathbb{E}[X] = \mu$ and $\operatorname{Var}(X) = \sigma^2$.
[/proofplan]
[step:Reduce to the standard normal $Z \sim N(0,1)$]
If $X \sim N(\mu, \sigma^2)$, define $Z = (X - \mu)/\sigma$, so $X = \mu + \sigma Z$. A direct computation of the density of $Z$ (via the change of variables $x = \mu + \sigma z$) shows that $Z \sim N(0, 1)$ with density
\begin{align*}
\varphi(z) = \frac{1}{\sqrt{2\pi}}\, e^{-z^2/2}, \quad z \in \mathbb{R}.
\end{align*}
By [linearity of expectation](/theorems/1117), $\mathbb{E}[X] = \mu + \sigma \mathbb{E}[Z]$ and $\operatorname{Var}(X) = \sigma^2 \operatorname{Var}(Z)$. It therefore suffices to show $\mathbb{E}[Z] = 0$ and $\operatorname{Var}(Z) = 1$.
[/step]
[step:Show $\mathbb{E}[Z] = 0$ by symmetry of the integrand]
We compute
\begin{align*}
\mathbb{E}[Z] = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} z\, e^{-z^2/2}\, dz.
\end{align*}
The integrand $z \mapsto z\, e^{-z^2/2}$ is an odd function (it changes sign under $z \mapsto -z$). Since $|z|\, e^{-z^2/2}$ is integrable on $\mathbb{R}$ (the integral is finite), the integral of an odd function over the symmetric interval $(-\infty, \infty)$ is zero:
\begin{align*}
\mathbb{E}[Z] = 0.
\end{align*}
[/step]
[step:Compute $\mathbb{E}[Z^2] = 1$ by integration by parts]
We need
\begin{align*}
\mathbb{E}[Z^2] = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} z^2\, e^{-z^2/2}\, dz.
\end{align*}
We integrate by parts with $u = z$ and $dv = z\, e^{-z^2/2}\, dz$. To find $v$, note that
\begin{align*}
\frac{d}{dz}\!\left(-e^{-z^2/2}\right) = z\, e^{-z^2/2},
\end{align*}
so $v = -e^{-z^2/2}$. The boundary term is
\begin{align*}
\left[z \cdot (-e^{-z^2/2})\right]_{-\infty}^{\infty} = \lim_{z \to \infty} (-z\, e^{-z^2/2}) - \lim_{z \to -\infty} (-z\, e^{-z^2/2}) = 0 - 0 = 0,
\end{align*}
since $|z|\, e^{-z^2/2} \to 0$ as $z \to \pm\infty$ (the exponential decay dominates the linear growth). Therefore
\begin{align*}
\int_{-\infty}^{\infty} z^2\, e^{-z^2/2}\, dz = 0 - \int_{-\infty}^{\infty} (-e^{-z^2/2})\, dz = \int_{-\infty}^{\infty} e^{-z^2/2}\, dz = \sqrt{2\pi},
\end{align*}
where the last equality is the [Gaussian integral](/theorems/1140). Dividing by $\sqrt{2\pi}$,
\begin{align*}
\mathbb{E}[Z^2] = \frac{\sqrt{2\pi}}{\sqrt{2\pi}} = 1.
\end{align*}
[guided]
The integration by parts is chosen to exploit the relation $\frac{d}{dz}(-e^{-z^2/2}) = z\, e^{-z^2/2}$, which "peels off" one factor of $z$ from the integrand $z^2 e^{-z^2/2}$ and converts the remaining integral back into the Gaussian integral that we have already evaluated. This is a standard technique: whenever you see $z^n e^{-z^2/2}$, integrating by parts with the pair $u = z^{n-1}$, $dv = z\, e^{-z^2/2}\, dz$ reduces the power of $z$ by two, eventually reducing to the known integral $\int e^{-z^2/2}\, dz = \sqrt{2\pi}$ (if $n$ is even) or to $\int z\, e^{-z^2/2}\, dz = 0$ by symmetry (if $n$ is odd).
Concretely, we set $u = z$ and $dv = z e^{-z^2/2}\, dz$. Then $du = dz$ and $v = -e^{-z^2/2}$, so
\begin{align*}
\int_{-\infty}^{\infty} z^2 e^{-z^2/2}\, dz &= \bigl[-z\, e^{-z^2/2}\bigr]_{-\infty}^{\infty} + \int_{-\infty}^{\infty} e^{-z^2/2}\, dz.
\end{align*}
The boundary term vanishes because $|z|\, e^{-z^2/2} \to 0$ as $z \to \pm \infty$ (the Gaussian decay $e^{-z^2/2}$ overwhelms any polynomial growth). The remaining integral is exactly $\sqrt{2\pi}$ by the Gaussian integral result.
[/guided]
[/step]
[step:Combine to obtain $\mathbb{E}[X] = \mu$ and $\operatorname{Var}(X) = \sigma^2$]
Since $\mathbb{E}[Z] = 0$ and $\operatorname{Var}(Z) = \mathbb{E}[Z^2] - (\mathbb{E}[Z])^2 = 1 - 0 = 1$,
\begin{align*}
\mathbb{E}[X] &= \mu + \sigma \cdot 0 = \mu, \\
\operatorname{Var}(X) &= \sigma^2 \cdot 1 = \sigma^2.
\end{align*}
[/step]