I am trying to compute the result of the following integral
$$I = \oint_\Gamma \frac{\sqrt{(b-z)(c-z)}}{z + a} d z$$
Where $0 < a$ and $0 < b < c$ are real numbers, and $\Gamma$ is a simple closed curve that encloses the real interval $[b,c]$ leaving $a$ outside (as in the figure).
I think that the result of this integral should be real, but instead I'm getting an imaginary answer. I've included my calculations, so if someone could help me find where I went wrong or offer a different method for finding the result with some explanation, I would really appreciate it.
Let $g(z) := (b - z)^{\frac{1}{2}} (c - z)^{\frac{1}{2}}$, $h(z) = g(z)/(z+a)$ so that $I = \oint_\Gamma h(z) dz$.
Step 1: Fix branches
Define
- $(b - z)^{\frac{1}{2}} = |b - z|^{1/2} e^{\frac{i}{2} \arg(b - z) } \;$ with $\;\arg(b - z) \in [0, 2 \pi)$
- $(c - z)^{\frac{1}{2}} = |c - z|^{1/2} e^{\frac{i}{2} \arg(c - z) } \;$ with $\;\arg(c - z) \in [0, 2 \pi)$
This fixes the branches in $(b - z)^{\frac{1}{2}}$ and $(c - z)^{\frac{1}{2}}$ so that the branch cut of $h(z)$ is the interval $[b,c]$ and $\Gamma$ goes around this branch.
Step 2: Deform $\Gamma$
The function $h(z) = g(z)/(z+a)$ is analytic outside the branch cut $[b,c]$ and the pole in $ z = -a$. We can therefore arbitrarily deform the integral so that
$$I = \oint_{C_1} \frac{g(z)}{z+a} d z - \oint_{C_2} \frac{g(z)}{z+a} d z$$
Where $C_1$ is a large circle enclosing both the pole and the branch cut, and $C_2$ is a small circle containing only the pole $z = -a$.
Step 3: Integral in $C_1$
Finally, we compute the integral over $C_1$ and $C_2$ using the Residue Theorem.
Since $g(z)/(z+a)$ is analytic outside the big circle $C_1$ we can compute that integral using the residue at infinity.
$$\oint_{C_1} \frac{g(z)}{z+a} d z = 2 \pi i \; \text{Res}_{z=0} \; \frac{1}{z^2} h\Big(\frac{1}{z}\Big)$$
Note that $$\frac{1}{z^2} h\Big(\frac{1}{z}\Big) = \frac{1}{z^2} f(z)$$
where
$$f(z) = \frac{\frac{(z b - 1)^{\frac{1}{2}}(z c - 1)^{\frac{1}{2}}}{z}}{\frac{z a + 1}{z}} = \frac{1}{z^2} \frac{(b z - 1)^{\frac{1}{2}}(c z - 1)^{\frac{1}{2}}}{(1 + z a)}$$.
Since $f$ is analytic at $z = 0$ then (eq. 9.4.19 of this)
$$ 2 \pi i \; \text{Res}_{z=0} \frac{f(z)}{z^2} = 2 \pi i f'(0)$$
Some computations show that
$$f'(z) = \frac{c}{2 \sqrt{c z - 1}} \frac{\sqrt{z b - 1}}{1 + z a} + \frac{b}{2 \sqrt{b z - 1}} \frac{\sqrt{z c - 1}}{1 + z a} - \frac{\sqrt{z b - 1}\sqrt{z x - 1}}{(z a + 1)^2} a$$
By the previous choices of the branches we have in $\lim_{z \to 0 } \sqrt{z b - 1} = \lim_{z \to 0 } \sqrt{z c - 1} = i$
Therefore
$$\oint_{C_1} \frac{g(z)}{z+a} d z = \pi (b + c + 2 a) i$$
Step 4: Integral in $C_2$
Since $g(z)$ is analytic at $z = -a$ we have
$$\oint_{C_1} \frac{g(z)}{z+a} d z = 2 \pi i g(-a) = 2 \pi i \sqrt{(b +a) (c + a)}$$
Step 5: Conclusion
We find therefore
$$I = 2 \pi i \sqrt{(b +a) (c + a)} + \pi (b + c + 2 a) i$$