I know that we can obtain the expected value of a random variable:
\begin{align} E[X] = \int x \space p(x) \space dx \end{align}
and the expected value of a function of this variable:
\begin{align} E[f(X)] = \int f(x) \space p(x) \space dx \end{align}
which can be used to calculate the various moments manually (i.e. $E[X^n]$).
We can also get the MGF of the random variable and use it to calculate the moments of the variable: \begin{align} M(t) = E(e^{tx}) \end{align}
What i'm not clear on is how we apply the MGF to a function of $X$ to generate the moments of a function of the random variable. Is this possible?