Inverting a moment generating function If I have a random variable $X$ with pdf $f$ I can compute its MGF as
$$
M_X(t) = \int_{-\infty}^\infty e^{tx} f(x)dx.
$$
My understanding is that this is basically a Laplace transformation. Furthermore, I have read that Laplace transforms can be inverted, but when I try this on MGFs of distributions I know it doesn't work. I tried to do the inverse Laplace transform of $e^{t^2/2}$, which is the MGF of a standard normal RV, but wolfram alpha tells me that there is no inverse among standard functions. What is going on here? Can MGFs be inverted to recover the density (assuming the MGF is finite, I'm guessing)?
 A: Using the terminology of Wikipedia, what you have given is not a Laplace transform, but a bilateral Laplace transform. So, while mgf's as defined in statistics is related to Laplace transform, they are more general. Maybe you can ask Wolphram Alpha of finding the inverse of a bilateral Laplace transform?
In general, I would guess that to invert (exactly or approximately) an mgf, some extra information will be needed, such as the range of the relevant random variable. In most real applications that should be known.
A: A few comments:

*

*Regarding @BruceET's comment, MGFs don't uniquely define random variables all the time, though. Practically, yeah you can identify many/most common random variables by their mgf. But in general, you don't have this--the classic example is that log normal densities $g(x)$ have the same MGF as the weird density $g(x)[1 +  \sin(2 \pi x)]$.


*As @Kjetil mentioned, Laplace transforms have complex arguments. That's more like a characteristic function. And those do uniquely define r.v.s (by the Fourier Uniqueness Theorem), and they can be inverted (by the Fourier Inversion Theorem, which @BruceET also mentions).


*MGFs can be unique for some random variables, though, and give you other cool results. If the MGF is finite on some interval including $0$, then a.) there is only one random variable with this MGF (i.e. it is "determined by its moments"), b.) it guarantees the existence of, and the ability to recover, all (noncentral/raw) moments of a r.v., and c.) if you have a random sample from that distribution, you also have some large deviations results that give you fast convergence of sample means.


*I think it would be cooler to get some kind of general formula that is able to invert MGFs for a handful of random variables. Something beyond manual identification. I'm not sure how to do this, though. Looking at the proof for the Fourier Inversion Theorem, the proof is not really mimic-able. Too many complex things.
