Let $f(z)$, and $g(z)$ be two analytic functions defined on a region $D\subset\mathbb{C}$. Suppose there exist a constant $r>0$ such that $|f(z)|^2+|g(z)|^2=r$ for every $z$ in $D$. Show that both functions must be constant.
How do I solve this problem? I just need some hints to solve this.
If you apply the Wirtinger derivative $\frac{\partial}{\partial \overline{z}}$ on both sides of $r=|f|^2+|g|^2=f\overline{f}+g\overline{g}$ you get $$f\overline{f'}+g\overline{g'}=0$$
where you need to take into account the product rule and Cauchy-Riemann equations: $\frac{\partial}{\partial \overline{z}}f=\frac{\partial}{\partial \overline{z}}g=0$
Therefore, $-\frac{f}{g}=\frac{\overline{g'}}{\overline{f'}}$
The left hand side is analytic, where $g\neq0$, and the right hand side is anti-analytic, when $f'\neq0$. Therefore, at all those points both of those quotients are constant.
If $f$ is a constant multiple of $g$, then $|f|^2$ is constant.