A branch of $\sqrt{z^2-1}$ Consider the branch of $\sqrt{z^2-1}$ with the condition that $\sqrt{z^2-1} \sim z $ as $ \ z \to \infty$, the branch cut is $[-1,1]$
With the above branch, Now consider the function $$f(z)=\frac{1+i\sqrt{z^2-1} \sin(\frac{\alpha}{2})}{1+i z \tan(\frac{\alpha}{2})} \ \ \ \ \ \ \ 0 < \alpha < \pi$$
With the chosen branch  why $f(-i \cot(\frac{\alpha}{2})) =1$ and why $f(i \cot(\frac{\alpha}{2})) = \cos^2(\frac{\alpha}{2})$ ?
I think I do not correctly understand the branch, I really appreciate a detailed explanation. Thanks !
 A: With the branch cut $[-1,1]$, the domain $U = \mathbb{C}\setminus \{ z : \lvert z\rvert \leqslant 1\}$, the exterior of the unit disk, is contained in the domain of the branch of $h(z) = \sqrt{z^2-1}$ we choose. On the open unit disk, we have two branches of $\sqrt{1-w}$, let $g(w)$ denote the branch with $g(0) = 1$. Then we can write
$$h(z) = z\cdot g\biggl(\frac{1}{z^2}\biggr) = z\sqrt{1-\frac{1}{z^2}}$$
on $U$. For purely imaginary $z \in U$, we have $\frac{1}{z^2}$ real and negative, so it follows that $1-\frac{1}{z^2} > 0$, and thus $g\bigl(\frac{1}{z^2}\bigr) > 0$.
Hence for $z = it,\, t\in \mathbb{R}, \lvert t\rvert > 1$, we have
$$f(it) = \frac{1 + ih(it)\sin\bigl(\frac{\alpha}{2}\bigr)}{1 + i(it)\tan \bigl(\frac{\alpha}{2}\bigr)} = \frac{1 -tg\bigl(-\frac{1}{t^2}\bigr)\sin\bigl(\frac{\alpha}{2}\bigr)}{1 - t\tan\bigl(\frac{\alpha}{2}\bigr)} = \frac{1 - \sigma(t)\sqrt{t^2+1}\sin\bigl(\frac{\alpha}{2}\bigr)}{1 - t\tan\bigl(\frac{\alpha}{2}\bigr)},$$
where $\sigma(t)$ is the sign of $t$.
By the identity theorem, this holds for all $t\in \mathbb{R}\setminus \{0\}$. For $0 < \alpha < \pi$, we have $\operatorname{trig} \bigl(\frac{\alpha}{2}\bigr) > 0$, where $\operatorname{trig}$ stands for any of the trigonometric functions $\sin,\cos,\tan, \cot$. So inserting $t = -\cot\bigl(\frac{\alpha}{2}\bigr)$, after using
$$\sqrt{\cot^2\bigl(\tfrac{\alpha}{2}\bigr) + 1} = \sqrt{\frac{\cos^2\bigl(\frac{\alpha}{2}\bigr) + \sin^2\bigl(\frac{\alpha}{2}\bigr)}{\sin^2\bigl(\frac{\alpha}{2}\bigr)}} = \frac{1}{\sin\bigl(\frac{\alpha}{2}\bigr)},\tag{$\ast$}$$
we obtain
$$f\bigl(-i\cot\bigl(\frac{\alpha}{2}\bigr)\bigr) = \frac{1 - (-1)\frac{\sin (\alpha/2)}{\sin(\alpha/2)}}{1 - (-1)\cot\bigl(\frac{\alpha}{2}\bigr)\tan\bigl(\frac{\alpha}{2}\bigr)} = \frac{1+1}{1+1} = 1.$$
For $t = +\cot \bigl(\frac{\alpha}{2}\bigr)$, if we just plug that into the formula for $f$, we get the indeterminate form $\frac{1-1}{1-1}$, so we must determine the value in some other manner. In some places of the world l'Hôpital's rule is popular, in other places Taylor expansions are more often used. Here is one of the rare places where I prefer l'Hôpital's rule, which leads us to
$$\frac{-\frac{t}{\sqrt{t^2+1}}\sin\bigl(\frac{\alpha}{2}\bigr)}{-\tan\bigl(\frac{\alpha}{2}\bigr)}$$
into which $t = \cot \bigl(\frac{\alpha}{2}\bigr)$ shall be plugged. That yields - with $(\ast)$ -
$$\frac{\cot\bigl(\frac{\alpha}{2}\bigr)\sin^2\bigl(\frac{\alpha}{2}\bigr)}{\tan\bigl(\frac{\alpha}{2}\bigr)} = \cot^2\biggl(\frac{\alpha}{2}\biggr)\sin^2\biggl(\frac{\alpha}{2}\biggr) = \cos^2 \biggl(\frac{\alpha}{2}\biggr).$$
