# How to evaluate contour integral of rational times trig function

While working a problem, I came across an expression for a finite wave train. I want to know the standard deviation of the frequency representation of that wave train. I found using the operator method from QM that it's $\frac{\pi^2}{a^2}$. I'd like to show this more explicitly by evaluating the below integral of the Fourier Transform of that wave train. Mathematica confirms that the integral converges to the same answer. It's very similar to the integral of the Sinc squared function, but times a rational function:

$$\frac{4\pi}{a^3}\int^\infty_{-\infty} \frac{k^2 \cos^2{(xa/2)}}{(\pi/a-k)^2 (\pi/a+k)^2} \, dk$$

I've attempted to evaluate

$$\int_\gamma \frac{z^2 e^{2i(za/2)}}{(\pi/a-z)^2 (\pi/a+z)^2} \, dz$$

over the semicircle of Radius $R$ centered at the origin, deformed at the points $z = \pm\frac{\pi}{a}$ into a Semicircle of radius $\epsilon$, then taking limits as R goes to infinity and epsilon to zero. I see that it has two poles at $\pm\frac{\pi}{a}$ but the residues at those points are zero, so that doesn't help any.

The first thing I've tried to do is evaluate this on the smaller semicircles, taking $z = \frac{\pi}{a} + \epsilon e^{i\theta}$ and integrating with respect to $\theta$. This becomes an integral of an ugly rational expression that I can't seem to make any headway on using partial fractions. Should I have chosen a different "complexified" integral?

• I guess that the $\cos$ term in the integral reads $\cos^2(ka/2)$. If so, I'm surprised by the result you quote: with $k=\pi y/a$ the integral can be written as $$\frac{a}{\pi}\int_0^\infty \frac{y^2\cos^2(\pi y/2)}{(y^2-1)^2}\,dy$$ and is thus proportional to $a$ and not $a^{-2}$. (The result is $\pi a/4$). – Paul Enta Sep 5 '17 at 10:29
• In the complex integral evaluation you try, you have to take care that the poles are of order 2, residues are not zero. – Paul Enta Sep 5 '17 at 10:46
• You're correct, I left off the normalization constant when I typed up the integral. There is a $4\pi/a^3$ that I pulled out of the integral. – Nolan King Sep 5 '17 at 21:23

With $\cos^2 (\pi y/2)=(1+\cos (\pi y))/2$ and considering that the function to be integrated is even, one has $$I=\frac{a}{2\pi}\int_{-\infty}^{\infty}\frac{1+e^{i\pi y}}{(1-y^2)^2}y^2\,dy$$ We integrate along the large upper semi-circle deformed on the real axis to avoid the poles $\pm1$ from below. Residues for the poles are both $-i\pi/4$, each contribution is then $i\pi \times -i\pi/4=\pi^2/4$. The circular contribution vanishes due to the asymptotic behaviour of the function on the upper half-plane. Thus $$I=\frac{a\pi}{4}$$