Show that $$\int_0^\infty \frac{\sin(px)\sin(qx)}{x^2}\,dx\;=\; \frac{\pi}{2}\min(p,q)$$ where $p,q>0$.
I need to use Cauchy's Residue theorem, I think, but I can't see what function to apply it to since the integrand in the question has only removable singularities. Also, I'm struggling to see where the $\min(p,q)$ term in the solution comes from.
Can anyone help me solve this question? Thanks