Evaluating the inverse Fourier transform $f(x) = \int_{-\infty}^\infty \frac{dk}{2\pi} e^{-ikx} \frac{\sin^2(k/2)}{(k/2)^2}$ I'm curious how to calculate the following inverse Fourier transform
$$f(x) =  \int_{-\infty}^\infty \frac{dk}{2\pi} e^{-ikx} \frac{\sin^2(k/2)}{(k/2)^2} $$ 
Since the Fourier transform is even, I suppose we can just replace $e^{-ikx}$ with $\cos(kx)$, but I don't see how to proceed.
The answer should be this. It's the (shifted) probability density function of the sum of two random variables uniformly distributed on $[0,1]$. So technically $x \in [-1,1]$, but I don't know if it's necessary to include that bound somehow or if it'll come out of the integral naturally.
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\mrm{f}\pars{x} & \equiv 
\int_{-\infty}^{\infty}{\dd k \over 2\pi}\,\expo{-\ic kx}\,
{\sin^{2}\pars{k/2} \over \pars{k/2}^{2}} =
\int_{-\infty}^{\infty}\expo{-\ic kx}\,
\pars{{1 \over 2}\int_{-1}^{1}\expo{\ic pk/2}\,\dd p}
\pars{{1 \over 2}\int_{-1}^{1}\expo{-\ic qk/2}\,\dd q}{\dd k \over 2\pi}
\\[5mm] & =
{1 \over 4}\int_{-1}^{1}\int_{-1}^{1}\bracks{%
\int_{-\infty}^{\infty}\expo{-\ic\pars{x - p/2 + q/2}k}\,{\dd k \over 2\pi}}
\dd p\,\dd q =
{1 \over 4}\int_{-1}^{1}\int_{-1}^{1}\delta\pars{x - {p \over 2} + {q \over 2}}
\dd p\,\dd q
\\[5mm] & =
{1 \over 4}\int_{-1}^{1}\int_{-1}^{1}
{\delta\pars{p -\bracks{2x + q}} \over 1/2}\,\dd p\,\dd q =
{1 \over 2}\int_{-1}^{1}\bracks{-1 < 2x + q < 1}\dd q
\\[5mm] & =
{1 \over 2}\int_{-1}^{1}\bracks{-1 - 2x < q < 1 - 2x}\dd q
\\[5mm] & =
{1 \over 2}\bracks{-1 < 1 - 2x < 1}\int_{-1}^{1 - 2x}\dd q +
{1 \over 2}\bracks{-1 < -1 - 2x < 1}\int_{-1 - 2x}^{1}\dd q
\\[5mm] & =
{1 \over 2}\bracks{0 < x < 1}\pars{2 - 2x} +
{1 \over 2}\bracks{-1 < x < 0}\pars{2 + 2x}
\\[5mm] & =
\bracks{0 < x < 1}\pars{1 - \verts{x}} +
\bracks{-1 < x < 0}\pars{1 - \verts{x}}
\\[5mm] & =
\braces{\vphantom{\Large A}\bracks{0 < x < 1} + \bracks{-1 < x < 0}}
\pars{1 - \verts{x}} = \bbx{\bracks{\vphantom{\large A}0 < \verts{x} < 1}\pars{1 - \verts{x}}}
\end{align}

A: Hint : Compute the fourier transform of $\chi_{(-1/2,1/2)}$ (characteristic function). Then remember the convolution formula with fourier transforms.
A: Of course the answer comes naturally from the integral. A solution using Fourier inversion is as follows: Consider the following version of Fourier transform:
$$ \hat{f}(x) := \int_{-\infty}^{\infty} e^{ikx} f(x) \, dx. $$
It is well-known that the convolution $f*g$ of Fourier-transforms to the product of $\hat{f}$ and $\hat{g}$. More precisely, if both $f$ and $g$ are in $L^1(\Bbb{R})$, then by the Fubini's theorem
\begin{align*}
\widehat{f*g}(k)
&= \int_{-\infty}^{\infty} e^{ikx} \left( \int_{-\infty}^{\infty} f(x-y)g(y) \, dy \right) \, dx \\
&= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{ikx} f(x-y)g(y) \, dxdy \\
&= \int_{-\infty}^{\infty} \hat{f}(k)e^{iky}g(y) \, dy \\
&= \hat{f}(k)\hat{g}(k).
\end{align*}
Now by noticing that
$$f(x) = \mathbf{1}_{[-1/2,1/2]}(x) \quad \Rightarrow \quad \hat{f}(k) = \frac{\sin (k/2)}{k/2}, $$
we have $\hat{f}(k)^2 = \widehat{f*f}(k)$ and hence by the Fourier inversion
$$ \frac{1}{2\pi}\int_{-\infty}^{\infty} e^{-ixk}\hat{f}(k)^2 \, dk
= (f*f)(x), $$
which we can compute directly to obtain the answer.

A direct computation not using Fourier inversion is as available. It begins with the following Dirichlet integral:
$$ \int_{-\infty}^{\infty} \frac{\sin (xk)}{k} \, dk = \pi\operatorname{sign}(x). $$
Now by noting that
$$ \cos(xk)\sin^2(k/2) = \frac{1}{2}\cos(xk) - \frac{1}{4}\cos((x-1)k) - \frac{1}{4}\cos((x+1)k) $$
and performing integration by parts, we have
\begin{align*}
&\frac{1}{2\pi} \int_{-\infty}^{\infty} \cos(xk)\frac{\sin^2(k/2)}{(k/2)^2} \, dk \\
&= \frac{1}{2\pi} \int_{-\infty}^{\infty} \frac{(x-1)\sin((x-1)k) + (x+1)\sin((x+1)k) - 2x\sin(xk)}{k} \, dk \\
&= \frac{|x-1| + |x+1| - 2|x|}{2}.
\end{align*}
