Exercise on Maximum Principle This exercise is taken from Gamelin's Complex Analysis, page 89, exercise 4.
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$. (a) Show that $|f(z)|$ attains its minimum on $D$, then $f(z)$ is constant. (b) Show that if $D$ is bounded, and if $D$ is bounded, and if $f(z)$ extends continuously to the boundary $\partial D$ of $D$, then $|f(z)|$ attains its minimum on $\partial D$.
I solved part (a), but part (b) is giving me trouble. Namely, I define $g(z)=1/f(z)$, but how do I know that f(z) doesn't have a zero on $\partial D$? I have to make that extra assumption in my proof below... And if it helps any, the book assumes D is simply connected as well. 
Heres my progess:
Part $(a):$
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$. Suppose $|f(z)|$ attains a minimum on $D$ at $z_0$, denoted $M$. Since $f(z)$ has no zeroes on $D$, and is analytic, $g(z)=1/f(z)$ is analytic. It follows that $|g(z)|=|1/f(z)|\le 1/M$ for all $z\in\mathbb{Z}$ and $|g(z_0)|=1/M$. So, since $g(z)$ is analytic, it is also harmonic, and thus by the Strict Maximum Principle, $g(z)$ is constant, implying $f(z)$ is constant. 
Part $(b):$
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$ and $\partial D$. Suppose that $D$ is bounded and connected and that $f(z)$ extends continuously to $\partial D$. Then $D\cup\partial D$ is compact, as it contains its boundary and is bounded. Let $g(z)=1/f(z)$, then since $f(z)$ has no zeroes, $g(z)$ is defined over all of $D\cup\partial D$, and since its a continuous real-valued function on a compact set, it attains a maximum, denoted $M$ at $z_0$. Then $g(z)=1/f(z)\le M$, implying $f(z)\ge 1/M$ for all $z\in\mathbb{Z}$, and since $g(z_0)=M$, it follows that $f(z_0)=1/M$. If $f(z)$ obtains a minimum in $D$, it follows from part $(a)$ that $f(z)$ is constant and thus obtains its minimum on $\partial$$D$, and thus $f(z)$ always obtains its minimum on $\partial D$. 
 A: I realize this is probably in bad form to answer my own question, but the one comment I thought helped me solve the peice of the problem I was missing, is as I said, a comment, and not something which allows me to close this question.  
Part $(a):$
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$. Suppose $|f(z)|$ attains a minimum on $D$ at $z_0$, denoted $M$. Since $f(z)$ has no zeroes on $D$, and is analytic, $g(z)=1/f(z)$ is analytic. It follows that $|g(z)|=|1/f(z)|\le 1/M$ for all $z\in\mathbb{Z}$ and $|g(z_0)|=1/M$. So, since $g(z)$ is analytic, it is also harmonic, and thus by the Strict Maximum Principle, $g(z)$ is constant, implying $f(z)$ is constant. 
Part $(b):$
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$ and a zero on $\partial D$ at $z_0$. Then $f(z_0)=0$ implying $|f(z_0)|=0$, which is neccesarily a minimum on $\partial D$ since $|f(z)|> 0$ for all $z\in D$ as $f(z)$ has no zeroes in $D$. 
Let $f(z)$ be an analytic function on a domain $D$ that has no zeroes on $D$ and $\partial D$. Suppose that $D$ is bounded and connected and that $f(z)$ extends continuously to $\partial D$. Then $D\cup\partial D$ is compact, as it contains its boundary and is bounded. Let $g(z)=1/f(z)$, then since $f(z)$ has no zeroes, $g(z)$ is defined over all of $D\cup\partial D$, and since $f$ is continuous, $g$ is continuous and thus it attains a maximum, denoted $M$ at $z_0$. Then $g(z)=1/f(z)\le M$, implying $f(z)\ge 1/M$ for all $z\in\mathbb{Z}$, and since $g(z_0)=M$, it follows that $f(z_0)=1/M$. If $|f(z)|$ obtains a minimum in $D$, it follows from part $(a)$ that $f(z)$ is constant and thus obtains its minimum on $\partial$$D$, and thus $|f(z)|$ always obtains its minimum on $\partial D$. 
A: Since $f$ extends continuously to $\bar{D}$, and since $\bar{D}$ is compact, $\vert f \vert$ is bounded there, and attains both a minimum and a maximum. 
Assume that $|f|$ does attain a minimum in $D$. Then $|g|$ attains a maximum in $D$, hence both $f$ and $g$ are constants. The continuity of $f$ now assures that $|f|$ attains a minimum on $\partial D$. 
