Moment Generating Function of Normal
MGF,
\[M_X(t) = \mathbb E[e^{tX}], t\in \mathbb R\]
For \(X\sim N(\mu, \sigma^2)\),
\[\begin{aligned} M_X(t) &= \int_{-\infty}^\infty{e^{tx} \frac{1}{\sqrt{2\pi} \sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}}dx \\ &= \int_{-\infty}^\infty{e^{t(a\sigma + \mu)} \frac{1}{\sqrt{2\pi} }e^{-\frac{a^2}{2}}}da \qquad \text{substitute x to a} \\ &= \int_{-\infty}^\infty{ \frac{1}{\sqrt{2\pi} } \exp{ \left( \frac{-(a-\sigma t)^2 +\sigma^2t^2+2\mu t}{2} \right)} }da \\ &= \exp { \left(\mu t + \frac{\sigma^2t^2}{2} \right)} \int_{-\infty}^\infty{ \frac{1}{\sqrt{2\pi} } \exp{ \left( \frac{-(a-\sigma t)^2}{2} \right)} }da \qquad \text{by the fact that gaussian cdf = 1} \\ &= \exp { \left(\mu t + \frac{\sigma^2t^2}{2} \right)} \end{aligned}\]