I am having problems understanding branch cuts. For instance, I am given the following function, for $z \in \mathbb{C},$ let
$$F(z)=\sqrt{\frac{(z^2-1)(z-2)}{z}}=\sqrt{\frac{(z+1)(z-1)(z-2)}{z}}.$$
Determine if there is a continuous branch $f$ of $F,$ with $\Re{(f(i))}>0$, that is defined on $\mathbb{C} \setminus \{ [-1,0] \cup [1,2] \}.$
I have seen examples where the function is written using the principal value of the square root function, and then the signs of the principal values are determined to fit the case at hand, but it seemed arbitrary.
I have no idea how to proceed. How does the process of finding a continuous branch works?
Consider $g(z) = (z+1)(z-1)(z-2)/z$. Then
$$ \frac{g'(z)}{g(z)} = \frac{1}{z+1} - \frac{1}{z} + \frac{1}{z-1} + \frac{1}{z-2}. $$
Moreover, if $\gamma$ is any closed curve in $\Omega = \mathbb{C} \setminus ([-1, 0] \cup [1, 2])$, then it must wind $-1$ and $0$ the same time and $1$ and $2$ the same time. So if $W(\gamma, z_0)$ denotes the winding number of $\gamma$ at $z_0$, then
$$ \int_{\gamma} g(z) \, \mathrm{d}z = 2\pi i \left[ W(\gamma, -1) - W(\gamma, 0) + W(\gamma,1) + W(\gamma,2) \right]. $$
By the previous comment, $W(\gamma,-1) = W(\gamma, 0)$ and $W(\gamma, 1) = W(\gamma, 2)$, and so, the above number is an even multiple of $2\pi i$. So $\frac{1}{2} \int_{\gamma} g(z) \, \mathrm{d}z$ is still an integer multiple of $2\pi i$. This allows us to define $F(z)$ as
$$ F(z) = a \exp\left\{ \frac{1}{2} \int_{i}^{z} \frac{g'(w)}{g(w)} \, \mathrm{d}w \right\}, $$
where $a^2 = f(i)$ is chosen to satisfy $\operatorname{Re}(a) > 0$ and the integral is taken over any path in $\Omega$ joining from $i$ to $z$. This is well-defind since the difference of any two such integrals is an integer multiple of $2\pi i$, which is cancelled out by the exponential function. Moreover, it is easy to check that $F(z)^2 = g(z)$. So $F$ is the square root of $g$ on $\Omega$ satisfying the prescribed condition.
More generally, assume that $r(z)$ is a rational function. Then its logarithmic derivative takes the form
$$ \frac{r'(z)}{r(z)} = \sum_k \frac{n_k}{z - z_k}, $$
for some non-zero integer $n_k$'s and $z_k \in \mathbb{C}$. Indeed, if $n_k \geq 1$, then $z_k$ is a zero of order $n_k$. If $n_k \leq -1$, then $z_k$ is a pole of order $-n_k$.
Then, on each domain $\Omega \subseteq \mathbb{C}$, an $m$-th root of $r$ is well-defined if the following condition holds: For each bounded connected component $C$ of $\mathbb{C}\setminus\Omega$, the sum of $n_k$'s for which $z_k \in C$ is a multiple of $m$.
The reasoning is fairly the same as before: Given this condition, integral of $r'(z)/r(z)$ over any closed curve in $\Omega$ is a multiple of $2\pi i m$, and so, the logarithm can be defined in $\mathbb{C} / 2\pi i m \mathbb{Z}$. So if we divide this logarithm by $m$ and composing with $\exp$, such ambiguity disappears, yielding a well-defined function whose $m$-th power equals $r(z)$.
(I think this is an equivalent condition, but do not want to delve into technicality that I may encounter while attempting to prove the converse.)