Let $U$ be an open connected domain and $D$ be an open disk such that the closure of $D$ is a subset of $U$. Suppose $f\in H(U)$, i.e., $f$ is holomorphic in $U$, and that $f$ is not constant. Show that if $|f|$ is constant on the boundry of $D$, then $f$ has at least one zero in $D$.
My answer:
$|f| = c$ on $\partial D \implies$ there exists $M>0$ such that $|f(z)|=M$ for all $z\in\partial D$, and since $f\in H(U)$ then $|f(z)|\leq M$ for all $z\in D$. Suppose that $f$ has no roots in $D$. Then $1∕f\in H(D)$. If $z\in\partial D$ then $|1 ∕ f(z)|=1∕ M$ then $|1 ∕ f(z)|\leq 1∕ M$ for all $z\in D$ but $|f(z)|\leq M$ for all $z\in D$ then $|1 ∕ f(z)|\geq 1∕ M$ for all $z\in D$ so we get $|1 ∕ f(z)|=1∕ M$ for all $z\in D$ then $|f(z)|=M$ for all $z\in D$ and since $D$ is open and connected then $f$ is constant on $D$, contradiction. Is that right??
$|f| = c$ on $\partial D \implies$ there exists $M>0$ such that $|f(z)|=M$ for all $z\in\partial D$, and since $f\in H(U)$ then $|f(z)|\leq M$ for all $z\in D$. Suppose that $f$ has no roots in $D$. Then $1∕f\in H(D)$. If $z\in\partial D$ then $|1 ∕ f(z)|=1∕ M$ then $|1 ∕ f(z)|\leq 1∕ M$ for all $z\in D$ but $|f(z)|\leq M$ for all $z\in D$ then $|1 ∕ f(z)|\geq 1∕ M$ for all $z\in D$ so we get $|1 ∕ f(z)|=1∕ M$ for all $z\in D$ then $|f(z)|=M$ for all $z\in D$ and since $D$ is open and connected then $f$ is constant on $D$, contradiction.