[Math] Evaluate improper integral $(\cos(2x)-1)/x^2$

complex-analysiscontour-integrationimproper-integralsintegration

Consider the following improper integral:

\begin{equation}
\int_0^\infty \frac{\cos{2x}-1}{x^2}\;dx
\end{equation}

I would like to evaluate it via contour integration (the path is a semicircle in the upper plane), but i have some problems: first, the only singularity would be $z=0$, but it is only an apparent singularity so the residue is $0$. There are no other singularity of interest, so the integral should be zero… But it can't be zero, so?

Best Answer

$$ \int_0^\infty\frac{\cos 2\,x-1}{x^2}\,dx=\frac12\,\int_{-\infty}^\infty\frac{\cos 2\,x-1}{x^2}\,dx=\frac12\,\int_{-\infty}^\infty\frac{\Re(e^{2ix}-1)}{x^2}\,dx. $$ The key is the choice of function to integrate along a path. The function $$ f(z)=\frac{e^{2iz}-1}{z^2}=\frac{2\,i}{z}-2-\frac{4\,i}{3}\,z+\cdots $$ has a simple pole at $z=0$ with residue $2\,i$. Take $R>0$ large and $\epsilon>0$ small. Integrate along a path formed by the positively oriented semicircle of radius $R$ in the upper half plane ($C_R$), the interval $[-R,-\epsilon]$ ($C_\epsilon$), the semicircle of radius $\epsilon$ negatively oriented and the interval $[\epsilon,R]$ and take the limit as $R\to\infty$ and $\epsilon\to0$. The integral along the path is zero, $\lim_{R\to\infty}\int_{C_R}f(z)\,dz=0$, but $\lim_{R\to\infty}\int_{C_\epsilon}f(z)\,dz=?$.

Related Question