using residue for integration Hi how do u calculate the integral which have square root ? for example for this integral (because of branches points I always baffle) :
$$\int_0^1 \frac{(1-x)^{1/4}\, x^{3/4}}{5-x}\, dx$$
 A: Consider $$f(z) = \frac{z^{3/4}(z-1)^{1/4}}{5-z} = \frac{|z|^{3/4}e^{3i/4 \arg(z)} |z-1|^{1/4} e^{i/4 \arg(z-1)} }{5-z}$$
where $ 0 \le \arg(z), \arg(z-1) < 2 \pi$.
By omitting the line segment $[0,1]$, $f(z)$ is well-defined on the complex plane and real-valued on the real axis for $x > 1$.
Then integrating clockwise around a dog-bone contour,
$$ \int_{0}^{1} \frac{x^{3/4} e^{3i/4 (0)} (1-x) e^{i/4(\pi)}}{5-x} \ dx + \int_{1}^{0} \frac{x^{3/4} e^{3i/4(2 \pi)}(1-x)^{1/4} e^{i/4(\pi)}}{5-x} \ dx$$ 
$$ = e^{i \pi /4}\int_{0}^{1} \frac{x^{3/4}(1-x)^{1/4}}{5-x} \ dx- e^{- i \pi /4}\int_{0}^{1} \frac{x^{3/4}(1-x)^{1/4}}{5-x} \ dx$$
$$ = \frac{2 i}{\sqrt{2}} \int_{0}^{1} \frac{x^{3/4}(1-x)^{1/4}}{5-x} \ dx$$
$$ = 2 \pi i \Big(\text{Res}[f(z),5] + \text{Res}[f(z),\infty] \Big)$$
where
$$ \begin{align} \text{Res}[f(z), 5] &= - \lim_{z \to 5} \Big( |z|^{3/4}e^{3i/4 \arg(z)} |z-1|^{1/4} e^{i/4 \arg(z-1)} \Big) \\ &= - 5^{3/4} \sqrt{2} \end{align}$$
and 
$$ \text{Res}[f(z), \infty] = \frac{19}{4}$$ 
since when we expand $f(z)$ in a Laurent series at $\infty$ we get
$$\begin{align} f(z) &= \frac{z^{3/4} z^{1/4} (1-\frac{1}{z})^{1/4}}{-z(1-\frac{5}{z})} \\ &= -\frac{(1-\frac{1}{z})^{1/4}}{1-\frac{5}{z}} \\ &= -\left(1- \frac{1}{4z} + \ldots \right)\left(1+\frac{5}{z} + \ldots\right) \\ &= - 1 - \frac{19}{4z} + \ldots \end{align}$$
Therefore,
$$ \frac{2i}{\sqrt{2}} \int_{0}^{1} \frac{x^{3/4}(1-x)^{1/4}}{5-x} \ dx = 2 \pi i \left(-5^{3/4} \sqrt{2} + \frac{19}{4} \right) $$
which implies
$$\begin{align} \int_{0}^{1} \frac{x^{3/4}(1-x)^{1/4}}{5-x} \ dx &= \pi \sqrt{2}\left(-5^{3/4} \sqrt{2} + \frac{19}{4} \right) \\ &\approx 0.0945976635 \end{align}$$
