Currently I'm studying how to solve improper real integrals using the residue theorem. Usually it goes as follows:
- Write the improper integral as a limit, e.g. $\int_{-\infty}^\infty f(z)dz=\lim_{R\to\infty}\int_{-R}^Rf(z)dz$.
- Construct a complex contour containing the real linepiece from above
- Prove, using the Residue Theorem, that the entire contour integral equals something and prove that the integral over the complex part of the contour goes to zero as $R$ goes to infinity.
Currently I'm working on a homework exercise using the following improper integral: $$\int_{-\infty}^\infty \dfrac{\cos(x)}{(x^2+4)^2(x^2+9)}dx$$ I've tried looking up examples of integrals of such form, i.e. with $\cos(x)$, and they all just say: "We have this integral hence $f(z)=\dfrac{e^{iz}}{(z^2+4)^2(z^2+9)}$" and proceed to calculate the contour integral of $f(z)$ without ever explaining why this is going to equal the integral with $\cos(z)$. Can anyone help me figure out why this is allowed?
$$e^{iz}=\cos{z}+i\sin{z}$$ Most of the time for contour integration if $f(x)$ has $\sin{x}$ OR $\cos{x}$ (as does this case), then you can express $\sin{x}$ as the imaginary part of $e^{ix}$ OR $\cos{x}$ as the real part of $e^{ix}$. Then, once you evaluate the contour integral, you take the real part of the answer if you let $\cos{x}=e^{ix}$ or take the imaginary part of the answer if you let $\sin{x}=e^{ix}$.