# Show that if f is analytic and non-constant on a compact domain, Re f and Im f assume their maxima and minima on the boundary

Show that if f is analytic and non-constant on a compact domain, Re f and Im f assume their maxima and minima on the boundary

My proposal is to use Open Mapping Theorem, this is the image under f of any open set D containing $z_{0}$ in its interior is an open set containing $f (z_{0})$ in its interior. Could someone help me through this problem?

-
Using the open mapping theorem is a good idea. Try arguing by contradiction. – A. De Luca Apr 26 '12 at 20:12
thanks very much – Breton Apr 26 '12 at 23:47

Hint: Look at $e^{f(x)}$ and $e^{if(x)}$. What are their absolute values?