contour integral branch cut I need some help to solve the following integral by contour integration.
$$\int_{0}^{1} x^a (1-x)^{1-a}\,\mathrm{d}x$$
I attached my ideas and a picture of the paths to fix the labels.
Kind regards, Jonas


Use contour integration to show that:
$\int_0^1 x^a (1-x)^{1-a}\,\mathrm{d}x = \dfrac{a\pi(1-a)}{2\sin(a\pi)}$ for $-1<a<2$
  First we make a transition to a complex valued function $f: \mathbb{C} \rightarrow \mathbb{C}$, $z \longmapsto f(z)$.
Recognize that the integrand is a multi-valued function since $a \not\in \mathbb{Z}$.
  It has branch points at $z=0$ because of $z^a$  and at $z=1$ because of $(1-z)^{1-a}$.
  We exclude the straight line between the two branch points ($\mathbb{C} \setminus [0,1]$) to make the function single valued.
  To prove that it is single-valued now, we take a closer look at the phase when we circle around both of the branch points.
$$\begin{align*}
z&=\rho e^{i\theta}\\[1ex]
z^a&=\rho^a e^{ia\theta}
\end{align*}$$
  $$\begin{align*}
z&=\epsilon e^{i\phi}+1\\[1ex]
(1-z)^{1-a}&=\epsilon^{1-a}e^{i(1-a)\phi}
\end{align*}$$
$\Rightarrow f(z) = \rho^a e^{ia\theta} \epsilon^{1-a} e^{i(1-a)\phi}
\propto e^{i(a(\theta - \phi) + \phi)}$
$$\begin{array}{c|c|c|c}
\text{points} & \theta & \phi & e^{i(a(\theta - \phi) + \phi)}\\
\hline
A&0&0&0\\
B&0&\pi&-a\pi + \pi \\
C& 0&\pi&-a\pi + \pi \\
D& \pi &\pi& \pi \\
E& 2\pi &   \pi  &    a\pi  + \pi \\
F &     2\pi  &   \pi   &   a\pi + \pi\\
A'  &   2\pi  &   2\pi &  2\pi\\
\end{array}$$
Since the phase changes from $0$ to $2\pi$ as we go from $A$ to $A'$, we conclude that the branch cut makes the function single valued.
$$\Gamma = \Gamma_R \cup \Gamma_2 \cup \Gamma_1 \cup \Gamma_3 \cup \Gamma_0$$
  
  
*
  
*For $\Gamma_0$ and $\Gamma_R$ we use the following parameterization.
  $$z = r e^{i\alpha}\quad\text{and}\quad\mathrm{d}z = r i e^{i\alpha} \mathrm{d}\alpha$$
  $$\int f(z)\,\mathrm{d}z=\int r^a e^{ia\alpha} \; (1-r e^{i\alpha}) ^{1-a} \; r i \: e^{i\alpha} \mathrm{d}\alpha$$highest order is $r$: $r^ar^{1-a}r=r^2$.
  
  
  
    
*
    
*For $\Gamma_0$ we need the $\lim_{r \to 0}$:
    
    
    $$\int_{\Gamma_0} f(z) \,\mathrm{d}z = 0$$
    
    
*
    
*For $\Gamma_R$ we need the limit $\lim_{r \to \infty}$:
    
    
    $$\int_{\Gamma_R} f(z) \,\mathrm{d}z = \infty$$

  
  
*
  
*For $\Gamma_1$ we use this parameterization.
  $$z = \epsilon e^{i\phi} +1\quad\text{and}\quad\mathrm{d}z = \epsilon i \: e^{i\phi} \mathrm{d}\phi$$
  $$\int f(z)\,\mathrm{d}z=\int (\epsilon e^{i\phi}+1)^a(\epsilon e^{i\phi})^{1-a}\epsilon ie^{i\phi}\,\mathrm{d}\phi$$highest orders $\epsilon^a \epsilon^{1-a}\epsilon$
  
  
  
    
*
    
*For $\Gamma_1$ we use the $\lim_{\epsilon \to 0}$:
    
    
    $$\int_{\Gamma_1} f(z) \,\mathrm{d}z = 0$$
    $$\int_\Gamma  f(z) \mathrm{d}z = \text{Res}(f(z),\infty) = -\text{Res}\left(f\left(\frac{1}{z}\right)\frac{1}{z^2},0\right)$$
    $$\int_{\Gamma_0} f(z) \,\mathrm{d}z = 0$$
    $$\int_{\Gamma_1}f(z)\,\mathrm{d}z=0$$
    $$\lim_{R\to\infty}\int_{\Gamma_R}f(z)\,\mathrm{d}z=\infty$$


Questions:

  
*
  
*Are the 4 equations in the Summary correct?
  
*Is this a good way to calculate the integral?
  
*How do I find the phase relation between $\Gamma_2$ and $\Gamma_3$?
  
*How do I evaluate the residual at $\infty$ ($\int_\Gamma$)
  

 A: The integral $I$ around the dog bone contour is given by
$$\begin{align}
I(a)&=\int_0^1 x^a\,(1-x)^{1-a}\,dx+\int_1^0 x^a\,e^{i2\pi a}\,(1-x)^{1-a}\,dx\\\\
&=\left(1-e^{i2\pi a}\right)\int_0^1 x^{a}\,(1-x)^{1-a}\,dx\tag 1
\end{align}$$
The integral around the dog bone contour is also equal to $2\pi i$ times the residue at infinity. The residue at infinity is
$$-\lim_{z\to 0}\frac{1}{2!}\frac{d^2}{dz^2}\left(z^3\frac{(z-1)^{1-a}}{z^3}\right)=\frac12 a(a-1)e^{i\pi a}\tag 2$$
Setting $(1)$ equal to $2\pi i$ time $(2)$ reveals 
$$\int_0^1 x^{a}\,(1-x)^{1-a}\,dx=\frac{\pi a(1-a)}{2\sin(\pi a)}$$
as expected!

Another approach relies only on established properties of the Beta and Gamma functions.  The Beta function is defined as
$$B(a,b)=\int_0^1 x^{a-1}(1-x)^{b-1}\,dx$$
Therefore, the integral of interest can be expressed in terms of the Beta function as
$$\int_0^1 x^{a}\,(1-x)^{1-a}\,dx=B(a+1,2-a)$$
Now, we use the Relationship Between the Beta and Gamma Functions, $B(x,y)=\frac{\Gamma (x)\Gamma(y)}{\Gamma(x+y)}$, to write
$$\begin{align}
\int_0^1 x^{a}\,(1-x)^{1-a}\,dx&=\frac{\Gamma(a+1)\Gamma(2-a)}{\Gamma(3)}\\\\
&=\frac12 \Gamma(a+1)\Gamma(2-a)
\end{align}$$
Now, we use the functional relationship $\Gamma(z+1)=z\Gamma(z)$ along with Euler's Reflection Formula $\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin(\pi z)}$ to obtain
$$\begin{align}
\int_0^1 x^{a}\,(1-x)^{1-a}\,dx&=\frac12 a\Gamma(a)(1-a)\Gamma(1-a)\\\\
&=\frac{\pi a(1-a)}{2\sin(\pi z)}
\end{align}$$
and we are done!
