While reading Loeve's book on Probability Theory I had following doubt: in a basic course of probability I was taught that the moment generating function of a continuous random variable is computed as:
$E[e^{tX}] = \int_{-\infty}^{+\infty} e^{tx}f(x)dx$
where f(x) is the density function.
I want deduce this formula from the basic expression
$E[g(X)]=\int_{-\infty}^{+\infty}g \ dP_{X}$
which appears on the book. I was able to do so in the discrete case but can't figure out how to do it if g(X) is continuous.