Finding the improper integral 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.
 A: Since $x^{1/3}$ is an odd function on $\mathbb{R}$,
$$
\int_{-\infty}^\infty\frac{x^{1/3}}{1+x^2}\,\mathrm{d}x=0\tag{1}
$$

However, if we want to compute the integral over the positive real axis, then
$$
\int_0^\infty\frac{x^{1/3}}{1+x^2}\,\mathrm{d}x
=\frac12\int_0^\infty\frac{x^{-1/3}}{1+x}\,\mathrm{d}x\tag{2}
$$
The contour integral
$$
\begin{align}
\int_\gamma\frac{z^{-1/3}}{1+z}\,\mathrm{d}z
&=\left(1-e^{-2\pi i/3}\right)\int_0^\infty\frac{x^{-1/3}}{1+x}\,\mathrm{d}x\\
2\pi ie^{-\pi i/3}
&=e^{-\pi i/3}\left(e^{\pi i/3}-e^{-\pi i/3}\right)\int_0^\infty\frac{x^{-1/3}}{1+x}\,\mathrm{d}x\\
\pi&=\sin(\pi/3)\int_0^\infty\frac{x^{-1/3}}{1+x}\,\mathrm{d}x\\
\frac{2\pi}{\sqrt3}&=\int_0^\infty\frac{x^{-1/3}}{1+x}\,\mathrm{d}x\tag{3}
\end{align}
$$
where $\gamma$ is the curve

Combining $(2)$ and $(3)$, we get
$$
\int_0^\infty\frac{x^{1/3}}{1+x^2}\,\mathrm{d}x=\frac\pi{\sqrt3}\tag{4}
$$
A: $\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Also, you can still evaluate it by '$\ds{\color{#f00}{real\ methods}}$' as follows:
  $$
x \equiv \pars{{1 \over t} - 1}^{1/2}\iff t = {1 \over 1 + x^{2}}\,,\qquad
\totald{x}{t} = -\,{t^{1/2}\pars{1 - t}^{-1/2} \over 2t^{2}}
$$

\begin{align}
\int_{0}^{\infty}{x^{1/3} \over 1 + x^{2}}\,\dd x & =
\int_{0}^{1}t\bracks{\pars{1 - t}^{1/6}\,t^{-1/6}}\,
{t^{1/2}\pars{1 - t}^{-1/2} \over 2t^{2}}\,\dd t =
{1 \over 2}\int_{0}^{1}t^{-2/3}\pars{1 - t}^{-1/3}\,\dd t
\\[5mm] & =
{1 \over 2}\,\mrm{B}\pars{{1 \over 3},{2 \over 3}}\qquad
\pars{~\mrm{B}:\ Beta\ Function~}
\\[5mm] & =
{1 \over 2}\,{\Gamma\pars{1/3}\Gamma\pars{2/3} \over \Gamma\pars{1/3 + 2/3}}
\qquad\pars{~\Gamma:\ Gamma\ Function.\ \mbox{Note that}\ \Gamma\pars{1} = 1~}
\\[5mm] & =
{1 \over 2}\,{\pi \over \sin\pars{\pi/3}}\qquad
\pars{~Euler\ Reflection\ Formula~}
\\[5mm] & =
{1 \over 2}\,{\pi \over \root{3}/2} = \bbx{\ds{{\root{3} \over 3}\,\pi}}
\end{align}
A: 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

\begin{align} z^a = \exp\left(a \log z \right) = \exp\left( a\ast
  [\log|z|+i \arg \theta]\right),
 \end{align}

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}
