How to solve the integral through a contour with branch points? Consider the integral
$$ \int^{\infty}_{0} \frac{x^{\frac{1}{3}}}{1+x^2}dx $$
on the complex plane
$$ \oint_{C} \frac{z^{\frac{1}{3}}}{1+z^2}dz $$
To find the poles $ 1+z^2=0 \Rightarrow z^2=-1 \Rightarrow z= \pm \sqrt{-1} \Rightarrow z= \pm i $ , by the residue theorems $$ \oint_{C} \frac{z^{\frac{1}{3}}}{1+z^2}dz = 2 \pi i \,\ Res f(z) $$
I know that
$$  \oint_{C} \frac{z^{\frac{1}{3}}}{1+z^2}dz = \oint_{C_R} \frac{z^{\frac{1}{3}}}{1+z^2}dz  +\oint_{C_2} \frac{z^{\frac{1}{3}}}{1+z^2}dz + \oint_{C_r} \frac{z^{\frac{1}{3}}}{1+z^2}dz + \oint_{C_1} \frac{z^{\frac{1}{3}}}{1+z^2}dz  $$
the contour used is below:

The integral in $C_R \rightarrow 0$ because $R \rightarrow \infty$ and the integral in $C_r \rightarrow 0$ because $r \rightarrow 0$.
But how can I calculate the integrals over $C_1$ and $C_2$? How can I calculate residuals?
The teacher said the result is
$$ I(1-e^{\frac{2 \pi i}{3}}) = 2 \pi i \Big[ \frac{e^{\frac{\pi i}{6}}}{2i}\Big] (1-e^{\frac{\pi i}{3}}) \quad \quad \Rightarrow  \quad \quad  I= \frac{\pi}{2 \sin(\frac{\pi}{3})} = \frac{\pi}{\sqrt{3}}$$
 A: You may start by removing the branch point through a suitable substitution:
$$I=\int_{0}^{+\infty}\frac{x^{1/3}}{1+x^2}\,dx\stackrel{x\mapsto z^3}{=}\int_{0}^{+\infty}\frac{3x^3}{1+x^6}\,dx=\int_{0}^{1}\frac{3x^3}{1+x^6}\,dx+\int_{1}^{+\infty}\frac{3x^3}{1+x^6}\,dx$$
then realize you do not need complex analysis at all:
$$ I = 3\int_{0}^{1}\frac{x+x^3}{1+x^6}\,dx=3\int_{0}^{1}\frac{x}{1-x^2+x^4}\,dx\stackrel{x\mapsto\sqrt{u}}{=}\frac{3}{2}\int_{0}^{1}\frac{du}{1-u+u^2}=\left.\sqrt{3}\arctan\left(\frac{2u-1}{\sqrt{3}}\right)\right|_{0}^{1}$$
immediately leads to $I=\frac{\pi}{\sqrt{3}}$.
Also, all integrals of the form $\int_{0}^{+\infty}\frac{x^\alpha}{1+x^\beta}\,dx $ can be computed through the substitution $\frac{1}{1+x^\beta}\to z$, Euler's Beta function and the reflection formula for the $\Gamma$ function.
A: For a complex analysis approach, let's call your complex integrand $f$, so
$$f(z) = \frac{z^{1/3}}{1 + z^2}.$$
Since this is a multi-valued function, you must make a branch cut to be able to define it as a function that is analytic anywhere. With the contour that you drew (and the domain of the original integral), the natural location of the branch cut would be the positive real axis. Now you have to choose a branch of the function, the natural choice would be such that as $r\to 0$ the function on $C_1$ tends to the real function, so that the integral over that segment is equal to your original integral (as $r\to0$ and $R\to\infty$):
$$I = \int_0^\infty f(x)dx = \lim_{r\to0}\lim_{R\to\infty}\int_{C_1}f(z)dz.$$
Now let's see how the values of $f$ on $C_2$ are related to those on $C_1$ as $r\to 0$: if we start out at a point $z_+ = x + \varepsilon i\in C_1$ and then follow a path to $z_- = x - \varepsilon i\in C_2$, we see that the (in the limit) $z_- = e^{2\pi i}z_+$. Of course this is equal to $z_+$ again, but the value of $f(z)$ along this path goes from $f(z_+)$ to $e^{2\pi i/3}f\left(z_+\right)$.
Since $C_2$ goes in the other direction than $C_1$, we see that
$$\int_{C_2}f(z)dz = -e^{2\pi i/3}\int_{C_1}f(z)dz.$$
You already know that the sum of the integrals over $C_1$ and $C_2$ is equal to $2\pi i\left(\operatorname{Res}(f,i) + \operatorname{Res}(f,-i)\right)$,
so
$$\left(1-e^{2\pi i/3}\right)I = \int_Cf(z)dz = 2\pi i\left(\operatorname{Res}(f,i) + \operatorname{Res}(f,-i)\right)$$
To compute the residues, you only have to be somewhat careful with the arguments of $\pm i$, which are $\pi/2$ and $3\pi/2$, and you get.
$$\operatorname{Res}(f,i) = \frac{e^{\pi i/6}}{2i},\ \ \ \ \operatorname{Res}(f,-i) = -\frac{e^{\pi i/2}}{2i}$$
from which you obtain the value your teacher gave.
