Why is $f$ constant in this case? Reference: Conway - Functions of one complex variable p.55 Exercise 17.
Let $\epsilon>0$.
Let $f:B(0,\epsilon)\rightarrow \mathbb{C}$ be an analytic function such that $|f(z)|=|f(w)|$ for each $z,w\in B(0,\epsilon)$.
In this case, how do I prove that $f$ is constant?
I'm completely lost where to start..
 A: Here's another proof, based on the fact that if $f,\overline f$ are analytic in $B = B(0,\epsilon),$ then $f$ is constant (which follows easily from Cauchy- Riemann). We have $|f| = c$ in $B$ for some constant $c.$ If $c=0, $ we're done. If $c>0,$ then $f$ is never $0$ in $B.$ Because $|f|^2 = f\overline f = c^2,$ we get
$$f=c^2/\overline f = \overline {c^2/f}$$
in $B.$ Thus $\overline {c^2/f}$ is holomorphic in $B.$ But obviously $c^2/f$ is also holomorphic in $B.$ By the above, $c^2/f$ is constant, hence so is $f.$

First answer: We have $|f| = c$ in $B(0,\epsilon),$ where $c$ is a constant. If $c=0, $ we're done. So assume $c>0.$ Let $f = u+iv.$ Then we have $u^2+v^2 = c^2.$ Take partial derivatives and use the CR equations:
$$2uu_x+2vv_x =0 \implies (u,v)\cdot (v_y,v_x) = 0, 2uu_y+2vv_y =0\implies (u,v)\cdot (-v_x,v_y) = 0.$$
If $\nabla v \ne 0$ somewhere, then the nonzero orthogonal vectors$(v_y,v_x),(-v_x,v_y)$ are both orthogonal to the nonzero vector $(u,v)$ at that point, contradiction. Therefore $\nabla v \equiv 0,$ hence $v$ is constant. It follows that $u$ is constant as well, giving the result.
A: The hypothesis
$\vert f(z) \vert = \vert f(w) \vert \tag{1}$
for all $z, w \in B(0, \epsilon)$ indicates that $\vert f(z) \vert$ is constant on $B(0, \epsilon)$.  Thus if
$\vert f(0) \vert = 0, \tag{2}$
then
$\vert f(z) \vert = 0 \tag{3}$
for all $z \in B(0, \epsilon)$, whence
$f(z) = 0 \tag{4}$
on $B(0, \epsilon)$ as well; we thus see that $f(z)$ is constant on $B(0, \epsilon)$, $0$ being the most constant of all constants, as it were.  On the other hand, if
$\vert f(0) \vert \ne 0, \tag{5}$
then
$\vert f(z) \vert = \vert f(0) \vert \ne 0 \tag{6}$
on $B(0, \epsilon)$, so
$f(z) \ne 0 \tag{7}$
on $B(0, \epsilon)$ as well; thus $(f(z))^{-1} = 1 / f(z)$ is well -defined, and both it and $f'(z)$ are holomorpic on $B(0, \epsilon)$, as is $f'(z) / f(z)$; it then follows that the function
$\int_0^z \dfrac{f'(w)}{f(w)}dw \tag{8}$
is holomorphic in $B(0, \epsilon)$, as is
$g(z) = \exp(\int_0^z \dfrac{f'(w)}{f(w)} dw). \tag{9}$
We note that
$g(0) = \exp(\int_0^0 \dfrac{f'(w)}{f(w)} dw) = \exp(0) = 1, \tag{10}$
and that
$g(z) \ne 0 \tag{11}$
for $z \in B(0, \epsilon)$, since $g(z)$ is the exponential of a holomorphic function.  We compute $g'(z)$:
$g'(z) = \dfrac{f'(z)}{f(z)} \exp(\int_0^z \dfrac{f'(w)}{f(w)} dw)$
$= \dfrac{f'(z)}{f(z)}g(z), \tag{12}$
and thus observe that (12) yields
$g'(z)f(z) = f'(z)g(z), \tag{13}$
or
$f'(z)g(z) - f(z)g'(z) = 0. \tag{14}$
By (11), we can form the function $f(z) / g(z)$; it too is holomorphic in $B(0, \epsilon)$, and
$(\dfrac{f(z)}{g(z)})'$
$= \dfrac{f'(z)g(z) - f(z)g'(z)}{(g(z))^2} = 0, \tag{15}$
by (14); thus $f(z) / g(z)$ is some constant $c \in \Bbb C$, so we may write
$f(z) = cg(z); \tag{16}$
using (10), we see that
$f(0) = cg(0) = c,\tag{17}$
so that
$f(z) = f(0)g(z). \tag{18}$
We now write the function (8) in terms of its real and imaginary parts as
$\int_0^z \dfrac{f'(w)}{f(w)}dw = u(z) + iv(z), \tag{19}$
where $u(z)$ and $v(z)$ are real valued functions of $z \in B(0, \epsilon)$; we then see that
$g(z) = \exp(\int_0^z \dfrac{f'(w)}{f(w)} dw)$
$= \exp(u(z) + iv(z)) = e^{u(z) + iv(z)} = e^{u(z)} e^{iv(z)}, \tag{20}$
whence
$f(z) = f(0) e^{u(z)} e^{iv(z)}; \tag{21}$
taking moduli:
$\vert f(z) \vert = \vert f(0) \vert \vert \vert e^{u(z)} \vert e^{iv(z)} \vert$
$= \vert f(0) \vert \vert e^{u(z)} \vert, \tag{22}$
since $\vert e^{iv(z)} \vert = 1$; thus by (6),
$e^{u(z)} = \vert e^{u(z)} \vert = 1, \tag{23}$
yielding
$u(z) = 0; \tag{24}$
now by Cauchy-Riemann,
$v_x = -u_y = 0, \tag{25}$
$v_y = u_x = 0; \tag{26}$
we see that $\nabla v = 0$, implying $v(z)$ is constant as well.  Setting $z = 0$ in (21) and using (24) we have
$f(0) = f(0)e^0e^{iv(0)}, \tag{27}$
or
$e^{iv(0)} = 1; \tag{28}$
these considerations lead us to conclude that
$v(z) = v(0) = 2 k \pi \tag{29}$
for $z \in B(0, \epsilon)$ and some fixed $k \in \Bbb Z$. Again using (21) we have
$f(z) = f(0) e^0 e^{2k\pi i} = f(0) \tag{30}$
for all $z \in B(0, \epsilon)$; we see that $f(z)$ is indeed constant.  QED.
A: Suppose that $f$ is not constant.  Then $f'$ is not identically zero.  Suppose, for instance (and without loss of generality), that $f'(0)\neq 0$ and $f(0)=1$.  Now use the definition of the derivative to estimate $f(z)$ when $z$ is very close to $0$.  Can you show there must be some $z$ such that $|f(z)|\neq 1$?
A: if $|f(z)|$ is a nonzero constant $k$ then $f(z)\overline{f(z)} = k^2$, and so $\overline f = k^2/f$ is also a holomorphic function. Then $g_1(z) = \Re(f(z)) = \frac 12(f(z) + \overline {f(z)})$ is also holomorphic (and only takes real values). $g_2(z) = \Re(f(iz))$ is also holomorphic and also takes real values. Thus $g_1'$ and $g_2'$ have to be real. But $g_2'(z) = ig_1'(iz) \in i\Bbb R$, so we must have $g_2' = 0$. Hence $\Re(f(z))$ is constant, so $f$ can take atm ost two different values, and because it is continuous, $f$ is also constant.
