# Residue Theorem Troubles

I'm trying to compute $$\int_{0}^{\infty} \frac{\cos(ax)}{1+x^4}dx$$ using the residue theorem.

I've split this integral into two contour integrals in the complex plane--one along the real axis and one along the semi circle in the upper half plane centered at the origin. However, I'm having some trouble computing my residues and getting the answer to work out correctly.

The poles are at $z=e^{i\pi/4}$ and $z=e^{3i\pi/4}$. I was going to compute the residues from the limit definition but it becomes quite messy. Is there a better way of going about this?

• You need to be careful with this, because $\cos(ax)$ becomes exponentially large in the upper half plane. – mjqxxxx Dec 6 '12 at 21:51
• @mjqxxxx Isn't that solved with Jordan's Lemma? – Argon Dec 6 '12 at 22:58

Let us define the following function

$$f(z):=\frac{e^{iaz}}{z^4+1}$$

so

$$z_1:=e^{\pi i/4}=\frac{1}{\sqrt 2}(1+i)\Longrightarrow Res_{z=z_1}(f)=\lim (z-z_1)f(z)\stackrel{\text{L'Hospital}}=$$

$$=\lim_{z\to z_1}\frac{e^{aiz}}{4z^3}=\frac{\sqrt 2\;e^{\frac{a}{\sqrt 2}\left(-1+i\right)}}{4(-1+i)}=-\frac{1+i}{4}\cdot{e^{\frac{a}{\sqrt 2}\left(-1+i\right)}}$$

$${}$$

$$z_2=e^{3\pi i/4}=\frac{1}{\sqrt 2}\left(-1+i\right)\Longrightarrow Res_{z=z_2}(f)=\lim (z-z_2)f(z)\stackrel{\text{L'Hospital}}=$$

$$=\lim_{z\to z_2}\frac{e^{aiz}}{4z^3}=\frac{\sqrt 2\;e^{-\frac{a}{\sqrt 2}\left(1+i\right)}}{4(1+i)}=\frac{1-i}{4}\cdot{e^{-\frac{a}{\sqrt 2}\left(1+i\right)}}$$

Added upon request by OP: With a little trigonometry and using the polar expression for complex numbers, we can write, for example:

$${}$$

$$\frac{1-i}{4}\cdot{e^{-\frac{a}{\sqrt 2}\left(1+i\right)}}=\frac{\sqrt 2\,\,e^{-\frac{a}{\sqrt 2}}}{4}\left[\left(\cos\frac{\pi}{4}-i\sin\frac{\pi}{4}\right)\left(\cos\frac{a}{\sqrt 2}-i\sin\frac{a}{\sqrt 2}\right) \right]=$$

$${}$$

$$=\frac{\sqrt 2\,\,e^{-\frac{a}{\sqrt 2}}}{4}\left[\cos\left(\frac{\pi}{4}+\frac{a}{\sqrt 2}\right)-i\sin\left(\frac{\pi}{4}+\frac{a}{\sqrt 2}\right)\right]=\frac{\,\,e^{-\left[\frac{a}{\sqrt 2}+i\left(\frac{\pi}{4}+\frac{a}{\sqrt 2}\right)\right]}}{2\sqrt 2}$$

$${}$$

How simple and which of the above forms is simpler I can't say...in fact, I think they all are pretty nasty and even evil.

• I used on purpose the above function since I believe that's the one you should use to do the contour integration... – DonAntonio Dec 6 '12 at 21:52
• What you should use depends on the value of $a$... if $a$ isn't a positive real, then this won't be right. – mjqxxxx Dec 6 '12 at 21:53
• Indeed so: my assumption is $\,a>0\,$ , otherwise one may have to use $\,e^{-iaz}\,$ instead... – DonAntonio Dec 6 '12 at 21:57
• @DonAntonio: Indeed a is suppose to be real and positive. This method makes sense to me. Is there a simple way to simplify these residues upon using the residue theorem formula. I can't seem to find one. – Alex Dec 7 '12 at 2:11
• @Alex, I added some stuff to my answer. Hopefully it will at least give you some ideas. – DonAntonio Dec 7 '12 at 4:03

These poles are simple poles, so you can use next formula($c$ is pole): $res = \lim_{z\rightarrow c} (z-c)f(z)$; where $f(z)=\frac {cos(az)} {(x-e^{i\pi/4})(x-e^{i3\pi/4})(x-e^{i5\pi/4})(x-e^{i7\pi/4})}$