TITLE: If the absolute value of an analytic function $f$ is a constant, must $f$ be a constant?
QUESTION [9 upvotes]: I've been thinking how to prove that an analytic function $f$ is a constant if the absolute value of $f$ is a constant, but I haven't figured it out yet.
What I was thinking is to use Cauchy-Riemann equations, but it didn't work well...
If this is not true, I would like to know the counterexample...
Here is what I tried:
$$|f|=|u+iv|=\sqrt {u^2+v^2}$$
Thus $u^2+v^2$ is a constant.
(1)    $\displaystyle u\frac {\delta u}{\delta x}+v\frac {\delta v}{\delta x}=0 $
(2)    $\displaystyle u\frac {\delta u}{\delta y}+v\frac {\delta v}{\delta y}=0 $
Plug Cauchy Riemann into (2).
$$\displaystyle -u\frac {\delta v}{\delta x}+v\frac {\delta u}{\delta x}=0 $$
and I'm stuck here...

REPLY [3 votes]: You can also deduce this from the open mapping theorem: a nonconstant holomorphic function is an open map. If $|f|$ is constant, then $f(\mathbf C)$ is contained in the circle of radius $|f|$, which has empty interior. Hence $f$ is constant.