Computing the integral $\int_{-\infty}^{\infty}\frac{z^4}{1+z^8}dz$ I need help to compute the following integral:
$$\int_{-\infty}^{\infty}\frac{z^4}{1+z^8}dz$$
I need to use Cauchy's residue theorem. 
I can write that $z^8+1=z^8-i^2=(z^4-i)(z^4+i)$. How do I proceed?
Please give a methodological answer so that I can solve other questions too. 
Thanks

The idea when applying the residue theorem to a definite integral is to do the following:


*

*Turn the integrand into a meromorphic function $f(z)$.

*Choose a contour $\gamma$ such that the desired integral can be related to $\int_{\gamma}f(z)dz$.

*Evaluate the integral $\int_{\gamma}f(z)dz$ by finding the poles of $f$ and the residues at these poles, and then using the residue theorem.


In your case you naturally have
$$
f(z)=\frac{z^4}{1+z^8}.
$$
A common contour to use when evaluating an integral from $-\infty$ to $\infty$ is a semicircle of radius $R$ in the upper half-plane, centered at the origin. By diving this contour into two parts, you see that the contour integral will be the integral
$$
\int_{-R}^R\frac{x^4}{1+x^8{{}}}dx
$$
plus $\int_{C}f(z)dz$, where $C$ is the upper half of the circle of radius $R$ (centered at the origin). Can you show that as $R\to\infty$, the integral over the top half of the circle goes to $0$?
Now you know that your desired integral equals the limit of the contour integral $\int_{\gamma}f(z)dz$ as $R\to\infty$. In order to find the poles of $f$ within this contour, you should determine where $1+z^8=0$. Can you finish the problem from here?
