Solution (source code)

= Solution

Normalization of the <Gaussian distribution> gives
$$
A=\frac1{\sqrt{2\pi}}.
$$
Completing the square,
$$
tx-\frac{x^2}{2}
=-\frac{(x-t)^2}{2}+\frac{t^2}{2}.
$$
Therefore
$$
M_X(t)=\frac1{\sqrt{2\pi}}
\int_{-\infty}^{\infty}e^{tx-x^2/2}\,dx
=e^{t^2/2},
$$
and hence
$$
\boxed{M_X(t)=e^{t^2/2}}.
$$