Solution (source code)

= Solution

The <moment-generating function> is $M_X(t)=\mathbb E[e^{tX}]$ for real $t$ where this <expectation> is finite. Usually one requires finiteness on a neighbourhood of zero when using it to characterize a distribution. The <characteristic function> is
$$
\boxed{\varphi_X(t)=\mathbb E[e^{itX}],\quad t\in\mathbb R.}
$$
It always exists because the integrand has absolute value one. In both definitions the <expectation> is taken with respect to the distribution of $X$.