If $|f(z)|=|g(z)|$ for all $|z|=R$, there is $\lambda \in \Bbb C$ such that $|\lambda|=1$ and $f=\lambda g$. Let $U$ be a region in the complex plane that cointaints $D=\{z \in \Bbb C : |z| \leq R\}$ for some $R>0$. Let $f,g: U \to \Bbb C$ be holomorphic functions such that $|f(z)|=|g(z)|$ for all $|z|=R$. Prove that if these functions don't vanish in $D$, then there exists $\lambda \in \Bbb C$ such that $|\lambda|=1$ and $f=\lambda g$ in $U$.
I started by defining $h(z)=f(z)/g(z)$ for all $z \in U$. Since the zeros of $g$ are isolated (if they were not isolated, $g$ would vanish on $U$ by the identity theorem, and in particular, it would vanish on $|z|=R$), $h$ has only isolated singularities. $|h(z)|=1$ in $|z|=R$ implies that $|h(z)|<1$ for $|z|<R$ by the maximum modulus principle. So $h$ is bounded near every singularity in the interior of $D$, so they are removable. Then $h$ is analytic in the interior of $D$.
I don't know what else to do, I thought about Liouville's theorem but $h$ is not entire.
 A: Note that $h={f\over g}$ and ${1 \over h}$ are analytic in $D$ and $|h(z)|=|{1 \over h(z)}| = 1$ for $|z|=R$. It follows that $h$ is constant in $D$ and hence
$f(z) = \lambda g(z)$ for some $|\lambda = 1$.
Now consider $\phi = f-\lambda g$ which is analytic on $U$ and zero on $D$, hence zero on all of $U$.
A: Consider $h_1={f\over g}$ and $h_2={g\over f}$. They are holomorphic function defined on $D$. Suppose that $|h_1|$ is not constant. It implies that there exists $z\in D$ such that $|h_1(z)|\neq 1$, if $|h(z)|>1$, we deduce that there exists $z_0\in D$ such that for every $z\in D$, $|h_1(z_0)|\geq |g(z))|$ since $|h_1$ is a continuous function defined on $D$. The Min Max principle implies that $|h_1|$ is constant.
If $|h_1(z)|<1$, apply the argument above to $h_2$. We deduce that $|h_1|$ and $|h_2|$ are constant. The open mappin theorem implies that $h_1$ and $h_2$ are constant. There exists $\lambda$ such that $f=\lambda g$ on $D$, the identity theorem enables to show that $f=\lambda g$ on $U$.
https://en.wikipedia.org/wiki/Maximum_modulus_principle
A: Consider the function $h:=f/g$, it is holomorphic on a open neighborhood $\tilde D$ of $D$ contained in $U$ (e.g. $\tilde D=\{|z|<R+\varepsilon\}$ for some $\varepsilon$ small enough).
Now $h\in\mathcal O(\tilde D)\cap\mathcal C(D)$ so by MMP $|h|_{|D}$ attains both its maximum and its minimum on $\partial D$; but $|h|\equiv1$ on $\partial D$, so $|h|$ is constantly equal to 1.
Now since $D$ is connected, $|h|$ constant implies $h$ constant, so $\exists \lambda,\;\;|\lambda|=1$ such that $h=\lambda$, that is $f=\lambda g$ on $D$.
By identity principle this extends to $\tilde D$.
Reason by your own (technical formalities) on how to extend this to the whole $U$.
