Convolution and absolute value I have some problems to do the convolution between 
$f(x)=e^{-|x|}$ and $g(x)=e^{-|x|}$.
$$f*g=\int_{-\infty}^{+ \infty}f(y)g(x-y)\, dy=\int_{-\infty}^{+ \infty}e^{-|y|}e^{-|x-y|}\, dy$$
I have tried to analyse the different cases $$(y>0 \text{ and } x>y,\quad y>0 \text{ and } x<y,\quad y<0 \text{ and } x>y,\quad y<0 \text{ and } x<y)$$ but I have never done an exercise of this kind and I don't want to make a very big confusion... Could you write the correct proceeding? Many thanks
 A: Hint: Split the integral in three pieces.


*

*If $x>0$, integrate from $-\infty$ to $0$, then from $0$ to $x$, and finally from $x$ to $\infty$.

*If $x<0$, integrate from $-\infty$ to $x$, then from $x$ to $0$, and finally from $0$ to $\infty$.

*If $x=0$, only two pieces are needed: From $-\infty$ to $0$, and from $0$ to $\infty$.


Edit: To elaborate on the first alternative, if $x>0$ you get
$$\begin{aligned}f*g(x)&=\int_{-\infty}^{+ \infty}e^{-|y|}e^{-|x-y|}\,dy
\\&=\int_{-\infty}^{0}e^{-|y|}e^{-|x-y|}\,dy+\int_{0}^{x}e^{-|y|}e^{-|x-y|}\,dy+\int_{x}^{+ \infty}e^{-|y|}e^{-|x-y|}\,dy
\\&=\int_{-\infty}^{0}e^{y}e^{y-x}\,dy+\int_{0}^{x}e^{-y}e^{y-x}\,dy+\int_{x}^{+ \infty}e^{-y}e^{x-y}\,dy.
\end{aligned}$$
Notice how the limits are chosen in order to simplify the absolute values?
You take it from there.
A: If you know Fourier transforms, it might be easier to do it this way: 
$$
\hat f(\omega) = \frac{2}{1+\omega^2}
$$
so
$$
\widehat{f*f}(\omega) = \hat f^2(\omega) = \frac{4}{(1+\omega^2)^2} = \frac{i}{\omega+i} - \frac{1}{(\omega+i)^2} - \frac{i}{\omega-i} - \frac{1}{(\omega-i)^2}.
$$
Inverse Fourier transformation gives:
$$
f*f(x) = e^x H(-x) - xe^x H(-x) + xe^{-x} H(x) + e^{-x}H(x) = e^{-|x|}(1+|x|). 
$$
(I'm using the normalization $\hat f(\omega) = \displaystyle\int_{-\infty}^\infty e^{-i\omega x}f(x)\,dx$, and $H$ denotes the Heaviside function.)
