Moment generating function of Laplace distribution step by step There are two similar posts but none of them helped me to get through the full derivation of the very simple MGF that should be according to Wikipedia:
$$
\frac {\exp(\mu t)}{1-b^{2}t^{2}}
$$
Here's my attempt:
Definition of MGF
$$
M_X(t) = \mathbb{E}\left[\exp(t X)\right]
$$
by LOTUS
$$
= \int \exp(t x) \cdot p(x) dx
$$
Plugging-in PDF
$$
= \int \exp(t x) \cdot \frac{1}{2b}\exp \left(- \frac{\mid x - \mu \mid }{b} \right) dx
$$
$$
= \frac{1}{2b} \int \exp(t x) \cdot \exp \left(- \frac{\mid x - \mu \mid }{b} \right) dx
$$
$$
= \frac{1}{2b} \int \exp \left(t x - \frac{\mid x - \mu \mid }{b} \right) dx
$$
getting rid of abs. value
$$
= \frac{1}{2b} \int_{-\infty}^{\mu} \exp \left(t x - \frac{ x - \mu  }{b} \right) dx
+ \frac{1}{2b} \int_{\mu}^{\infty} \exp \left(t x - \frac{- x + \mu  }{b} \right) dx
$$
the left integral first
$$
= \frac{1}{2b} \int_{-\infty}^{\mu} \exp \left(\frac{bt x - x - \mu  }{b} \right) dx
$$
$$
= \frac{1}{2b} \int_{-\infty}^{\mu} \exp \left(\frac{bt x - x  }{b} \right) \exp \left(\frac{- \mu  }{b} \right) dx
$$
$$
= \frac{1}{2b} \cdot \exp \left(\frac{- \mu  }{b} \right) \int_{-\infty}^{\mu} \exp \left(\frac{bt x - x  }{b} \right)  dx
$$
$$
= \frac{1}{2b} \cdot \exp \left(\frac{- \mu  }{b} \right) \int_{-\infty}^{\mu} \exp \left(\frac{ (bt  - 1)  }{b}  x \right)  dx
$$
Now since $\int e^{ax}\,dx={\frac {1}{a}}e^{ax}+C$
$$
= \frac{1}{2b} \cdot \exp \left(\frac{- \mu  }{b} \right) \cdot \left|  \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  x \right)  \right|_{-\infty}^{\mu}
$$
Let's evaluate the integral first
$$
\left|  \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  x \right) \right|_{-\infty}^{\mu}
$$
$$
= \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right) 
-
\frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (-\infty)\right)
$$
Since $\lim_{x \rightarrow 0} e^{-x} = 0$, the second term is 0
$$
= \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right) 
- 0
$$

Double check from WorlframAlpha:
$$
= \frac{b}{bt-1} \exp \left( \mu \left( t - \frac{1}{b} \right) \right)
$$
for $\frac{1}{b} < t$

