# Harmonic functions and Maximum Modulus Principle. (Real harmonic function implies holomorphic function?)

Theorem. (Maximum Modulus Principle) $$\;$$If $$f$$ is a non-constant holomorphic function in a region $$\Omega$$, then $$f$$ cannot attains a maximum in $$\Omega$$.

Problem. Prove the maximum principle for harmonic functions, that is,

(a) If $$u$$ is a non-constant real-valued harmonic function in a region $$\Omega$$, then $$u$$ cannot attain a maximum in $$\Omega$$.

(b) Suppose that $$\Omega$$ is a region with compact closure. If $$u$$ is harmonic in $$\Omega$$ and continuous in $$\overline{\Omega}$$, then $$\sup_{z \in \Omega}|u(z)| \leq \sup_{\partial \Omega}|u(z)|$$

My attempt.

(a) Define $$g(z) = u_{x}(z) - iu_{y}(z)$$. So, $$\frac{\partial}{\partial x}u_{x} = u_{xx}$$ and $$\frac{\partial}{\partial y}u_{y} = -u_{yy}.$$ Thus, $$\frac{\partial}{\partial x}u_{x} - \frac{\partial}{\partial y}u_{y} = 0 \Longrightarrow \frac{\partial}{\partial x}u_{x} = \frac{\partial}{\partial y}u_{y}.$$ Analogously, $$\frac{\partial}{\partial y}u_{x} = -\frac{\partial}{\partial x}u_{y}.$$ Therefore, $$g$$ is holomorphic and so, there is $$f$$ such that $$f' = g$$ and, up to a constant, $$u$$ is a real part of $$f$$, i.e, $$u$$ is holomorphic. Since $$u$$ is a non-constant holomorphic function in $$\Omega$$, $$u$$ cannot attain a maximum in $$\Omega$$.

(b) Since $$u$$ is continuous in $$\overline{\Omega}$$, attains a maximum in $$\overline{\Omega}$$. But, by the item (a), the maximum cannot attains in $$\Omega$$, then $$\sup_{z \in \Omega}|u(z)| \leq \sup_{\partial \Omega}|u(z)|.$$

The problem not seems simple to solve. I suspect I've done something wrong. Can someone help me?

I will suggest a different approach. Suppose $$u$$ attains its maximum at some point $$z_0 \in \Omega$$. Then $$u(z_0)$$ is also the maximum of $$u$$ in some disc $$D(z_0,r)$$ contained in $$\Omega$$. There is an analytic function $$f$$ whose real part is $$u$$. Now apply Maximum Modulus Principle to $$e^{f}$$. Since $$|e^{f}|=e^{u}$$ it follows that $$|f|$$ attains maximum at $$z_0$$. Hence $$f$$ is a constant and so is $$u$$. Let $$M =u(z_0)$$. Using what we just proves you can verify that $$\{z\in \Omega : u(z)=M\}$$ is open and closed. Since $$\Omega$$ is connected it follows that $$u$$ has the constant value $$M$$ throughout $$\Omega$$.
Second part follows immediately. The continuous function $$|u|$$ attains its maximum at some point $$z_1$$ in $$\overset {-} {\Omega}$$ and this must be on the boundary. (It is the maximum of $$u$$ or $$-u$$). Hence $$u(z)\leq \sup_{\partial \Omega}|u|$$ for all $$z \in \Omega$$. We can also apply this to $$-u$$ so we get $$|u(z)|\leq \sup_{\partial \Omega}|u|$$ for all $$z$$.