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:
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?