Let \(U \subset \mathbb{C}\) be an open set and let \(f\) be a continuous function on \(U\). If \(f^2\) is holomorphic on \(U\), prove that \(f\) is holomorphic on \(U\).
Solution
It suffices to prove that \(f\) is holomorphic on each connected component \(W\) of \(U\). Put \(A=f^2\).
1. If \(A\equiv0\) on \(W\), then \(f\equiv0\) on \(W\).
\(f(z)^2=0\) forces \(f(z)=0\) at every point of \(W\), and the zero function is holomorphic.
2. \(f\) is holomorphic on the open set \(V=\{z\in W:f(z)\neq0\}\).
\(V\) is open because \(f\) is continuous. Fix \(a\in V\) and a disk \(\Delta\subset V\) about \(a\). The holomorphic function \(A\) has no zero on the simply connected disk \(\Delta\), so it has a holomorphic square root \(g\) there, with \(g^2=A\) [@SS03]. On \(\Delta\) the quotient \(f/g\) is continuous, and \((f/g)^2=1\). It therefore takes values in \(\{1,-1\}\), and connectedness of \(\Delta\) makes it constant. Hence \(f=\pm g\) is holomorphic on \(\Delta\).
3. If \(A\not\equiv0\) on \(W\), then \(f\) is holomorphic at every zero of \(f\) in \(W\).
Let \(f(a)=0\). Then \(A(a)=0\), and the zeros of \(A\) in the connected set \(W\) are isolated [@SS03]. Choose a disk \(\Delta\) about \(a\) with \(A\neq0\) on \(\Delta\setminus\{a\}\). By step 2, \(f\) is holomorphic on the punctured disk. It is bounded near \(a\), being continuous at \(a\). The removable-singularity theorem gives a holomorphic function on \(\Delta\) that agrees with \(f\) off \(a\) [@SS03]. Its value at \(a\) is \(\lim_{z\to a}f(z)=f(a)\) by continuity of \(f\). Thus \(f\) itself is holomorphic on \(\Delta\).
4. Q.E.D.
On a component where \(A\equiv0\), step 1 applies. On any other component, every point is either a point of \(V\) or a zero of \(f\), and steps 2 and 3 cover both cases.