sum of holomorphic functions

Does anyone know how prove the following?

Suppose that $f,g$ are holomorphic functions on a non-empty open connected set $\Omega \subset \mathbb{C}$ and that $|f|^2+ |g|^2$ is constant on $\Omega$. Show that $f$ and $g$ are constant on $\Omega$.


Solution 1:

Note (using the Cauchy-Riemann equations) that $\Delta |f|^2 = 4 |f'|^2$. If $|f|^2 + |g|^2$ is constant, then $0 = \Delta( |f|^2 + |g|^2) = 4 (|f'|^2 + |g'|^2)$ so $f'$ and $g'$ are both $0$, and thus $f$ and $g$ are constant. Moreover, this generalizes to any number of functions.