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