Question: In *Complex Variables and Applications*, Brown & Churchill (9th edition), I stumbled upon a chapter which got me somewhat confused.

On page 175 of the book, there is the theorem, which states the following:

> 
> If a function $f$ is analytic and not constant in a given domain $D$, then $\left| f(z) \right|$ has no maximum value in $D$. That is, there is no point $z\_0$ in the domain such that $\left|f(z) \right|\le \left|f(z\_0) \right|$ for all points $z$ in it.
> 
> 
> 

To me, this means that $f$ is unbounded on $D$ if it's not constant.

But now there is a Corollary on page 176 which seems to contradict this theorem, and which goes as follows:

> 
> Suppose that a function $f$ is continuous on a closed bounded region $R$ and that it is analytic and not constant in the interior of $R$. Then the maximum value of $\left|f(z) \right|$ in $R$, which is always reached, occurs somewhere on the boundary of $R$ and never in the interior.
> 
> 
> 

And also there's this theorem:

> 
> Suppose that $\left| f(z) \right| \le \left| f(z\_0) \right|$ at each point $z$ in some neighborhood $\left| z - z\_0\right|<\varepsilon$ in which $f$ is analytic. Then $f(z)$ has the constant value $f(z\_0)$ throughout that neighborhood.
> 
> 
> 

So, we have three theorems, where one says that $f(z)$ is either constant or unbounded. Another theorem says that there actually does exist a maximum value of $f$ if it's not constant. While the third theorem says that, nevertheless, $f$ must be constant if it's bounded.

I would really appreciate if someone could please clear this confusion of mine.

Answer: 
The issue here is that these theorems apply to different types of sets. In particular, the first theorem applies to domains, which are defined as *open* connected sets. Implicitly, the third theorem is also about open sets, as it speaks of the neighborhood of a point.

The second theorem applies to a *closed* bounded region. In particular, it is explicitly mentions that the function does not obtain a maximum in the interior of the region, which is actually necessary given the other theorems

Also, you need to be careful about your use of the word "unbounded" here - none of the theorems say that $f$ is either constant or unbounded. They just say that $f$ can't obtain a maximum. For instance, over the real interval $(-1,1)$ the function $f(x)=x$ does not obtain a maximum, but it is bounded since $|f(x)|\leq 1$.
You are confusing *maximum* and *supremum*.

What is meant is that there is no point *in $D$* that achieves the maximum value. But the function can still be bounded. Think of, for instance, of the function $f$ defined on $(-1,1)$ by
$$
f(x) = x^2
$$
Well, is bounded... it has a supremum. But it does not have a maximum.