Integral $\int_{|z|=R} \sqrt{(z-a)(z-b)}dz ,(a\neq b),R>max(|a|,|b|) ,z\in C$ $$\int_{|z|=R} \sqrt{(z-a)(z-b)}dz ,(a\neq b),R>max(|a|,|b|) ,z\in C$$
known :


*

*ans is $\dfrac{\pi i}{4}(a-b)^2$

*we can solve it by residue theorem

*the newest simplify:


$$\sqrt{(z-a)(z-b)}=e^{\frac{1}{2}Ln(z-a)}\cdot e^{\frac{1}{2}Ln(z-b)}$$
as for $e^{\frac{1}{2}Ln(z-a)}$
$$e^{\frac{1}{2}Ln(z-a)}=e^{\frac{1}{2}(ln|z-a|+i(arg(z-a)+2k\pi))}=|z-a|^{\frac{1}{2}}\cdot e^{\frac{i(arg(z-a)+2k\pi)}{2}}$$
$e^{\frac{1}{2}Ln(z-b)}$  is the same way,so original formula =
$$|z-a|^{\frac{1}{2}}|z-b|^{\frac{1}{2}}\cdot e^{\frac{i(arg(z-a)+2k_1\pi)}{i}}\cdot e^{\frac{i(arg(z-b)+2k_2\pi)}{i}}$$
then to make it easier,we might as well assume $k_1=k_2=0$
so my final is:
$$|z-a|^{\frac{1}{2}}|z-b|^{\frac{1}{2}}\cdot e^{\frac{i(arg(z-a))}{i}}\cdot e^{\frac{i(arg(z-b))}{i}}$$
Now the Question is evaluating :
$$\int_{|z|=R}\sqrt{z-a|^{\frac{1}{2}}|z-b|^{\frac{1}{2}}\cdot e^{\frac{i(arg(z-a))}{i}}\cdot e^{\frac{i(arg(z-b))}{i}}}dz$$
I don't know how to use residue theorem here...

The newest idea(Thanks to @JeanMarie 's answer)


*

*We evaluate $Res(f;\infty)$,which means the residue of $f$ in  $\infty$.
where $f(z):=\sqrt{(z-a)(z-b)}$.


$\quad$ 1.1 Transfer $f(z)=\sqrt{(z-a)(z-b)}$ to $z\sqrt{1-\dfrac{a+b}{z}+\dfrac{ab}{z^2}}$
$\quad$ 1.2 Use series expansion$\sqrt{1-Z}=1-\dfrac{Z}{2}-\dfrac{Z^2}{8}$
[PS_1:We could proof it by definition of expansion of $f$ in $0$:$f(z)=\sum_{n=0}^{\infty}\dfrac{f^{(n)}(0)}{n!}z$]
$\quad$ 1.3 get the  coefficient of $\dfrac{1}{z}=-\dfrac{(a+b)^2}{8}$


*Evaluate the Integral via $$\int_{|z|=R}f(z)dz=-2\pi i Res(f;\infty)$$ Get the ans!


[PS_2:I don't think it's necessary to use the theorem below:
$$Res(f;\infty)=-Res(\dfrac{1}{z^2}f(\dfrac{1}{z}),0)$$
because when $z\to \infty$,$$\dfrac{a+b}{z}-\dfrac{ab}{z^2}\to 0$$
which means we could use series expansion $\sqrt{1-Z}$ derectly to get the value of $Res(f;\infty)$
]
 A: Let $$f(z):=\sqrt{(z-a)(z-b)}=z\sqrt{1-\dfrac{a+b}{z}+\dfrac{ab}{z^2}}.$$
(the RHS expression assumes the principal determination of $\sqrt{z}$)
As $f$ has only two poles $a$ and $b$ included into circle $|z|=R$ we can enlarge the radius as we want, i.e., we can consider that it is arbitrarily large ;  we have to compute what is called a "residue at infinity", given by the following formula (https://en.wikipedia.org/wiki/Residue_at_infinity):
$$Res_{\infty}f(z)=-Res_0 \ (\tfrac{1}{z^2}f(\tfrac{1}{z}))$$
(notice the minus sign) One can write, :
$$\tfrac{1}{z^2}f(\tfrac{1}{z})=\tfrac{1}{z^3}\sqrt{1-(a+b)z+abz^2}.$$
Using series expansion 
$$\sqrt{1-Z}=1-\dfrac{Z}{2}-\dfrac{Z^2}{8}-\cdots$$
with $Z=(a+b)z-abz^2$, we have
$$\tfrac{1}{z^2}f(\tfrac{1}{z})=\tfrac{1}{z^3}\left(1-\dfrac12((a+b)z-abz^2)-\dfrac18((a+b)z-abz^2)^2+\cdots\right)+\cdots$$
Collecting terms in $1/z$ in this expansion gives (remember that the coefficient of $\tfrac{1}{z}$ is, by definition, the residue in $0$) gives 
$$\left(\dfrac{ab}{2}-\dfrac18(a+b)^2\right)\tfrac{1}{z}$$
Thus,
$$\int_{|z|=R}f(z)dz=-2i \pi Res_{\infty}f(z)=-2i\pi(-\dfrac18(a-b)^2)=i \pi \dfrac14(a-b)^2$$
