$\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} \int_{0}^{\infty}{\sin\pars{px}\sin\pars{qx} \over x^{2}}\,\dd x & = {1 \over 2}\,p q\int_{0}^{\infty}{\sin\pars{\verts{p}x} \over \verts{p}x}\, {\sin\pars{\verts{q}x} \over \verts{q}x}\,\dd x \\[5mm] & = {1 \over 2}\,p q\int_{-\infty}^{\infty}\ \pars{{1 \over 2}\int_{-1}^{1}\expo{\ic k_{1}\verts{p}x}\dd k_{1}} \pars{{1 \over 2}\int_{-1}^{1}\expo{\ic k_{2}\verts{q}x}\dd k_{2}}\,\dd x \\[5mm] & = {1 \over 4}\,\pi p q\int_{-1}^{1}\int_{-1}^{1} \int_{-\infty}^{\infty}\expo{\ic\pars{k_{1}\verts{p} + k_{2}\verts{q}}x} \,{\dd x \over 2\pi}\,\dd k_{1}\,\dd k_{2} \\[5mm] & = {1 \over 4}\,\pi p q\int_{-1}^{1}\int_{-1}^{1} \delta\pars{k_{1}\verts{p} + k_{2}\verts{q}}\,\dd k_{1}\,\dd k_{2} \\[5mm] & = {1 \over 4}\,\pi p q\int_{-1}^{1}\int_{-1}^{1} {\delta\pars{k_{1} + k_{2}\verts{q/p}} \over \verts{\vphantom{\Large A}\verts{p}}}\,\dd k_{1}\,\dd k_{2} \\[5mm] & = {1 \ over 4}\,\pi\,\mrm{sgn}\pars{p}q \int_{-1}^{1}\bracks{-1 < -\verts{q \over p}\,k_{2} < 1}\,\dd k_{2} \\[5mm] & = {1 \ over 4}\,\pi\,\mrm{sgn}\pars{p}q \int_{-1}^{1}\bracks{\verts{k_{2}} < \verts{p \over q}}\,\dd k_{2} \\[5mm] & = {1 \ over 2}\,\pi\,\mrm{sgn}\pars{p}q \int_{0}^{1}\bracks{k_{2} < \verts{p \over q}}\,\dd k_{2} \\[5mm] & = {1 \ over 2}\,\pi\mrm{sgn}\pars{p}q \braces{\bracks{\verts{p \ over q} < 1}\int_{0}^{\verts{p/q}}\,\dd k_{2} + \bracks{\verts{p over q} > 1}\int_{0}^{1}\,\dd k_{2}} \\[5mm] & = {1 \ over 2}\,\pi\mrm{sgn}\pars{p}q \braces{\bracks{\verts{p} < \verts{q}}\verts{p \ over q} + \bracks{\verts{p} > \verts{q}}} \\[5mm] & = {1 \ over 2}\,\pi\mrm{sgn}\pars{p}\mrm{sgn}\pars{q} \braces{\vphantom{\Large A}\bracks{\vphantom{\large A}\verts{p} < \verts{q}}\verts{p} + \bracks{\vphantom{\large A}\verts{p} > \verts{q}}\verts{q}} \\[5mm] & = \bbx{{1 \ over 2}\,\pi \,\mrm{sgn}\pars{p}\,\mrm{sgn}\pars{q}\min\pars{\verts{p},\verts{q}}} \end{align}