Maximum principle problem Let $G$ be a bounded open subset of the complex plane. Suppose that $f$ is continuous on the closure of $G$ and analytic on $G$. Suppose further that there is a nonnegative constant $c$ such that $\lvert f\rvert$ is equal to $c$ for all $z$ on the boundary of $G$. Show that either $f$ is a constant or $f'$ has a zero in $G$.
I know that by the maximum principle, $c$ is the maximum of $\lvert f\rvert$, but how do I show that $f'$ has a zero in $G$ if $f$ is not a constant?
Thank you.
 A: This is not true. Take $f(z)=z$. It is analytic and its restriction to $\overline{D(0,1)}$ is continuous. Furthermore, $|z|=1\Longrightarrow\bigl|f(z)\bigr|=1$. But $f'$ has no zeros in $D(0,1)$ (or elsewhere). And, of course, $f$ is not constant there.
A: Gauss' mean value theorem states: Let $f(z)$ be analytic inside and on a circle $G$ with center at $a$. Then the mean of the values of $f(z)$ on $G$ is $f(a)$. This theorem can be used to prove the result. 
From this theorem we have 
$$\lvert \,f(a)\, \rvert \leq \frac{1}{2\pi}\displaystyle \int_{0}^{2\pi}\lvert \,f(a+re^{i\theta})\, \rvert\,d\theta [Eq. 3].$$
Suppose that $\lvert\, f(a)\, \rvert$ is a maximum so that $\lvert \,f(a+re^{i\theta})\, \rvert \leq \lvert\, f(a)\, \rvert$. If $\lvert \,f(a+re^{i\theta})\, \rvert < \lvert\, f(a)\, \rvert$ for one value of $\theta$, then, by continuity of $f$, it would hold for a finite arc, say $\theta_{1}<\theta<\theta_{2}$. But in such case the mean value of $\lvert \,f(a+re^{i\theta})\, \rvert$ is less than $\lvert\, f(a)\, \rvert$, which would contradict equation 3. It follows that in any $\delta$ neighborhood of $a$, i.e. for $\lvert\,z-a\,\rvert<\delta$, $f(z)$ must be a constant. If $f(z)$ is not a constant, the max value of $\lvert \,f(z)\, \rvert $ must occur on $G$. 
[From Schaum's Outline Series on Complex Variables]
