Want to compute $$ I = \int_0^i \mathrm{d}z \frac{z}{\sqrt{z^2-1}}$$ on the complex plane using complex methods.
QUESTION: is the result $i \left( \sqrt{2}-1 \right)$ which one gets imposing $\arg\in[0,2\pi)$ the only possible one?
Perhaps, I can post here a GENERALIZATION of my previous question: Prove that one can define a branch of the function $\sqrt{1-z^2}$ in every region $D\subset \mathbb{C}$ such that the points $-1$ and 1 belong to the same connected component of the complement of $D.$ How many values can the integral $$\int_\gamma \frac{\mathrm{d}z}{\sqrt{1-z^2}}$$ take along a closed path $\gamma$ contained in $D$ ?
The integrand has a primitive $\sqrt{z^2-1}$. That said, you need to be careful with the being on a consistent branch of the square root throughout the integration interval. Other than that, it doesn't matter what the contour is.
Assume we are on a branch of the square root such that $\sqrt{-1}=i$. Then the integral is
$$ \sqrt{-2}-\sqrt{-1} = (\sqrt{2}-1) i$$
EDIT
What if we do cross a branch cut? Assume we do at $z=i a$ where $0<a<1$. Then if the second branch is $\sqrt{-1}=-i$, then the integral has value
$$\left (\sqrt{2}-\sqrt{1+a^2}\right) (-i) + \left ( \sqrt{1+a^2}-1\right) i$$