This is Exercise $38$ from Tao' note: https://terrytao.wordpress.com/2015/10/03/275a-notes-1-integration-and-expectation/comment-page-1/#comment-681309
Let ${X}$ be a real random variable with cumulative distribution function $${F_X(x) := {\bf P}(X \leq x)}$$ Show that
$$\displaystyle {\bf E} e^{tX} = \int_{\bf R} (1-F_X(x)) t e^{tx}\ dx$$
for all ${t > 0}$.
For this problem a PDF is not assumed to exist (except in a distributional or measure theoretic sense), so care would have to be taken if one wished to proceed by using the fact that the derivative of CDF is PDF. Instead, Tao suggests that one can approximate the exponential function by a piecewise constant function and use dominated convergence to justify passing to the limit.
By the change of variables formula, we want $$\int_{\bf R} e^{tx}\ d\mu_X(x) = \int_{\bf R} (1-F_X(x)) t e^{tx}\ dx$$ where $\mu_X$ denotes the distribution of $X$, how should one choose the approximating p.c function?