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.