# Finding residues for function with double pole

I am working through Whittaker and Watson and I want to do this problem to develop my technique of integration with residues.

The problem is to show that

$$\int^\infty_{-\infty}\frac{dx}{(x^2+b^2)(x^2+a^2)^2}=\frac{\pi(2a+b)}{2a^3b(a+b)^2}$$

So first I let $Q(x)$ be the integrand and consider $Q(z)$ for $0\leqslant\arg z\leqslant\pi.$ I have shown that $Q(z)\to 0$ as $|z|\to\infty$ in a uniform way. Similarly that it is analytic except for a finite number of poles which are at $z=ia, ib.$ Now I can find the residue at $z=ib,$ by taking $(z-ib)Q(z)$ in the limit:

$$\lim\limits_{z\to ib}\frac{1}{(z+ib)(z^2+a^2)^2}=\frac{1}{2ib(a^2-b^2)^2}$$

(I think this part is right) When it comes to the double pole at $z=ia,$ the work is a little uglier. To write $Q(z)$ as a series seems inconvenient, but to write $(z-ia)^2Q(z)$ and take the limit feels intuitively like it would be wrong.

What is the most convenient method to deal with the residue at this double pole, and how can we deal with residues in an effective way? If someone could show a snippet of how to work through this example (or similar) or confirm for me the answer so I can learn this technique myself I would be grateful.

Thanks

If $f(z)$ has a double pole at $z=w$ we have: $$\text{Res}\left(f(z),z=w\right) = \lim_{z\to w}\frac{d}{dz}\left[(z-w)^2 f(z)\right]\tag{1}$$ but in your case it is probably simpler to just apply differentiation under the integral sign.
Since for any $A,B>0$ we have (by partial fraction decomposition) $$\int_{-\infty}^{+\infty}\frac{dx}{(x^2+A)(x^2+B)} = \frac{\pi}{A\sqrt{B}+B\sqrt{A}}\tag{2}$$ by differentiating both sides with respect to $A$ we get: $$\int_{-\infty}^{+\infty}\frac{dx}{(x^2+A)^2 (x^2+B)} = \frac{\pi\left(\sqrt{B}+\frac{B}{2\sqrt{A}}\right)}{\left(A\sqrt{B}+B\sqrt{A}\right)^2}\tag{3}$$ and the claim simply follows from setting $A=a^2, B=b^2$ and simplifying.
One way is to write $z=w+ia$ and expand as a Laurent series in $w$. Here we have $$\frac1{(z^2+a^2)^2(z^2+b^2)}=\frac1{(2aiw+w^2)^2(b^2-a^2+2iaw+w^2)} =\frac{(1+w/(2ai))^{-2}(1+(2aiw+w^2)/(b^2-a^2))^{-1}}{-4a^2(b^2-a^2)w^2}.$$ To get the residue, you now have to find the $w$-coefficient of the numerator. This isn't so bad...