# Bilateral Laplace Transform in Mathematica (to be used with Moment Generating Functions)?

I am trying to solve a linear ODE for a Kolmogorov forward equation to get a stationary distribution of a random variable. The easiest approach may be to transform the ODE with a two-sided Laplace transform and then solve for the equation, which would be the moment-generating function. BUT: I can't figure out how to do a two-sided Laplace transform.

To give the concrete test for what I am looking for:

MomentGeneratingFunction[NormalDistribution[\[Mu], \[Sigma]], t]


Properly spits out $e^{\mu t + \sigma^2/2 t^2}$. But LaplaceTransform defaults to the one-sided transform Laplace transform). If I can figure out the options to make these match, then I can solve my ODE. Also, note that I will need to do the Two-sided Laplace transform of $-t$ instead of just $t$. To see the connection of MGF and Laplace Transforms: http://en.wikipedia.org/wiki/Moment-generating_function#Calculation

I found some old documentation for an obsolete package, http://reference.wolfram.com/legacy/applications/signals/MathematicalTransforms.html, that used to do this with the TransformDirection option, but it doesn't work any more.

-

There are several issues here with the way you are proceeding:

FIRST, if $X$ is a random variable with pdf $f(x)$, then the moment generating function (mgf) is defined as:

$$E[e^{t X}] = \int_{-\infty }^{\infty } e^{t x} f(x) \, dx$$

where the expectation is carried out over the full domain of support, which for a Normal distributed random variable ... is the real line.

The LaplaceTransform, by contrast, is defined on the positive real line, and with $t = -s$, namely:

$$\int_{0}^{\infty } e^{-s x} f(x) \, dx$$

So, if you want these two different things to match, then (a) you will need to choose a distribution defined on the positive real line such as the Exponential, and (b), you will need to make the substitution $t = -t$ in the LaplaceTransform function syntax. So for example, this works:

MomentGeneratingFunction[ExponentialDistribution[1], t]


1/(1 - t)

and matches with:

LaplaceTransform[ PDF[ExponentialDistribution[1], x], x, -t]


1/(1 - t)

SECOND, the question arises as to why you want to use LaplaceTransform at all, when you can compute (i) the expectation directly yourself using Integrate or similar function, and (ii) in any case, if you want an inbuilt function to do this, then the more appropriate function to use is FourierTransform to derive the characteristic function (cf), and then use the latter as a function to generate moments from. As per:

 FourierTransform[PDF[NormalDistribution[\[Mu], \[Sigma]], x], x, t, FourierParameters -> {1, 1}]


Finally, using the black box notation PDF[NormalDistribution[ blah ] is asking for trouble ... This is because for most distributions, there are any number of common competing functional forms or parameterisations, and a much safer approach is to explicitly work with the pdf that you want as, say:

f = blah;


... so that you know exactly what you are working with.

-
You are right, I did forget a negative sign. You are right that I need the laplace transform over the whole domain, which is why I need the bilateral (or two-sided) laplace transform, hence the title of my question. en.wikipedia.org/wiki/Moment-generating_function#Calculation to see the connection to laplace transforms. –  jlperla May 13 '14 at 16:12