# Find the moment generating function

$$f(y)=\frac{e^{-|y|}}{2}$$

I tried calculating it by integrating $(1/2)e^{ty}\cdot e^{-|y|}) dy$ and splitting up that integral into two separate integrals. However, I did not get a finite answer. What am I overlooking here?

-

$$\begin{split} \int_{-\infty}^\infty \frac{e^{tx-|x|}dx}{2} &= \int_{-\infty}^0 \frac{e^{tx+x}dx}{2} + \int_0^\infty \frac{e^{tx-x}dx}{2} \\ &= \left[ \frac{e^{(t+1)x}}{2(t+1)} \right|_{-\infty}^0 + \left[ \frac{e^{(t-1)x}}{2(t-1)} \right|_0^\infty \\ &= \frac{1}{2(t+1)} - \frac{1}{2(t-1)} \\ &= \frac{2}{1-t^2}, \end{split}$$

where the convergence of the first integral happens for $t+1>0$ and the second for $t-1<0$, so we must have $t \in (-1,1)$.

The boundary cases of $t \in \{-1,1\}$ must be checked separately, and for both, one of the integrals diverges, this si only valid for $t\in(-1,1)$.

-
I think you mean $>$ and $<$, respectively, so that $t \in (-1,1)$. – Antonio Vargas Mar 18 '13 at 18:52
@AntonioVargas yes, was in process of correcting it. – gt6989b Mar 18 '13 at 18:54
Thanks a lot! I did exactly the same however I did not have the notion to then define t to be between those values. I was already confused because if you do not do this, you get e^infinity, which does not make sense if you want to find the MGF. Thanks again! – dreamer Mar 18 '13 at 18:55
@mause You are welcome, happy to help. – gt6989b Mar 18 '13 at 18:56
Ah, sorry about jumping the gun :) – Antonio Vargas Mar 18 '13 at 18:59