integration using residue I am solving the following integral: $$\int_0^\infty \frac{x}{1+x^3}dx$$
I need to solve it using integration and residue theorems. I tried to convert it to complex function, for example $\frac{z}{1+z^3}$, but it is not even, so it is difficult to find the curve for integration. 
Any hints are welcome!
Thank you!
 A: Consider the contour integral
$$\oint_C dz \frac{z \log{z}}{1+z^3} $$
where $C$ is a keyhole contour about the positive real axis.
(This works for nonsymmetric functions over $[0,\infty)$.)
Then, by letting the outer radius go to $\infty$ and the inner radius go to zero, you will find that, because of the multivalued behavior of the log,
$$-i 2 \pi \int_0^{\infty} dx \frac{x}{1+x^3} = i 2 \pi \sum_k \operatorname*{Res}_{z=z_k} \frac{z \log{z}}{1+z^3} $$
where $z_k$ are the poles of the integrand, i.e., $z=e^{i (2 k+1) \pi/3}$ for $k \in \{0,1,2\}$.
One thing to keep in mind is that, because of the way the contour is defined, $\arg{z} \in [0,2 \pi]$, so that when evaluating the $\log{z_k}$, you need to make sure the values fall in that range.
A: Let $I$ be the integral of interest given by 
$$I=\int_0^\infty \frac{x}{1+x^3}\,dx \tag 1$$
We will proceed to evaluate $I$ using complex-plane analysis.

We begin by examining the closed contour integral $J$ given by
$$\begin{align}
J&=\oint_C \frac{z}{1+z^3}\,dz \\\\
&=\int_{C_1}\frac{z}{1+z^3}\,dz+\int_{C_2}\frac{z}{1+z^3}\,dz+\int_{C_3}\frac{z}{1+z^3}\,dz\tag 2
\end{align}$$
where $(i)$ $C_1$ is the real line segment from $(0,0)$ to $(R,0)$, (ii) $C_2$ is the circular arc, centered at the origin with radius $R$ from $(R,0)$ to $(R\cos(2\pi/3),R\sin(2\pi/3))$, and (iii) $C_3$ is the line segment from $(R\cos(2\pi/3),R\sin(2\pi/3))$ to $(0,0)$

Note that we can write $(2)$ as
$$J=\int_0^R \frac{x}{1+x^3}\,dx+\int_0^{2\pi/3}\frac{Re^{i\theta}}{1+R^3e^{i3\theta}}\,ie^{i\theta}\,d\theta+\int_R^0\frac{e^{i2\pi/3}t}{1+t^3}e^{i2\pi/3}\,dt \tag 3$$
Also note that as $R\to \infty$ the second integral on the right-hand side of $(3)$ goes to zero while using $(1)$ we have
$$\begin{align}
\lim_{R\to \infty}J&=\left(1-e^{i4\pi/3}\right)I\\\\
&=-2ie^{i2\pi/3}\sin(2\pi/3) \tag 4
\end{align}$$

Next, from the residue theorem, we have
$$\begin{align}
\lim_{R\to \infty}J&=2\pi i \text{Res}\left(\frac{z}{1+z^3},z=e^{i\pi/3}\right)\\\\
&=\frac13 e^{-i\pi/3} \tag 5
\end{align}$$

Setting the right-hand sides of $(4)$ and $(5)$ equal and solving for $I$ reveals
$$\bbox[5px,border:2px solid #C0A000]{I=\frac{2\pi}{3\sqrt 3}}$$
A: If you're not such a fan of keyhole contours, you can circumvent it with the substitution $x=e^t$ to get
$$\int_{-\infty}^\infty\frac{e^{2t}}{e^{3t}+1}dx$$
Now, if we define $f(z)=\frac{e^{2z}}{e^{3z}+1}$, note that $f(z+\frac{2\pi i}{3})=e^{4\pi i/3}f(z)$.
Define the rectangular contour $C$ as going $-K\to K \to K+\frac{2\pi i}{3} \to -K +\frac{2\pi i}{3}\to -K$. We now integrate $f$ over this contour. Note that:


*

*The $-K\to K$ segment will contribute $\int_{-K}^Kf(x)dx$

*The $K \to K+\frac{2\pi i}{3}$ segment is $O(e^{-K})$

*The $K+\frac{2\pi i}{3}\to -K+\frac{2\pi i}{3}$ segment will contribute $-e^{4\pi i/3}\int_{-K}^Kf(x)dx$

*The $-K+e^{4\pi i/3}\to-K$ segment is $O(e^{-2K})$

*The total integral over the rectangle will come from the residue at $\frac{i\pi}{3}$, as given by $\lim_{z\to}\frac{i\pi}{3}(z-\frac{i\pi}{3})\frac{e^{2z}}{e^{3z}+1}=\frac{-e^{2\pi i/3}}{3}$


So: $(1-e^{4\pi i/3})\int_{-K}^Kf(x)dx=2\pi i \frac{-e^{2\pi i/3}}{3}+O(e^{-K})$
So, taking $k\to\infty, \int_{-\infty}^\infty f(x)dx=\frac{-2\pi i {e^{2\pi i/3}}}{3(1-e^{4\pi i/3})}=\frac{\pi}{3\sin2\pi/3}=\frac{2\pi}{3\sqrt3}$
