Let $D\subseteq \mathbb{C}$ be open and connected and $f,~g:D \rightarrow \mathbb{C}$ holomorphic functions such that $|f|+|g|$ is constant on $D.$ Prove that $f,~g$ are constant on $D.$
Attempt. I noticed first that this problem is already set before, and is considered to be duplicate (If $|f|+|g|$ is constant then each of $f, g$ is constant) and we are sent directly to problem sum of holomorphic functions. However, the last reference deals with the sum $|f|^2+|g|^2$, which I do not see how is connected to the sum $|f|+|g|$, as stated in our title (for example, the equality $|f|^2+|g|^2=(|f|+|g|)^2-2|f||g|$ is not helpful here).
Thanks in advance!
By the maximum modulus principle $|f(z)|$ has no local minimum and maximum except at its zeros. So if $f(a)=0$ then $a$ is a local minimum of $|f(z)|$ so it is a local maximum of $|g(z)|$ and $g(a) = 0$, i.e. $f(z) = g(z)= 0$.
$\implies$ If $f(z)$ is non-constant then $f(z),g(z)$ have no zeros, and we can look at the holomorphic functions $F(z) = \log f(z), G(z) = \log g(z)$ and $H (z) = e^{Re(F(z))}+e^{Re(G(z))}=C$. Differentiating : $$\partial_x H(z) = Re(F'(z)) e^{Re(F(z))}+Re(G'(z))e^{Re(G(z))}=0 $$ $$ \partial_y H(z) = Im(F'(z)) e^{Re(F(z))}+Im(G'(z))e^{Re(G(z))}=0$$
so that $$0= F'(z)e^{Re(F)}+G'(z)e^{Re(G(z))}=(F'(z)-G'(z))e^{Re(F(z))}+G'(z)(e^{Re(F(z))}+e^{Re(G(z))})$$ $$ = (F'(z)-G'(z))e^{Re(F(z))}+C G'(z)$$ Finally $(G'(z)-F'(z))e^{Re(F(z))}=C G'(z)$ means that $(G'(z)-F'(z))e^{Re(F(z))}$ and $e^{Re(F(z))}$ is holomorphic, i.e. $Re(F(z))$ and $F(z),f(z)$ are constant.