$f,g$ holomorphic functions and $|\,f(z)|^2+|\,f(z)|=|g(z)|^2+|g(z)|$ If $f$, $g$ are holomorphic in a certain region of the complex plane and $$|\,f(z)|^2+|\,f(z)|=|g(z)|^2+|g(z)|$$ 
find the simplest possible relation between $f$ and $g$. 
I tried to differentiate both sides, but i did not get any result.
 A: Observe that
$$
\lvert f(z)\rvert^2+\lvert f(z)\rvert=\lvert g(z)\rvert^2+\lvert g(z)\rvert
$$
implies that
$$
\Big(\lvert f(z)\rvert+\frac{1}{2}\Big)^2=\lvert f(z)\rvert^2+\lvert f(z)\rvert+\frac{1}{4}=\lvert g(z)\rvert^2+\lvert g(z)\rvert+\frac{1}{4}=\Big(\lvert g(z)\rvert+\frac{1}{2}\Big)^2.
$$
Hence
$$
\lvert f(z)\rvert+\frac{1}{2}=\lvert g(z)\rvert+\frac{1}{2}
$$
and thus
$
\lvert f(z)\rvert=\lvert g(z)\rvert.
$
Claim. $\,g(z)=af(z)$, for some constant $\lvert a\rvert=1$.
Let $U$ be the domain of $f$ and $g$ which is a region in $\mathbb C$.
Case A. If $\,f\equiv 0$, then clearly, $g\equiv 0$, and the Claim holds.
Case B. If $\,f\not\equiv 0$, then $Z_f=\{z\in U:\,f(z)=0 \}$ does not have a limit point in $U$ and $U\smallsetminus Z_f$ is also a region in $\mathbb C$. In particular, for every $z\in U\smallsetminus Z_f$
$$
\lvert\, f(z)\rvert=\lvert g(z)\rvert,
$$
and setting $h=g/f$, which is holomorphic in $U\smallsetminus Z_f$, we have that
$$
\lvert\, h(z)\rvert=1, \,\,\,\text{for every $z\in U\smallsetminus Z_f$.}
$$
Hence $h$ is constant (maximum principle) and thus $h(z)=a$, for some $\lvert a\rvert=1$. Consequently
$$
g(z)=a\,f(z), \,\,\,\text{for every $z\in U\smallsetminus Z_f$,}
$$
and this clearly holds in $Z_f$, since both $f$ and $g$ vanish there.
