This is Exercise $38$ from Tao's note:
Let ${X}$ be a real random variable with cumulative distribution function ${F_X(x) := {\bf P}(X \leq x)}$. Show that $$ {\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$, it seems that one way to proceed is to evaluate the LHS directly by definition using approximating simple functions and dominated convergence to get the RHS. But I’m stuck at this step.
Tao suggests approximating $\exp$ with a piecewise constant function. Let $$g_n(x)=\exp(t\lceil nx-1\rceil/n).$$ Note that $g_n(x)$ is a piecewise constant function, such that $|g_n(x)|\le \exp(tx)$, and $g_n(x)\to \exp(tx)$ pointwise as $n\to\infty$.
We perform the following steps. Explanation is at the end. $$ \begin{align} {\bf E}\, g_n(X) &=\sum_{k\in \mathbb Z} {\bf P}(\lceil nX\rceil =k)\cdot \exp\left(t\cdot \frac{k-1}n\right) \\ &=\sum_{k\in \mathbb Z} \left[F\left(\frac kn\right)-F\left(\frac {k-1}n\right)\right]\cdot \exp\left(t\cdot \frac{k-1}n\right) \\ &=\sum_{k\in \mathbb Z}\left(1-F\left(\frac {k-1}n\right)\right)\exp\left(t\cdot \frac{k-1}n\right) -\sum_{k\in \mathbb Z}\left(1-F\left(\frac {k}n\right)\right)\exp\left(t\cdot \frac{k-1}n\right) \\ &=\sum_{k\in \mathbb Z}\left(1-F\left(\frac {k}n\right)\right)\exp\left(t\cdot \frac kn\right) -\sum_{k\in \mathbb Z}\left(1-F\left(\frac {k}n\right)\right)\exp\left(t\cdot \frac {k-1}n\right) \\ &=\sum_{k\in \mathbb Z}\left(1-F\left(\frac {k}n\right)\right)\left[\exp\left(t\cdot \frac {k}n\right)-\exp\left(t\cdot \frac {k-1}n\right)\right] \\ &=\int_{-\infty}^\infty \left(1-F\left(\frac {\lceil nx \rceil}n\right)\right)\left[\exp\left(t\cdot \frac {\lceil nx \rceil}n\right)-\exp\left(t\cdot \frac {\lceil nx \rceil-1}n\right)\right]\cdot \frac1n\,dx \end{align} $$
Lines 1 and 2 are the definition of expected value, and the definition of $F$.
Lines 3, 4, and 5 are rearrangements of the sum. I am effectively doing summation by parts.
Line 6 rewrites the sum as an integral of a piecewise constant function.
Finally, take the limit as $n\to\infty$ of both sides. The LHS converges to ${\bf E}\exp(tX)$, by DCT. For the RHS, the integrand converges pointwise to $(1-F_X(x))\cdot \frac{d}{dx} \exp(tx)$. Therefore, we can use the same dominating function to apply DCT to the RHS, and conclude that it is $\int_{-\infty}^{\infty}(1-F_X(x))\cdot \frac{d}{dx} \exp(tx)\,dx$.