square roots and limits I am dealing with a function $f(z)$ defined implicitly on the upper half plane $\{z:\Im z>0\}$ by the equation
$$2f^2 + zf + 1 =0.$$
This equation has 2 roots, and the solution $f$ should be the one with the following property: if $\Im z>0$, then $\Im f(z)>0$.
Afterwards, I would like to compute the limits of $f$ on the real axis, more precisely, the limits $f(x) := \lim_{y \downarrow 0} f(x+iy)$.
Here is what I find:

*

*$f(z) = \frac{-z+\sqrt{z^2-8}}{4}$, where $\sqrt{z}$ is chosen to have positive imaginary part if $\Im z>0$.

*If $|z|\le 2\sqrt{2}$, then the limit $f(x) = \frac{-x+i\sqrt{8-x^2}}{4}$.

*If $x = -3$, then the limit $f(x) = 1$.

Is that correct ? I believe the third property should be wrong because it leads to some nonsensical conclusion for me, so I suspected maybe it was one of those branch cut issues.
Thank you!
Edit: Here is the context of the problem. If you consider the adjacency matrix $A$ of the infinite $3$-regular tree, it is well-known that the spectrum $\sigma(A) = [-2\sqrt{2},2\sqrt{2}]$. On the other hand, using the resolvent identity, you can show that the Green's function $G(z) = \langle \delta_o, (A-zI)^{-1}\delta_o \rangle$ satisfies $G(z) = \frac{-1}{z+3f(z)}$ in the upper-half plane, where $f(z)$ is a function that satisfies $2f^2+zf+1=0$. If $-3$ was an isolated pole of $G(z)$, it would mean that $-3\in \sigma(A)$ and in fact an eigenvalue, which is wrong.
 A: Ok I finally got it; it is indeed a "branch cut issue". If we write all details things become clear. I will follow the book "Complex Analysis" of Moore and Hadlock, Ex. 10.7.4., page 341. I will also consider the slightly more general case where the equation is $qf^2+zf+1=0$.
Let $w_1 = \sqrt{r} e^{i\theta/2}$ and $w_2 = \sqrt{s} e^{i\phi/2}$, where $r = |z-2\sqrt{q}|$, $s=|z+2\sqrt{q}|$, $\theta = \arg(z-2\sqrt{q})$ and $\phi = \arg(z+2\sqrt{q})$. For $w_1$ we consider the branch cut $[2\sqrt{q},\infty)$, so the argument $\theta\in [0,2\pi)$. For $w_2$ we consider the branch cut $(-\infty,-2\sqrt{q}]$. This means the argument $\phi$ will now take values in $(-\pi,\pi]$. Here $w_1$ is analytic in $\mathbb{C}$ minus the first branch while $w_2$ is analytic in $\mathbb{C}$ minus the second branch. So the product $g = w_1w_2$ is analytic in the intersection, $D = \mathbb{C} \setminus ((-\infty,-2\sqrt{q}]\cup [2\sqrt{q},\infty))$. Clearly $g$ is a root of $z^2-4q$, i.e. $g^2 = rs e^{i(\phi+\theta)} = z^2-4q$. Moreover, if $z\in\mathbb{C}^+$, the upper half plane, then $\theta,\phi\in(0,\pi)$, so $g$ has positive imaginary part as required. Let us now compute the limit as $z = x+iy \downarrow x$.
If $x>2\sqrt{q}$, then as $z = x+iy \downarrow x$, we have $\theta \downarrow 0$ and $\phi\downarrow 0$. Hence, $g\to \sqrt{|x^2-4q|} = \sqrt{x^2-4q}$.
If $x<2\sqrt{q}$, then as $z = x+iy\downarrow x$, we have $\theta \uparrow \pi$, $\phi\uparrow \pi$. Hence, $g \to \sqrt{|x^2-4q|} e^{i\pi/2} e^{i\pi/2} = -\sqrt{x^2-4q}$.
If $|x|\le 2\sqrt{q}$, then as $z = x+iy\downarrow x$, we have $\theta \uparrow \pi$ but $\phi \downarrow 0$. Hence, $g\to \sqrt{|x^2-4q|}e^{i\pi/2} = i \sqrt{4q-x^2}$.
In particular, point (3) in my question is indeed incorrect as I suspected.
Many thanks for your useful comments. I also came accross this book from another question on this website; never really learned these things well unfortunately.
