Contour integral with pure imaginary pole of order two : $\int_{0}^{\infty}\frac{x^2}{(x^2+9)^2(x^2+4)}dx$

complex-analysiscontour-integrationresidue-calculus

I am trying to calculate $\int_{0}^{\infty}\frac{x^2}{(x^2+9)^2(x^2+4)}dx$. I want to use the upper half-circle as the contour (since the integrand is even), yet the function as poles in $2i , 3i$, but the pole $3i$ is an order $2$ pole, I couldn't find a way to calculate the residue of $3i$ in order to calculate the integral. Is there a way to split the integrand to $\frac{A}{x^2+9}$ + $\frac{B}{x^2+9}$ + $\frac{C}{x^2+4}$? or simple way to calculate the residue to $x=3i$?

Best Answer

Note that$$\frac{z^2}{(z^2+9)^2(z^2+4)}=\frac{z^2}{(z-3i)^2(z+3i)^2(z^2+4)}.$$Now, let $g(z)=\frac{z^2}{(z+3i)^2(z^2+4)}$. Then $g(3i)=-\frac1{20}$ and $g'(3i)=-\frac{13i}{300}$. Therefore,\begin{align}\frac{z^2}{(z-3i)^2(z+3i)^2(z^2+4)}&=\frac{-\frac1{20}-\frac{13i}{300}(z-3i)+\cdots}{(z-3i)^2}\\&=-\frac1{20(z-3i)^2}-\frac{13i}{300(z-3i)}+\cdots,\end{align}and so$$\operatorname{res}_{z=3i}\frac{z^2}{(z^2+9)^2(z^2+4)}=-\frac{13i}{300}.$$