Integration Question for exponential function

How do you integrate $\frac 1 2e^{-|x|}$?

Attempt: This equals the integral of $\frac 1 2e^{-\sqrt{(x^2)}}$

-
Separate the integral into $x \ge 0$ and $x \le 0$. –  Qiaochu Yuan Feb 28 '12 at 1:31
but lets say I want to find the median of this distribution. What do I do then? If the function takes on values from -infinity to +infinity. –  lord12 Feb 28 '12 at 2:04
Since the function is even, it has an odd antiderivative (take the right constant of integration). This will make life even simpler when combined with Qiaochu's hint. –  ncmathsadist Feb 28 '12 at 2:11
@lord12: You have symmetry across the $y$-axis, so the median is $0$, no computation needed. –  André Nicolas Feb 28 '12 at 4:44
Note that $\frac{1}{2}e^{-|x|}=\frac{1}{2}e^{-|-x|}$, so the function is symmetric about $x=0$. Thus in the particular case of integration from $-\infty$ to $\infty$, we have $$\int_{-\infty}^{\infty}\frac{1}{2}e^{-|x|}dx=2\int_0^\infty\frac{1}{2}e^{-|x|}dx=\int_0^\infty e^{-x}dx=\lim\limits_{y\to\infty}\int_0^ye^{-x}=\lim\limits_{y\to\infty}(-e^{-y}+e^0)=e^0=1$$ since $e^{-y}$ becomes arbitrarily small for large $y$.