Assume we have a real-analytic function $f(x, y)>0$ in some neighborhood of 0. When does there exist a complex-analytic function $w(z)$ such that $|w(z)|=f(x,y)$ for $z=x+iy$.


One necessary condition is that $\Delta\ln f=0$. Is there anything else?



Which real analytic functions of two variables locally are magnitudes of complex-analytic functions
To formally complete the question: the answer is by Anthony Quas in the comment below.


