How to find roots of $f(z)=(a+yg(z))^2+g(z)^2=0$? I want to find the roots of 
$$f(z)=\left[a+zg(z)\right]^2+g(z)^2=0$$
Where $a$ is real number and:
$$
g(z)=\frac{1}{2\sqrt{z^2+1}}\ln\left(\frac{z+\sqrt{z^2+1}}{z-\sqrt{z^2+1}}\right)
$$ 
It said that $f(z)=0$ has double complex roots when $a\in(-\pi/2,\pi/2)$, no complex root when $a>\pi/2$ and four complex roots when $a<-\pi/2$.
It also said that the complex roots are pure imaginary, and come in conjugate pairs. The paper is published in a well known journal, here is the link, see page 3.
What I tried is that expand f(z) around $z=0$, I get:
$$
f(z)=(a^2-\frac{\pi^2}{4}) +i\pi(a+1)z +(1+2a)z^2+O(z^3)
$$
The constant term is $a^2-\pi^2/4$, does this constant term give the above claim? I don't know. 
My question is: 1). how to determine the number of complex roots for different value of $a$? 2).If possible, can you express the roots as a function of $a$? 3).If it is very hard to express analytically, could you give a hint how can I find all of them numerically?
 A: It is not hard, albeit numerically, to show all the features stated in this question. Because the roots come in pairs of pure imaginary numbers, I guess it is doable to show the features analytically as well.
The very first step is to derive
$$
a=\frac{\pm\mathrm{i}-z}{2\sqrt{z^2+1}}\ln\left(\frac{z+\sqrt{z^2+1}}{z-\sqrt{z^2+1}}\right).
$$
Then, here goes the plots (bird's eye-view & side view) of the real part of RHS (when the imaginary part is sufficiently small) for both $+\mathrm{i}$ and $-\mathrm{i}$. They are symmetric w.r.t. $x$-axis and $+\mathrm{i}$ and $-\mathrm{i}$ plots are reflections w.r.t. $y$-axis as to each other. The first two plots illustrate the imaginariness. A combination of the last two explains the root number properties. $+\mathrm{i}$ and $-\mathrm{i}$ cases together yield the even number of roots. And we observe one peak, one shallow trench and one deeper trench.
The peak: $0<a<\pi/2$ roots
The shallow trench: $-\pi/2<a<0$ roots
The shallow trench and the deeper trench: $a<-\pi/2$ roots
Note that the transition from 2 roots to 4 roots consists in the evident stepwise behavior from the peak to the deeper trench.


Please feel free to edit and elaborate!
A: This is not intend to be a canonical answer, but rather a guide of discusion
Let $q=\sinh z$, we can get:
$$
\frac{1}{2}(\frac{a}{q+\frac{\pi}{2}i}+\frac{q+\frac{\pi}{2}i}{a}) + \tanh q=0
$$
Let's imagine $q$ is purely imaginary, let $q=i(t-\pi/2), t\in \mathcal{R}$, $z=\sinh q=i\sin(t-\pi/2)=-i\cos t$.
Then we get the following equation for $t$:
$$
\frac{1}{2}(\frac{t}{a}-\frac{a}{t})=\cot t
$$
Note in this equation, if $t_0$ is an solution, then $-t_0$ is also a solution, but this won't give us a distinct value of $z$.
Using mathematica, we plot out the left and right side of the above equation, we can see there are many intersections, for almost every real value of $a\neq0$.

A: Continuing from here:
$$
\frac{1}{2}(\frac{a}{q+\frac{\pi}{2}i}+\frac{q+\frac{\pi}{2}i}{a}) + \tanh q=0
$$
The power series representation of arctanh is
$$
arctanh(q)=x+\frac{x^3}{3}+\frac{x^5}{5}+\dots
$$
Using that approximation, we can solve with either the Cardano method to solve quartic equation, or with numerical methods (e.g. Newton-Raphson):
$$
\frac{-1}{2}(\frac{a}{q+\frac{\pi}{2}i}+\frac{q+\frac{\pi}{2}i}{a}) = \tanh q
$$
$$
arctanh(\frac{-1}{2}(\frac{a}{q+\frac{\pi}{2}i}+\frac{q+\frac{\pi}{2}i}{a})) = q
$$
