Analytic complex function which is constant. I come across these question when I am studying George Cain Complex analysis.



*

*Suppose $f$ is analytic on a connected open set $D$, and suppose $f^{'}(z)=0$ for all $z\in D$. Prove that $f$ is constant.

*Suppose $f$ is analytic on the set $D$, and suppose $Ref$ is constant on $D$. Is $f$ necessarily constant on $D$? Explain.

*Suppose $f$ is analytic on the set $D$ and suppose $|f(z)|$ is constant on D. Is $f$ necessarily constant on $D$? Explain.

No hint is found in the text. Please I need a hint and reference to prove the above statements.  
 A: For 1, if you regard $f$ as a smooth function on $D\subset \mathbb{R}^2$, $f'(z)=0$ implies that the gradient of $f$ is zero, so $f$ must be a constant function. 
For 2, since $f=u+iv$ where $u=Re(f)$ and $v=Im(f)$ satisfies Cauchy-Riemann condition, we have
$$v_y=u_x=0\mbox{ and } v_x=-u_y=0$$
since $u$ is constant. This implies that $v$ is constant, and as a result $f=u+iv$ is a constant function.
For 3, since $|f|$ is constant, $$\tag{0}|f|^2=u^2+v^2\equiv c$$where $c$ is a constant. If $c=0$, then $f\equiv 0$. So we assume that $c\neq 0$. Differentiate it with respect to $x$ and $y$, we have
$$\tag{1} 2(uu_x+vv_x)=0\mbox{ and }2(uu_y+vv_y)=0$$
Again using Cauchy-Riemann condition, $(1)$ can be written as
$$\tag{3} uu_x-vu_y=0\mbox{ and }uu_y+vu_x=0.$$
Eliminate $u_y$ in $(3)$, we get
$ 0=(u^2+v^2)u_x=cu_x$
by $(0)$, which implies that $u_x=0$ since $c\neq 0$. Similarly, eliminate $u_x$ in $(3)$, we get $ 0=(u^2+v^2)u_y=cu_y$ which implies that $u_y=0$. This implies that $u$ is constant. Using part 2, we can conclude that $f$ is a constant function. 
