I'm trying to find some(class of) functions $f:\mathbb R^n\to\mathbb C$ such that
$$\frac{\partial f}{\partial x^i}\frac{\partial f^*}{\partial x^j}$$
is a real number for all $1\leq i,j\leq n$ and ${}^*$ is the complex conjugate operator.
Any such $f$ whose image lies in $\mathbb R$ obviously will do, but I need to find non-trivial solutions, and, in the best case, a general closed form solution(which I don't think it will happen).
I noticed that any function of the form
$$f(x^1,\ldots, x^n)=A \exp\left(i \sum_{i=1}^n a_i x^i\right)$$
with $a_i\in\mathbb R$ and $A\in\mathbb C$ will do(we can even add a constant at the end).
Is this the only family of functions with said property?
I tried inserting another function inside the exponent with the hope that must not depend on coords for the above requirement to make sense, but the expression got complicated and couldn't follow.
Any help would be greatly appreciated. Thanks.