Solution (source code)

= Solution

Finiteness of the <moment-generating function> on an open neighborhood of zero gives its differentiability there. Using the permitted interchange of differentiation and <expectation>,
$$
M_X'(t)=\mathbb E[Xe^{tX}],\qquad M_X''(t)=\mathbb E[X^2e^{tX}].
$$
Hence $M_X(0)=1$, $M_X'(0)=\mu$ and $M_X''(0)=s^2$. The second-order <Taylor expansion> with its Peano remainder gives
$$
\boxed{M_X(t)=1+\mu t+\frac12s^2t^2+o(t^2)}.
$$
Here $s^2$ is the raw second moment, not the <variance>: $\operatorname{Var}(X)=s^2-\mu^2$. This distinction matters before specializing to a centered variable.