How to find $E[e^{\lambda X}]$ for a random variable $X$? Let $X$ be a random variable, how can we find the expectation $E[e^{\lambda X}]$? 
$e^{\lambda X}$ looks like a pdf of exponential distribution, but I have never seen how to find the expectation of a pdf? All I know is the expectation of a random variable.
If $e^{\lambda X}$ is not a pdf but a random variable instead, how can we find the expectation of an "exponential random variable"?
Thanks in advance for the help.
 A: If is $f$ is the pdf of $X$ then $\mathbb{E}[e^{\lambda X}] = \int e^{\lambda x}f(x) dx$.
A: Don't be confused by the exponentiel, this is not the pdf of an exponential random variable. This is indeed the expectation of the random variable $Z=e^{\lambda X}$.
So if $f_X$ is the pdf of $X$, then
$$E(Z)=E(e^{\lambda X})=\int_\mathbb{R}e^{\lambda x}f_X(x)dx$$
More generally, for a (measurable) function $h$,
$$E(h(X))=\int_\mathbb{R}h(x)f_X(x)dx$$
(if this expectation exists)
A: Assuming you have a 'nice' pdf, you can take the Taylor expansion of the random variable, i.e.
$$E[e^{\lambda X}]=  E\left[\sum_{n=0}^{\infty}\frac{\left(\lambda X\right)^n}{n!}\right] = \sum_{n=0}^{\infty}\frac{\lambda^n}{n!}E\left[X^n\right].$$
The first step is just the series, while the second step follows from linearity of the expectation value. If you have a closed form of $E\left[X^n\right]$, then you are set. Note that this method can be generalized to other functions as well!
A: The expectation of a function $g$ of a continuous random variable $X$ is
$$E[g(X)] = \int g(x) f_X(x)\, \text dx$$
where $f_X(x)$ is the pdf of $X$. In the simplest case you have $g(x) = x$ and
$$E[X] = \int x f_X(x)\, \text dx.$$
In your case $g(x) = e^{\lambda x}$ and hence
$$E[e^{\lambda X}] = \int e^{\lambda x} f_X(x)\, \text dx.$$
What you are calculating here is the moment generating function (MGF) of the random variable $X$.
