Evaluating a real definite integral using the residue at infinity I'm interested in evaluating $\displaystyle \int_{0}^{1} \frac{1}{(x^2-x^3)^{1/3}} \ dx $ using contour integration and the residue at infinity.
But I'm not sure how to define $\displaystyle f(z) = \frac{1}{(z^2-z^3)^{1/3}}$ so that it is well-defined on the complex plane if the line segment $[0,1]$ is omitted.
And then once defined, how do you determine the value of $f(z)$ just above the branch cut and  just below the branch cut?  
 A: Let us analyze the function for each of the branch points $z=0$ and $z=1$ separately:


*

*Around $z=0$, the function $$f_0(z) = z^{-2/3} + O(z^{1/3}).$$ We choose the branch cut such that it extends to $z>0$. Thus, we have
$$f_0(z) = |z|^{-2/3} e^{-i (2/3)\arg z} + O(z^{1/3})$$
with $0 <\arg z < 2\pi$. Just above the the branch cut (at $z=0^+ + i 0^+$), we have $\mathop{\rm arg} z = 2\pi$ and thus $f_0(z) = |z|^{-2/3} e^{-i 4\pi/3} = |z|^{-2/3} e^{i 2\pi/3}$. Just below the branch cut (at $z=0^+ - i 0^+$), we have $\arg z =0$ and thus $f_0(z) = |z|^{-2/3} .$

*At $z=1$, we have a somewhat simpler structure. We can write the function $$f_1(z) = |z^2- z^3|^{-1/3}  e^{-i(1/3) [\arg (z^2 -z^3) + 2\pi n]}$$
which has a branch cut along the  real line for $z<1$. Here, $n\in\mathbb{Z}$ will be chosen below such that the two expressions $f_0$ and $f_1$ coincide for $z$ close to 0.
So, let us see what happens at $z=0$: 


*

*Just above the branch cut, the function $f_1(z)$ assumes the form
$$f_1(x+i 0^+) = |x^2 - x^3|^{-1/3} e^{-i  2\pi n/3} $$

*Just below the branch cut, the function $f_1(z)$ assumes the form
$$f_1(x-i 0^+) = |x^2 - x^3|^{-1/3} e^{-i 2\pi/3 - i 2\pi n/3} $$
We observe that for $n=-1$ we have found a consistent branch cut structure, where the branch cut only extends between $z=0$ and $z=1$.
The function just above the branch cut reads
$$f(x + i 0^+) = | x^2 -x^3|^{-1/3} e^{i  2\pi /3} .$$
Just below the branch cut, we have
$$f(x - i 0^+) = | x^2 -x^3|^{-1/3} .$$
For $x>1$, we have $$f(x)= f_1(x) = |x^2 -x^3|^{-1/3} e^{-i(1/3)(\pi -2\pi)} = 
|x^2 -x^3|^{-1/3} e^{i \pi/3}.$$
For $x<1$, we have $$f(x)= |x^2 - x^3|^{-1/3} e^{-i 2\pi/3}.$$
In general for $|z| \to \infty$ the function assumes the form $$f(z) = |z|^{-1} e^{-i\arg (z)+i \pi/3} = \frac{e^{i \pi/3}}{z}$$ which gives you the residue $e^{i\pi/3}$ at infinity.
Thus, we have $$\int_{0}^{1} [f(x - i 0^+) - f(x + i 0^+) ] \ dx = -2 \pi i e^{i \pi/3}$$ or in other words
$$\int_{0}^{1} \frac{1}{(x^2-x^3)^{1/3}} (1- e^{i 2\pi/3}) \ dx = -2 \pi i e^{i \pi/3}$$ from which you obtain (e.g., taking the imaginary part) the result
$$\int_{0}^{1} \frac{1}{(x^2-x^3)^{1/3}} =  \frac{2\pi}{\sqrt{3}}.$$
A: We can write $f(z) = \alpha z^{-1} (1 - 1/z)^{-1/3}$ where $\alpha$ is one of the cube roots of $-1$, and use the principal branch of  $w \to w^{-1/3}$: this has a branch cut for $w$ on the negative real axis, which corresponds to $z \in (0,1)$.  
Now  for $z = s + i \epsilon$ with $0 < s < 1$ and $\epsilon \to 0+$, $1-1/z \sim 1-1/s +  i \epsilon/s^2$ approaches $1-1/s$ from the upper half plane, and $(1-1/z)^{-1/3} \to (1/s-1)^{-1/3} e^{-\pi i/3}$.  If you want real values for $f(z)$ as $z$ approaches the branch cut from the upper half plane, you therefore want to take 
$\alpha = e^{\pi i/3}$.   On the other side, for $z = s - i \epsilon$, $1 - 1/z \sim 1-1/s -  i \epsilon/s^2$, $(1-1/z)^{-1/3} \to (1/s-1)^{-1/3} e^{+\pi i/3}$, and $f(z) \to (1/s-1)^{-1/3} e^{2\pi i/3}$.