Now the right-hand side integral:
$$
\frac{1}{2b} \int_{\mu}^{\infty} \exp \left(t x - \frac{- x + \mu  }{b} \right) dx
$$
$$
\frac{1}{2b} \int_{\mu}^{\infty} \exp \left(\frac{b t x + x - \mu  }{b} \right) dx
$$
$$
= \frac{1}{2b} \int_{\mu}^{\infty} \exp \left(\frac{b t x + x   }{b} \right) \exp \left(\frac{-\mu  }{b} \right)dx
$$
$$
= \frac{1}{2b} \cdot \exp \left(\frac{ -\mu  }{b} \right) \int_{\mu}^{\infty} \exp \left(\frac{b t x + x   }{b} \right) dx
$$
$$
= \frac{1}{2b} \cdot \exp \left(\frac{ -\mu  }{b} \right) \int_{\mu}^{\infty} \exp \left( \frac{b t + 1 }{b} x\right) dx
$$
Now evaluate the integral
$$
\int_{\mu}^{\infty} \exp \left( \frac{b t + 1 }{b} x\right) dx
$$
According to wolfram alpha
$$
= - \frac{b}{bt + 1}\exp\left(\mu \frac{1}{b + t}\right)
$$
for $\frac{1}{b} + t < 0$
Now sum-up these two integrals:
$$
= \frac{1}{2b} \cdot \exp \left(\frac{- \mu  }{b} \right) \cdot \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right)  + \\
\frac{1}{2b} \cdot \exp \left(\frac{ -\mu  }{b} \right) \cdot \left( - \frac{b}{bt + 1}\exp\left(\mu \frac{1}{b + t}\right) \right)
$$
And simplify
$$
= \frac{1}{2b} \cdot \exp \left(\frac{- \mu  }{b} \right) \cdot \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right)  - \\
\frac{1}{2b} \cdot \exp \left(\frac{ -\mu  }{b} \right) \cdot  \frac{b}{bt + 1} \cdot \exp\left(\mu \frac{1}{b + t}\right) 
$$
$$
= \frac{1}{2b} \cdot  \frac{b}{ (bt  - 1)  } \cdot \exp \left(\frac{- \mu  }{b} \right) \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right)  - \\
\frac{1}{2b} \cdot   \frac{b}{bt + 1} \cdot \exp \left(\frac{ -\mu  }{b} \right) \cdot \exp\left(\mu \frac{1}{b + t}\right) 
$$
$$
= \frac{1}{b} \cdot  \frac{1}{ (bt  - 1)  } \cdot \exp \left(\frac{- \mu  }{b} \right) \cdot \exp \left(\frac{ (bt  - 1)  }{b}  (\mu) \right)  - \\
\frac{1}{b} \cdot   \frac{1}{bt + 1} \cdot \exp \left(\frac{ -\mu  }{b} \right) \cdot \exp\left(\mu \frac{1}{b + t}\right) 
$$
$$
= \frac{1}{b} \cdot  \frac{1}{ (bt  - 1)  } \cdot \exp \left(\frac{- \mu  }{b} +\frac{ (bt  - 1)  }{b}  (\mu) \right)  - \\
\frac{1}{b} \cdot   \frac{1}{bt + 1} \cdot \exp \left(\frac{ -\mu  }{b} + \mu \frac{1}{b + t}\right) 
$$
$$
= \frac{1}{b} \cdot  \frac{1}{ (bt  - 1)  } \cdot \exp \left( \mu \left(t - \frac{2}{b} \right) \right)  - \\
\frac{1}{b} \cdot   \frac{1}{bt + 1} \cdot \exp \left(\frac{ -\mu  }{b} + \mu \frac{1}{b + t}\right) 
$$
But I cannot move away from this ugly formula to the simple beauty. Is there just a stupid mistake above or am I doing something substantially wrong?

There are a number of efficiencies that can be realized if we first consider the shifted exponential family $$f_Y(y) = \frac{1}{b} e^{-(y - \mu)/b}, \quad y \ge \mu$$ with location $\mu$ and scale $b > 0$.  The MGF is easy to calculate:  $$M_Y(t) = \int_{y=\mu}^\infty \frac{1}{b} e^{ty} e^{-y/b} e^{\mu/b} \, dy = \frac{e^{\mu/b}}{b} \int_{y=\mu}^\infty e^{-(1/b-t)y} \, dy = \frac{e^{\mu/b} e^{-(1/b - t)\mu}}{b(1/b-t)} = \frac{e^{\mu t}}{1 - bt} , \quad t < 1/b.$$  The MGF of $-Y$ is then $$M_{-Y}(t) = M_Y(-t) = \frac{e^{-\mu t}}{1 + bt}, \quad t > -1/b.$$
Now define the mixture density $$f_X(x) = \frac{1}{2} (f_{Y_1}(x) + f_{-Y_2}(x))$$ where $Y_1$ is shifted with location $\mu$, and $Y_2$ is shifted with location $-\mu$, and both share scale $b$.  Then it is easy to see $X$ is Laplace with location $\mu$ and scale $b$.  The MGF of $X$ is then $$M_X(t) = \frac{1}{2} \left( M_{Y_1}(t) + M_{-Y_2}(t) \right) = \frac{1}{2} \left( \frac{e^{\mu t}}{1 - bt} + \frac{e^{-(-\mu)t}}{1 + bt} \right) = \frac{e^{\mu t}}{1 - (bt)^2}, \quad |t| < 1/b.$$
In fact, this computation easily generalizes to the case where $Y_1$ and $Y_2$ do not have the same scale parameter, in which the distribution has nonzero skew.
