Using the fourier transform of f(x) to find an integral $$
\,\mathrm{f}\left(\, x\, \right) \equiv
\left\{\begin{array}{rcrcccl}
1 & \quad\mbox{if}\quad &  0 & < & x & \leq & a 
\\[1mm]
-1 & \quad\mbox{if}\quad & -a & \leq & x & \leq & 0
\\[1mm]
0 & \quad\mbox{if}\quad &&& \left\vert\, x\, \right\vert & > & a
\end{array}\right.
$$
Using the fourier transform of $\,\mathrm{f}\left(\, x\, \right)$, calculate the following integral:
$$
\,\mathrm{g}\left(\, a,b\, \right) =
\int_{0}^{\infty}{\cos\left(\, ax\, \right) - 1 \over x}\,
\sin\left(\, bx\,\right)\,\mathrm{d}x\,;\qquad a,b > 0
$$
I found that the fourier transform of $\,\mathrm{f}\left(\, x\, \right)$ is:
$$
\widehat{\mathrm{f}}\left(\, \omega\, \right) =
{1 - \cos\left(\,\omega a\, \right) \over \pi\mathrm{i}\omega}
$$
which leads to:
$$
\widehat{\mathrm{f}}\left(\, x\, \right) =
{1 - \cos\left(\, ax\, \right) \over \pi\mathrm{i}x}\ \to\
\mathrm{g}\left(\, a,b\, \right)
=-\pi\mathrm{i}\int_{0}^{\infty}\,\,\widehat{\mathrm{f}}\left(\, x\, \right)
\sin\left(\, bx\, \right)\,\mathrm{d}x
$$
but I don't know where to go from here.
Thought about using the Plancherel theorem but i'm not sure how.
Please help ! :)
 A: $\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \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{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\mc}[1]{\,\mathcal{#1}}
 \newcommand{\mrm}[1]{\,\mathrm{#1}}
 \newcommand{\ol}[1]{\overline{#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{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\mrm{f}\pars{x} & =
\int_{-\infty}^{\infty}\hat{\mrm{f}}\pars{k}\expo{-\ic kx}
\,{\dd k \over 2\pi}
\quad\imp\quad
\hat{\mrm{f}}\pars{k} =
\int_{-\infty}^{\infty}\mrm{f}\pars{x}\expo{\ic kx}\,\dd x
\end{align}

\begin{align}
\hat{\mrm{f}}\pars{k} & =
-\int_{-a}^{0}\expo{\ic kx}\,\dd x + \int_{0}^{a}\expo{\ic kx}\,\dd x =
-\,{1 - \expo{-\ic ka} \over \ic k} +
{\expo{\ic ka} - 1\over \ic k}
\\[5mm] & = {2 \over \ic k}\,\bracks{\cos\pars{ka} - 1}
\\[5mm] \imp\quad & 
{\cos\pars{ax} - 1 \over x} =
-\,\half\,\ic\int_{-\infty}^{\infty}\mrm{f}\pars{t}\expo{\ic xt}\,\dd t
\end{align}

\begin{align}
\color{#f00}{\mrm{g}\pars{a,b}} & =
\int_{0}^{\infty}{\cos\pars{ax} - 1 \over x}\,\sin\pars{bx}\,\dd x=
\half\int_{-\infty}^{\infty}{\cos\pars{ax} - 1 \over x}\,\sin\pars{bx}\,\dd x
\\[5mm] & =
\half\int_{-\infty}^{\infty}\bracks{%
-\,\half\,\ic\int_{-\infty}^{\infty}\mrm{f}\pars{t}\expo{\ic xt}\,\dd t}
\sin\pars{bx}\,\dd x
\\[5mm] & =
-\,{1 \over 4}\ic\int_{-\infty}^{\infty}\mrm{f}\pars{t}
\int_{-\infty}^{\infty}\expo{\ic tx}
\sin\pars{bx}\,\dd x\,\dd t
\\[5mm] & =
-\,{1 \over 8}\int_{-\infty}^{\infty}\mrm{f}\pars{t}
\bracks{\int_{-\infty}^{\infty}\expo{\ic \pars{t + b}x}\,\dd x -
\int_{-\infty}^{\infty}\expo{\ic \pars{t - b}x}\,\dd x}\dd t
\\[5mm] & =
{1 \over 4}\,\pi\int_{-\infty}^{\infty}\mrm{f}\pars{t}\bracks{%
\delta\pars{t - b} - \delta\pars{t + b}}\,\dd t =
\color{#f00}{{1 \over 4}\,\pi\bracks{\mrm{f}\pars{b} - \mrm{f}\pars{-b}}}
\end{align}
