Find all functions $f\in O$ ( in some neighbourhood of $0$) such that $|f(z)|^2=1+|z|^2$ Find all functions $f\in O$ ( in some neighbourhood of $0$) such that $|f(z)|^2=1+|z|^2$.

I was thinking about maximum modulus principle, but $|f|$ does attain minimum in $0$, not maximum. Any ideas?
 A: Minimum Modulus Principle: Let $f$ be a non-constant analytic function on a bounded open set $G$ and is continuous on $\overline G.$ Then either $f$ has zero in  $G$ or $f$ assumes it's minimum value on $\overline G - G.$
In this case, $f$ has no zero in a nbd of origin and it assumes it's minimum value at origin. Hence, $f$ must be constant.
A: Let $D$ be a connected open neighbourhood of $0$ on which $|f(z)|^2 = 1 + |z|^2$. As $|f(z)|^2 \geq 1$, $f$ has no zeroes. As such, we can apply the minimum modulus principle:

Let $f$ be a nowhere zero holomorphic function on some connected open set $D \subseteq \mathbb{C}$. If $z_0 \in D$ is such that $|f(z_0)| \leq |f(z)|$ for all $z$ in a neighbourhood of $z_0$, then $f$ is constant.

This follows immediately from the maximum modulus principle applied to $\frac{1}{f}$ (hence the nowhere zero condition). Another way of stating it is that a nowhere zero holomorphic function on a bounded domain attains its minimum absolute value on the boundary of $D$.
As $|f(z)|^2 \geq 1 = |f(0)|^2$, $|f|$ attains its miniminum in $D$ at $0$, so $f$ must be constant which contradicts the assumption $|f(z)|^2 = 1 + |z|^2$. Therefore, there is no connected open neighbourhood $D$ of $0$ and $f \in \mathcal{O}(D)$ such that $|f(z)| = 1 + |z|^2$.
