Solution (source code)

= Solution

The <moment-generating function> is $M_X(t)=\mathbb E(e^{tX})$ at real $t$ for which this <expectation> is finite. The <characteristic function> is
$$
\boxed{\varphi_X(t)=\mathbb E(e^{itX}),\qquad t\in\mathbb R.}
$$
Unlike the <moment-generating function>, the <characteristic function> always exists, because $|e^{itX}|=1$.