Source: J. E. Santos, Cambridge Part IB Complex Methods, Example Sheet 3, Question 2.
2. Show that the convolution of the function $e^{-|x|}$ with itself
is given by $f(x) = (1+|x|)e^{-|x|}$. Use the convolution theorem for Fourier
transforms to show that
\[f(x) = \frac{2}{\pi}\int_{-\infty}^{\infty}\frac{e^{ikx}}{(1+k^2)^2}\,d k\tag{1.1}\]
and verify this result by contour integration.
The convolution of $g(x) = e^{-|x|}$ is given by
\[(g*g)(x) = \int dz\,e^{-|z|}e^{-|x-z|}.\tag{1.2}\]
For $x>0$, the convolution becomes
\[(g*g)(x) = \int^\infty_xdz\,e^{-z}e^{-(z-x)} + \int^x_0dz\,e^{-z}e^{-(x-z)} + \int^0_{-\infty}dz\,e^ze^{-(x-z)} = (1+x)e^{-x}.\tag{1.3}\]
Similarly, for $x<0$, we find
\[(g*g)(x) = (1-x)e^x.\tag{1.4}\]
Hence, we find
\[(g*g)(x) = (1+|x|)e^{-|x|}.\tag{1.5}\]
Using the Fourier transform of $e^{-|x|}$, the convolution can be written as
\[\begin{aligned}(g*g)(x) &= \frac{1}{\pi^2}\int dk\int dq \int dz\frac{e^{ikz}e^{iq(x-z)}}{(k^2+1)(q^2+1)} \notag\\
&= \frac{2}{\pi}\int dk\int dq\frac{e^{iqx}\delta(k-q)}{(k^2+1)(q^2+1)} \notag\\
&=\frac{2}{\pi}\int dk\frac{e^{ikx}}{(k^2+1)^2} =f(x).\end{aligned}\tag{1.6}\]
It is easy to see that the integrand has two poles of order 2 at $k=\pm i$. The corresponding residuals are given by
\[\begin{aligned}\operatorname{Res}\left(\frac{e^{ikx}}{(k^2+1)^2}, \,k=\pm i\right) = \lim_{k\to \pm i}\frac{d}{dk}\left(\frac{e^{ikx}}{(k\pm i)^2}\right) &= \lim_{k\to \pm i}\frac{ixe^{ikx}(k\pm i) - 2e^{ikx}}{(k \pm i)^3} \notag\\&=\frac{1 \pm x}{4i}e^{\mp x}.\end{aligned}\tag{1.7}\]
For $x>0$, we close the contour upward, while for $x<0$ we close the contour downward. By simple algebra, we recover the result
\[(g*g)(x) = (1+|x|)e^{-|x|}.\tag{1.8}\]