How to show that the imaginary part of a function assumes its maximum on the boundary of a compact set [duplicate]
Let $f:U\rightarrow\mathbb{C}$ be an analytic and nonconstant function and $U$ be open. I want to prove that $Re(f)$ does not achieve a local maximum on $U$.
I started by supposing for contradiction that $Re(f)$ has a local maximum and decomposing $f(z)=a+bi$.
Our claim then becomes: $ \exists z_{1}\in U$ where $f(z_{1})=a_{1}+b_{1}i$ such that $\forall z\in U, f(z)=a+bi$ we have $a_{1}\geq a$.
Now the Maximum Modulus principle applies and therefore $f(z)=|a+bi|$ has no local maximum. Therefore, $\exists z_{2}\in U$ such that $|f(z_{1})|=|a_{1}+b_{1}i|\leq|a_{2}+b_{2}i|=|f(z_{2})|$
But I am stuck, I don't know how to reach a contradiction from here.
Any suggestions? Should I go about it in another way?(although I am pretty sure I have to use the Maximum Modulus Principle)
Solution 1:
Hint: Examining the function $$ e^{f(z)}, $$ which is also analytic by hypothesis, is a standard trick. Note that the modulus of an exponential comes from the real part of its argument.