Residues of $\frac{e^{imz}}{1+z^4}$

I am trying to calculate the residues of $$\frac{e^{imz}}{1+z^4}$$. For context, I am calculating $$\int\limits_0^\infty \frac{e^{imz}}{1+z^4}dx$$ and taking the real part of the integral to calculate $$\int\limits_0^\infty \frac{\cos mx}{1+x^4}dx$$. I don't necessarily want the answer to the final integral, I would prefer if someone helped me with computing the residues since they seem overly complicated.

We have that $$f(z) =\frac{e^{imz}}{1+z^4}$$ has simple poles at $$e^{\frac{\pi i}{4}}, e^{-\frac{\pi i}{4}}, e^{\frac{3\pi i}{4}},$$ and $$e^{-\frac{3\pi i}{4}}$$. Based on my choice of contour, the only poles I need to calculate the residue for are $$z=e^{\frac{\pi i}{4}}$$ and $$z=e^{\frac{3\pi i}{4}}$$. We have that \begin{align*} Res(f, e^{\frac{\pi i}{4}}) &= \frac{exp(ime^{\frac{\pi i}{4}})}{4e^{\frac{3\pi i}{4}}}\\ Res(f, e^{\frac{3\pi i}{4}}) &= \frac{exp(ime^{\frac{3\pi i}{4}})}{4e^{\frac{\pi i}{4}}} \end{align*} When I try to apply residue theorem to the desired integral, I get a very complicated expression, and so I am not too sure if the residues I computed are correct. Did I compute the residues correctly?

• What is your path of integration? Do you need all poles, or just the one in the interior of the first quadrant? – MPW Dec 3 '18 at 22:27
• My path of integration is the upper semicircle from $R$ to $-R$ and then the portion of the real line from $-R$ to $R$, so I will need to look at the two poles that I have tried calculating the residues for. – J. Pistachio Dec 3 '18 at 22:28