= Cosine-difference inverse-square integral
{title2=$\int_{\mathbb R}[\cos(ax)-\cos(bx)]dx/x^2=\pi(|b|-|a|)$}
For $a,b>0$, integrate $(e^{iaz}-e^{ibz})/z^2$ over an upper semicircle with a small clockwise indentation excluding zero. The large arc vanishes; the small arc tends to $-i\pi$ times the residue $i(a-b)$, namely $\pi(a-b)$. The contour encloses no poles, so the remaining real-axis principal value is $\pi(b-a)$. Taking real parts gives the displayed ordinary integral, whose cancellation at zero removes its apparent singularity. Evenness of the cosine extends the formula to arbitrary real $a,b$, with zero frequencies obtained by a limit. The individual integrals of $\cos(ax)/x^2$ cannot be subtracted as separately convergent improper integrals.
Back to article page