Prove that if |f(z)| is constant then f(z) is also constant (f holomorphic) I tried proving that, with the given assumptions, $f'(0)$ is $0$, that way I could say that $f(z)$ is constant, since I have already proved that if the derivative is $0$ then the function is constant. I wrote the following
$$ \left|\frac{f(z_1) - f(z_2)}{z_1 - z_2}\right|  = \frac{|f(z_1) - f(z_2)|}{|z_1 - z_2|}$$
and tried to find somethings along the lines of $|f(z_1)| - |f(z_2)|$, which would be $0$, but none of the usual moduli inequalities is helping me.
Any hints?
 A: Write $f(x+iy)=u(x,y)+iv(x,y)$ as usual; then $u(x,y)^2+v(x,y)^2$ is constant; if it is $0$, there's nothing to prove, so we can assume it is nonzero. As a consequence, by computing the partial derivatives,
\begin{cases}
u\dfrac{\partial u}{\partial x}+v\dfrac{\partial v}{\partial x}=0
\\[6px]
u\dfrac{\partial u}{\partial y}+v\dfrac{\partial v}{\partial y}=0
\end{cases}
Applying Cauchy-Riemann, we get
\begin{cases}
u\dfrac{\partial u}{\partial x}-v\dfrac{\partial u}{\partial y}=0
\\[6px]
u\dfrac{\partial u}{\partial y}+v\dfrac{\partial u}{\partial x}=0
\end{cases}
Multiply the first by $u$ and the second by $v$, then sum up; multiply the first by $v$ and the second by $u$, then subtract. We get
$$
(u^2+v^2)\frac{\partial u}{\partial x}=0
\qquad
(u^2+v^2)\frac{\partial u}{\partial y}=0
$$
Therefore, acting similarly for $v$,
$$
\frac{\partial u}{\partial x}=0,\quad
\frac{\partial u}{\partial y}=0,\quad
\frac{\partial v}{\partial x}=0,\quad
\frac{\partial v}{\partial y}=0
$$
A: If $\lvert f(z) \rvert$ is constant, the image of $f$ is in the border of some disc. Thus the image is not open. By the open mapping theorem $f$ is constant.
Another method is using the maximum modulus principle. Then it is an immediate consequence.
A: We can also argue this way: Suppose $f$ is holomorphic in $U,$ a connected open set. WLOG, $0\in U.$ Then $D(0,R) \subset U$ for some $R>0.$ Write $f(z) = \sum a_nz^n, z \in D(0,R).$ Then
$$\int_0^{2\pi}|f(re^{it})|^2\, dt = \sum_n |a_n|^2r^{2n}, \, 0\le r < R.$$
The integral as a function of $r$ is constant. Thus the sum on the right is a constant. This forces $a_n = 0, n>0,$ otherwise the sum is a strictly increasing function of $r.$ Thus $f\equiv a_0$ in $D(0,R),$ and hence $f\equiv a_0$ in $U$ by the identity principle.
A: @menag's answer is the best approach, here is another:
The Möbius transformation $\phi(z) = i {z- 1\over z+1}$ maps the unit disk to the real line, hence $g = \phi \circ f$ is purely real, using the Cauchy
Riemann equations we see that $g$ is constant, hence so is $f= \phi^{-1} \circ g$.
