Solution (source code)

= Solution

The quotient $h=f/g$ is a <holomorphic function> because the denominator has no zeros, and $|h|=1$. Write $h=u+iv$. The <Cauchy-Riemann equations> say $u_y=-v_x$ and $v_y=u_x$. Differentiating $u^2+v^2=1$ in both real directions gives
$$
uu_x+vv_x=0,\qquad -uv_x+vu_x=0.
$$
The coefficient <determinant> is $-(u^2+v^2)=-1$, so $u_x=v_x=0$, and the <Cauchy-Riemann equations> also give $u_y=v_y=0$. Thus $h$ is locally constant. Since a <domain> is connected, it is constant throughout $\Omega$. Its constant value has modulus one and can be written $e^{i\alpha}$ with $\alpha\in\mathbb R$. Therefore \b[$f=e^{i\alpha}g$ throughout $\Omega$].

This is the <constant-modulus holomorphic function> principle. Connectedness is essential to a single global phase: on two disjoint discs, taking $g=1$ and choosing $f=1$ on one disc and $f=-1$ on the other gives equal moduli without one common phase.