# Converting to a complex integral and evaluating with Residue theorem

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

• When you see something that looks like $0/0$ it may mean something's "nasty". But $1/0$ (for something that's supposed to be a complex number" does not indicate nastiness, it means you made an error. That formula $\lim_{z\to a}(z-a)/f(z)$ gives the residue for simple poles, and your poles are not simple. (How to tackle this: Read the book for examples of residues at non-simple poles...) Nov 21, 2017 at 18:39
• The pole is double. Look here for the correct formula en.wikipedia.org/wiki/… Nov 21, 2017 at 18:58

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!

• Adjust variables in the limit. $z$ and $x$ together are wrong Nov 21, 2017 at 18:55
• Thanks for pointing that out! I'm going to redo the residue calculation and see what I get. Nov 21, 2017 at 19:48
• All too easy. (+1) Nov 21, 2017 at 20:42
• @MarkViola Thanks! Nov 21, 2017 at 20:49

Let $x=\sqrt2\tan{t}.$

Thus, $$dx=\sqrt{2}(1+\tan^2t)dt$$ and $$\int\limits_{0}^{+\infty}\frac{1}{x^4+4t^2+4}dx=\int\limits_{0}^{+\infty}\frac{1}{(t^2+2)^2}dx=\int\limits_{0}^{\frac{\pi}{2}}\frac{\sqrt{2}(1+\tan^2t)}{4(1+\tan^2t)^2}dt=$$ $$=\frac{1}{2\sqrt2}\int\limits_{0}^{\frac{\pi}{2}}\cos^2tdt=\frac{1}{4\sqrt2}\int\limits_{0}^{\frac{\pi}{2}}(1+\cos2t)=\frac{\pi}{8\sqrt2}.$$

• I'm trying to solve this integral with residue theorem, but thanks for the answer! Nov 21, 2017 at 19:47
• The tags "Complex-Analysis," "Complex-Numbers," "Residue_Calculus," and "Complex-Integration," along with the title and entire body of the posted question suggest that this post doesn't provide the desired way forward. You might consider, therefore, mentioning this as a preamble. Nov 21, 2017 at 20:50

writing your integral in the form: $$\int_{0}^\infty \frac{1}{(x^2+2)^2}dx$$ Substitute $$x=\sqrt{2}\tan(u)$$ then we get $$\sqrt{2}\int_{0}^{\pi/2}\frac{\cos^2(u)}{4}du$$ and this is equal to $$\frac{1}{2\sqrt{2}}\frac{1}{2}\cos(2u)+\frac{1}{2}du$$ substutute $2u=s$ then we have $$\frac{1}{8\sqrt{2}}\int_{0}^\pi\cos(s)ds+\frac{1}{4\sqrt{2}}\int_{0}^\frac{\pi}{2}1du$$ and this is equal to $$\lim_{b\to \pi^-}\frac{\sin(b)}{8\sqrt{2}}+\frac{1}{4\sqrt{2}}\int_{0}^{\frac{\pi}{2}}1du$$ since the first Limit is Zero we get $$\lim_{b\to \frac{\pi^-}{2}}\frac{u}{4\sqrt{2}}|_{0}^b=\frac{\pi}{8\sqrt{2}}$$

• I'm trying to solve this integral with residue theorem, but thanks for the answer! Nov 21, 2017 at 19:47