Calculating $\int e^{-|x|} \, dx$. I have been trying to calculate
$\int e^{|x|} \, dx$, but merely splitting up in two cases for $x&lt;0$ and $x&gt;0$ does not give the desired result, which I got by calculating it on a CAS. 
Suggestions would be very welcome.

Edit.
I made a mistake. It's $\int e^{-|x|} \, dx$.
Using $$\exp(|x|) =\begin{cases} \exp(x) &amp; x \geqslant 0 \\ \exp(-x) &amp; x &lt; 0 \end{cases} $$
we can integrate branch-wise:
$$
   \int \exp(|x|) \mathrm{d}x = \begin{cases} \int \exp(x) \mathrm{d}x &amp; x \geqslant 0 \\ \int \exp(-x) \mathrm{d}x &amp; x &lt; 0 \end{cases} = \begin{cases} \exp(x) + C_1 &amp; x \geqslant 0 \\ -\exp(-x) + C_2 &amp; x &lt; 0 \end{cases}
$$
we can also write
$$\int e^{|x|} dx= sign(x) e^{|x|}+C$$