Given the moment generating function of a random variable $X$, $$M_X (t) = \mathbb{E}[e^{tX}],$$ one defines the cumulant generating function, $$K(t) = \log \mathbb{E}[e^{tX}].$$ One then states that the right-hand side (RHS) can be written as a series, $$K(t) = k_1 \frac{t}{1!} + k_2\frac{t^2}{2!} + \cdots + k_n \frac{t^n}{n!} + \cdots,$$ where the quantities $k_i$ are the cumulants or central moments of $X.$
I do not see how one gets the RHS. First, I tried to expand $e^{tX}$ inside the expectation and use the linearity of the expectation, $$K(t) = \log(1+t\mathbb{E}[X] + \frac{t^2}{2!}\mathbb{E}[X^2] + \cdots).$$ I also considered the Taylor expansion of $\log(1+t\mathbb{E}[X])$ at zero, $$\log(1+t\mathbb{E}[X]) = \frac{t}{1!} ((1-1)!\mathbb{E}[X]) + \frac{t^2}{2!} (-(2-1)!\mathbb{E}[X]^2) + \frac{t^3}{3!}((3-1)!\mathbb{E}[X]^3) + \cdots.$$ The expressions in parentheses do not seem to be all the cumulants. The first one is correct but not the second one. Can someone provide some hint or explain how one can obtain the expression for the cumulant generating function? Many thanks.