Residue calculus question I'm trying to understand the application of residue calculus to a worked example given in subsection 7.8 of this online document. The example gives two methods of evaluating the integral $$I=\int_0^\infty\frac{dx}{1+x^3}.$$ I'm looking at method 1 only (subsection 7.8.1) in which the author asks the reader to "...consider the related integral $$\oint_C\frac{\log z}{1+z^3}dz,$$ over the contour shown in Fig. 7.6." (see the PDF for figure). However, I do not grasp why in the contour integral we would choose the given integrand since it is different to that in the first integral above.
Any hints or an answer would be helpful to see what's going on. Many thanks.
 A: You should notice for integrating this function over the parts of the contour that are straight lines going from $0$ (well $\epsilon$ to be precise) to $\infty$, your parametrization should be $z = re^{i0}$ and $z = re^{i2\pi}$ for the line just above and just below your real axis respectively. Then when you break up your integral over the two lines and since your integral over the circles is zero your integral over the contour should be:
$$\int^\infty_0 \frac{\text{log}(re^{i0})}{1+r^3}dr + \int^0_{\infty}\frac{\text{log}(re^{2\pi i})}{1+r^3}dr.$$ Notice that I used $(re^{i0})^3 = (re^{i2\pi})^3 = r^3$ in the denominator. Now you can use the property that $\text{log}(ab) = \text{log}(a) + \text{log}(b)$ to get this is actually $$\int^\infty_0\frac{-2\pi i}{1+r^3}dr$$ which is a constant times what you are trying to evaluate. This is an indirect method that is sometimes used when other integrals somehow "contain" what you are trying to evaluate.
Edit: I should also add that if the fact that $e^{2\pi i} = 1$ is used prematurely in this problem it won't give you the right answer so what should be done for the sake of clarity is that in the parametrization above and below, the angles that should be taken are say $\alpha$ and $2\pi - \alpha$ and then work in the limit that $\alpha$ goes to zero.
