Solution
= Solution
Differentiating the <moment-generating function> at zero gives
$$
\boxed{M_X'(0)=\mathbb E[X],\qquad M_X''(0)=\mathbb E[X^2].}
$$
The second derivative is the second raw <moment>, so the <variance> is $M_X''(0)-(M_X'(0))^2$. The assumed exponential integrability justifies these derivatives.