So I'm running into this problem as I'm trying to evaluate this integral: $$ \int_0^{\infty} \frac{dx}{x^4+4x^2+4} $$
My work: $$ \int_0^{\infty} \frac{dx}{x^4+4x^2+4} \rightarrow \frac{1}{2}\int_{-\infty}^{\infty} \frac{dz}{z^4+4z^2+4} $$ The poles of $z^4+4z^2+4=0$ are: $z= -i \sqrt{2},-i \sqrt{2},i \sqrt{2},i \sqrt{2}$ $$ \rightarrow \frac{1}{2}\int_{-\infty}^{\infty} \frac{dz}{(z -i \sqrt{2})^2 (z +i \sqrt{2})^2} = \frac{1}{2}(2\pi i \sum \text{residues}) $$ $$ Res(i \sqrt{2}) = \lim_{z\rightarrow i \sqrt{2}}(z -i \sqrt{2}) f(z) = \lim_{z\rightarrow i \sqrt{2}} \frac{(z -i \sqrt{2})}{(z -i \sqrt{2})^2 (z +i \sqrt{2})^2} = \lim_{z\rightarrow i \sqrt{2}} \frac{1}{(z -i \sqrt{2}) (z +i \sqrt{2})^2} = -\infty $$
I don't think this is right? How should I be evaluating this integral so I don't get the nasty business of $\frac{1}{0}$?
Any advice on how to tackle this would be appreciated.
EDIT: I wasn't using the formula for higher order poles, thanks for pointing it out everyone
You have a pole of order $2$ in $i\sqrt{2}$ then the residue there is $$\lim_{z\to i\sqrt{2}}\left((z-i\sqrt{2})^2\frac{1}{z^4+4z^2+4}\right)'=-i\dfrac{\sqrt{2}}{16}$$ do this with other poles!