Integral by residue - "dog bone" Let $I=\int_{-1}^{1}\frac{x^2 dx}{\sqrt[3]{(1-x)(1+x)^2}}$. 
I used complex function $f(z)=\frac{z^2}{\sqrt[3]{(z-1)(z+1)^2}}$, which we can  define such that it is holomorphic on $\mathbb{C}\setminus[-1,1]$. I use a "dog bone"-contur to integrate it. I have problem with integral on the big circle :
$\lim_{R \to \infty}\int_{C_R}f(z)dz$. How to calculate it ? (I know that it should be nonzero.)
 A: Here is a real-analysis solution for comparison. Staring with the substitution $x\mapsto2x-1$:
$$
\begin{align}
\int_{-1}^1\frac{x^2\,\mathrm{d}x}{\sqrt[3]{(1-x)(1+x)^2}}
&=\int_0^1\frac{(2x-1)^2\,\mathrm{d}x}{\sqrt[3]{(1-x)x^2}}\\
&=4\int_0^1x^{4/3}(1-x)^{-1/3}\,\mathrm{d}x\\
&-4\int_0^1x^{1/3}(1-x)^{-1/3}\,\mathrm{d}x\\
&+\int_0^1x^{-2/3}(1-x)^{-1/3}\,\mathrm{d}x\\
&=4\mathrm{B}\left(\tfrac73,\tfrac23\right)
-4\mathrm{B}\left(\tfrac43,\tfrac23\right)
+\mathrm{B}\left(\tfrac13,\tfrac23\right)\\
&=4\frac{\Gamma\left(\frac73\right)\Gamma\left(\frac23\right)}{\Gamma(3)}
-4\frac{\Gamma\left(\frac43\right)\Gamma\left(\frac23\right)}{\Gamma(2)}
+\frac{\Gamma\left(\frac13\right)\Gamma\left(\frac23\right)}{\Gamma(1)}\\
&=\frac89\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)
-\frac43\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)
+\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)\\
&=\frac59\Gamma\left(\tfrac13\right)\Gamma\left(\tfrac23\right)\\
&=\frac59\pi\csc(\pi/3)\\
&=\frac{10\sqrt3}{27}\pi
\end{align}
$$
Using Euler's Reflection Formula proven in this answer.
A: Consider the function
$$f(z) = (z-1)^{-1/3} (z+1)^{-2/3} $$
$f$ is obviously the product of two functions, each having their own branch cuts.  For example, $(z-1)^{-1/3}$ has a branch cut along $(-\infty,1]$, while $(z+1)^{-2/3}$ has a branch cut along $(-\infty,-1]$.  Note that $z+1$ never changes sign along $(-1,1)$; it is always positive and away from its branch cut.  Therefore, we can say that $\arg{(z+1)}=0$ on the lines of the dogbone.  However, we do cross the branch cut of $(z-1)^{-1/3}$, i.e., $\arg{(z-1)}=\pi$ above the real axis and $\arg{(z-1)}=-\pi$ below.  
Now consider the contour integral
$$\oint_C dz \, z^2 f(z) $$
where $C$ is (1) the circle $z=R e^{i \theta}$, $\theta \in [-\pi,\pi)$, (2) a line extending from the circle at $\theta=\pi$ to the dogbone contour, (3) the dogbone, and (4) a line back to the circle at $\theta=-\pi$.  Note that the integral vanishes along the lines to the dogbone and along the small circles of the dogbone.  Thus, the contour integral is
$$i R \int_{-\pi}^{\pi} d\theta \, e^{i \theta} R^2 e^{i 2 \theta} \left ( R e^{i \theta}-1 \right )^{-1/3} \left ( R e^{i \theta}+1 \right )^{-2/3} + e^{-i \pi/3} \int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} \\ + e^{i \pi/3} \int_1^{-1} dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3}$$
Note that we defined the limits of the first integral so that no branch cut on the negative real axis is traversed. There is no branch cut for $x \gt 1$. Thus, to deal with the first integral, we may expand the roots for large $R$:
$$\left ( R e^{i \theta}-1 \right )^{-1/3} = R^{-1/3} e^{-i \theta/3} \left (1 - \frac1{R e^{i \theta}} \right )^{-1/3} = R^{-1/3} e^{-i \theta/3} \left [1+\frac1{3 R e^{i \theta}} + \frac{2}{9 R^2 e^{i 2 \theta}} + O \left ( \frac1{R^3} \right ) \right ]$$
$$\left ( R e^{i \theta}+1 \right )^{-2/3} = R^{-2/3} e^{-i 2 \theta/3} \left (1 + \frac1{R e^{i \theta}} \right )^{-1/3} = R^{-2/3} e^{-i 2 \theta/3} \left [1-\frac{2}{3 R e^{i \theta}} + \frac{5}{9 R^2 e^{i 2 \theta}} + O \left ( \frac1{R^3} \right ) \right ]$$
We may extract the dominant piece of each binomial term as above because we have not crossed a branch cut.  Thus, the integrand is
$$i R^2 e^{i 2 \theta} -  i\frac{1}{3} R e^{i \theta} + i \frac{5}{9} + O \left ( \frac1{R} \right )$$
It is important to see that all terms in the expansion vanish upon integration over $\theta \in (-\pi,\pi)$, except the constant term.  This is the so-called residue at infinity.  
By Cauchy's theorem, the contour integral is zero.  Thus
$$i 2 \pi \frac{5}{9} -i 2 \sin{\frac{\pi}{3}} \int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} = 0$$
or
$$\int_{-1}^1 dx \, x^2 (1-x)^{-1/3} (1+x)^{-2/3} = \frac{10 \pi}{9 \sqrt{3}} $$
A: Defining the integrand analytically on $\mathbb{C}\setminus[-1,1]$ allows us to compute two integrals which are equal by Cauchy's Integral Theorem; one close to $[-1,1]$ in $(5)$, and the other around a large circle in $(6)$.
For $z\in\mathbb{C}\setminus[-1,1]$, we can define
$$
\log\left(\frac{1+z}{1-z}\right)=\frac\pi2i+\int_i^z\left(\frac1{w+1}-\frac1{w-1}\right)\,\mathrm{d}w\tag{1}
$$
where the contour of integration avoids the real interval $[-1,1]$. This is well-defined since the difference of any two such contours circles both singularities equally and so their residues cancel.
Along the {top,bottom} of $[-1,1]$, $\log\left(\frac{1+z}{1-z}\right)=\log\left(\frac{1+x}{1-x}\right)+\{0,2\pi i\}$
We can then set
$$
\frac{z^2}{\sqrt[3]{(1-z)(1+z)^2}}=\frac{z^2}{1+z}\exp\left(\frac13\log\left(\frac{1+z}{1-z}\right)\right)\tag{2}
$$
Along the {top,bottom} of $[-1,1]$,
$$
\frac{z^2}{\sqrt[3]{(1-z)(1+z)^2}}=\frac{x^2}{\sqrt[3]{(1-x)(1+x)^2}}\left\{1,e^{2\pi i/3}\right\}\tag{3}
$$
As $|z|\to\infty$,
$$
\begin{align}
\frac{z^2}{\sqrt[3]{(1-z)(1+z)^2}}
&=\frac{z}{\sqrt[3]{\left(1-\frac1z\right)\left(1+\frac1z\right)^2}}e^{\pi i/3}\\
&=e^{\pi i/3}\left(z-\frac13+\frac5{9z}-\frac{23}{81z^2}+\dots\right)\tag{4}
\end{align}
$$
Thus, the residue around $[-1,1]$ is $e^{\pi i/3}\frac59$.
Using $(3)$, the integral counterclockwise around $[-1,1]$ is
$$
\oint\frac{z^2}{\sqrt[3]{(1-z)(1+z)^2}}\,\mathrm{d}z
=\left(e^{2\pi i/3}-1\right)\int_{-1}^1\frac{x^2}{\sqrt[3]{(1-x)(1+x)^2}}\,\mathrm{d}x\tag{5}
$$
The integral along the circles around the singularities vanishes since the integrand has order $-\frac13$ and $-\frac23$ near the singularities.
Using $(4)$, the integral around a large counterclockwise circle is
$$
\oint\frac{z^2}{\sqrt[3]{(1-z)(1+z)^2}}\,\mathrm{d}z
=2\pi i\,e^{\pi i/3}\frac59\tag{6}
$$
Comparing $(5)$ and $(6)$ yields
$$
\begin{align}
\int_{-1}^1\frac{x^2}{\sqrt[3]{(1-x)(1+x)^2}}\,\mathrm{d}x
&=\frac{2\pi i\,e^{\pi i/3}\frac59}{e^{2\pi i/3}-1}\\
&=\frac{5\pi}{9\sin\left(\frac\pi3\right)}\\
&=\frac{10\sqrt3}{27}\pi\tag{7}
\end{align}
$$
