I was asked a question, to evaluate the improper integral: $$\int \limits_{0}^{\infty}\frac{x^{1/3}}{1+x^2}dx$$
I am using complex analysis to solve this. Consider some small radius r, large radius R, and small angle η. I am considering the integral along γ1 + γR + γ2 + γr, where γR is the circle of radius R, omitting points with argument between −η and η, γr is clockwise around the circle of radius r, omitting points with argument between −η and η, γ1 is along the ray of argument η, from γr to γR, and γ2 is along the ray of argument −η, from γR to γr. I think the integral along γR and γr is 0. I estimated them by ML inequality and the integral along those tend to 0. But I am not able to evaluate the integral along γ1 and γ2. I think I can employ the residue theorem for them. But I do not know what the index is. Any help is appreciated.

Consider the contour integral \begin{align} \int_C f(z)\ dz=\int_{C}\frac{z^{1/3}}{1+z^2}\ dz \end{align} where $C=L_1+C_R +L_2 +C_\epsilon$ is given by
where \begin{align} z^{1/3} = \exp\left(\frac{1}{3}\log z \right) \end{align} is given by the branch of the logarithm with $-\frac{\pi}{2}<\theta \le \frac{3\pi}{2}$.
It's not hard to see that $f(z)$ has a simple pole at $z=i$ and analytic everywhere else on the strictly upper half plane. Hence by Cauchy's theorem, we have that \begin{align} \int_{L_1} \frac{z^{1/3}}{1+z^2}\ dz + \int_{C_R}\frac{z^{1/3}}{1+z^2}\ dz+ \int_{L_2}\frac{z^{1/3}}{1+z^2}\ dz+\int_{C_\epsilon}\frac{z^{1/3}}{1+z^2}\ dz = 2\pi i \operatorname{Res}_{z= i} f(z) = \pi i^{1/3} = \pi e^{i\pi/6}. \end{align} Let us simplify each integral. Observe \begin{align} \int_{L_1} \frac{z^{1/3}}{1+z^2}\ dz = \int^R_{\epsilon} \frac{x^{1/3}}{1+x^2}\ dx \end{align} and \begin{align} \int_{L_2} \frac{z^{1/3}}{1+z^2}\ dz =&\ \int^{-\epsilon}_{-R} \frac{x^{1/3}}{1+x^2}\ dx . \end{align}
Next, observe that \begin{align} \left|\int_{C_R}\frac{\exp\left(\frac{1}{3}\log|z|+i\frac{\theta}{3} \right)}{1+z^2}\ dz\right|\le \int_{C_R} \frac{R^{1/3}}{R^2-1}\ |dz| \le C \frac{R^{1+1/3}}{R^2-1}\rightarrow 0 \end{align} as $R \rightarrow \infty$. Lastly, we have that \begin{align} \left|\int_{C_\epsilon} \frac{z^{1/3}}{1+z^2}\ dz\right|\le \frac{C\epsilon^{1/3+\epsilon}}{1-\epsilon^2}\Rightarrow 0 \end{align} as $\epsilon\rightarrow 0$. Thus, it follows \begin{align} \int^\infty_{-\infty} \frac{x^{1/3}}{1+x^2}\ dx = \pi e^{i\pi/6}. \end{align}
Edit: This post was made when the original question was to evaluate \begin{align} \int^\infty_{-\infty} \frac{x^{1/3}}{1+x^2}\ dx. \end{align} The reader should note that this integral doesn't have a unique answer. You could get what I have shown or you could also get what robjohn have gotten. The ambiguity comes from the interpretation of $x^{1/3}$, which is not as simple as it looks. In particular, we need to first determine the meaning of $(-1)^{1/3}$. Most students in high school or even freshmen in college are taught that $(-1)^{1/3} = -1$ since $(-1)^3 = -1$, which is correct since a first course in calculus is usually restricted to the real numbers.
However, once students have learned a bit about the complex numbers then they should start to re-evaluate what $(-1)^{1/3}$ actually means. The first thing they should do is to look at any pre-calculus books (in particular, they should look at the pre-calculus book they had learned from) to see the definition of $a^b$. It shouldn't come as a surprise that most of the books only define $a^b$ for $a>0$.
So how should we define $(-1)^{1/3}$? The general definition used in complex analysis for raising a complex number $z$ to a complex power $a$ is defined as follow
i.e. you need to make a choice for your range of $\theta$ (in other words, you need to choose a branch of the logarithm) otherwise $z^a$ will be a multi-valued function on the complex plane, which mean it is not a function.
Why is it not a function? Let us look at the example $(-1)^{1/3}$. By definition \begin{align} (-1)^{1/3} = \exp\left(\frac{1}{3}\log(-1) \right) = \exp\left(\frac{i}{3}\arg (-1) \right). \end{align} Let us test the cases $\theta = \pi, 3\pi, 5\pi$ (all the other cases are similar to these three) since all three are arguments of $-1$. Observe \begin{align} \exp\left(i\frac{\pi}{3} \right) =&\ \cos\frac{\pi}{3} + i\sin\frac{\pi}{3}= \frac{1}{2}+i\frac{\sqrt{3}}{2}\\ \exp\left(i\frac{3\pi}{3} \right) =&\ \cos \pi + i \sin \pi = -1\\ \exp\left(i\frac{5\pi}{3} \right) =&\ \cos\frac{5\pi}{3} + i\sin\frac{5\pi}{3} = \frac{1}{2}-i\frac{\sqrt{3}}{2} \end{align} which means $(-1)^{1/3}$ have three interpretations.
In my interpretation of $z^{1/3}$, I have used the branch where $-\frac{\pi}{2}<\theta\le \frac{3\pi}{2}$, which contains $\pi$.Whereas, robjohn chose a branch that contains $3\pi$ ( or something similar) say $\frac{3\pi}{2}<\theta\le\frac{7\pi}{2}$ which will lead to the conclusion \begin{align} \int^\infty_{-\infty} \frac{x^{1/3}}{1+x^2}\ dx = 0. \end{align}