Equality of two analytic functions on $\overline{\mathbb{D}}.$ Let $f,g:\overline{\mathbb{D}}\to\overline{\mathbb{D}}$ be two analytic functions such that $$|f(z)|=|g(z)|\,\,\,\ \forall z\in\overline{\mathbb{D}}$$ $$f(z_0)=g(z_0)\not=0\,\,\,\text{for some}\,\,\ z_0\in\mathbb{D}$$ $$f'(z), g'(z)\not=0\,\,\,\ \forall z\in\overline{\mathbb{D}}.$$ Is it true that $f=g \,\,?$ 
I have try to use the maximum modulus principle on the function $$h(z) =
\begin{cases}
\dfrac{f(z)}{g(z)},  & \text{if $g(z)\not=0$} \\[2ex]
\dfrac{f'(z)}{g'(z)}, & \text{if $g(z)=0.$}
\end{cases}$$
$|h(z)|=1$ for all $g(z)\not=0$ and $h(z_0)=1.$
Can I say $h$ is analytic in $\overline{\mathbb{D}}\,\,?$ I am stucked at this point.
 A: Here is an approach using the maximum modulus principle.
Clearly, $f$ and $g$ have the same zeros of the same multiplicity in $\overline{\mathbb{D}}$. For if not, their modulus can not be equal at the zero of any of them.
Since $f$ and $g$ have the same zeros, $f/g$ is analytic in $\overline{\mathbb{D}}$. So $|f/g|$ reaches a maximum on $\partial\overline{\mathbb{D}}$ ($\partial\overline{\mathbb{D}}$ is the boundary of $\overline{\mathbb{D}}$) by the maximum modulus principle. Likewise,  $g/f$ is analytic in $\overline{\mathbb{D}}$ and reaches a maximum on $\partial\overline{\mathbb{D}}$.
So $|f/g|$ reaches a maximum and minmum on $\partial\overline{\mathbb{D}}$. If $|f(z)|=|g(z)|=0$ on $\partial\overline{\mathbb{D}}$, then $f(z)=g(z)=0$ on $\partial\overline{\mathbb{D}}$, contradicting $f(z_0)=g(z_0)\not=0\,\,\,\text{for some}\,\,\ z_0\in\mathbb{D}$. So $|f/g|=1$ on $\partial\overline{\mathbb{D}}$ and $f(z)=g(z)$ in the entire $\overline{\mathbb{D}}$.
A: Note that $f(z) = 0$ iff $g(z) = 0$. Since $f,g$ are analytic, the zeros are isolated.
Define $\phi(z) = \begin{cases} {f(z) \over g(z)}, & g(z) \neq 0 \\
{f'(z) \over g'(z)}, & g(z) = 0
\end{cases}$.
$\phi$ is clearly analytic around any $z$ such that $g(z) \neq 0$.
Suppose $f(z) = 0$ (and hence $g(z) = 0$). We have
$f(z+h) = f(z) + \int_0^1 f'(z+th) h dt$ and similarly for $g$. Hence
$\phi(z+h)-\phi(z) = { \int_0^1 f'(z+th) dt \over \int_0^1 g'(z+th) dt } - {f'(z) \over g'(z)}$. Hence we see that $\phi$ is continuous at $z$. It follows from Riemann's theorem that $\phi$ is analytic at $z$, hence
 analytic on $\mathbb{D}$.
Then $\phi(z_0) = 1$ and $|\phi(z)| = 1$ for all $z$.
Since $|\phi(z)| = 1$ for all $z$, $\phi$ cannot be an open map, and since
it is analytic, it must be constant.
A: Alternate approach: I'll work on $\mathbb {D};$ I'm not sure what the $\overline {\mathbb {D}}$ is all about. If $g\equiv 0,$ we're done. Otherwise, simply by continuity, there is $D(a,r) \subset \mathbb {D}$ where $g$ is never $0.$ Then $f/g \in H(D(a,r))$ and $|f/g|\equiv 1$ there. By the open mapping theorem, $f/g$ is constant on $D(a,r).$ Therefore $f= cg$ in $D(a,r)$ for some $c, |c|=1.$ By the identity principle, $f = cg$ in $\mathbb {D}.$ Because $f(z_0) = g(z_0)\ne 0,$ we get $f=g$ in $\mathbb {D}.$
