Finding $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. 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.
 A: Writing $f=u+iv$ with real-valued $u$ and $v$ we obtain the following form of your condition:
$${\partial u\over\partial x_j}{\partial v\over\partial x_k}-{\partial v\over\partial x_j}{\partial u\over\partial x_k}\equiv0\qquad\forall j\ne k\ .$$
This means that the matrix
$$\left[\matrix{u_1&\ldots&u_n\cr v_1&\ldots&v_n\cr}\right]_x$$ has rank $\leq1$ at all $x\in{\mathbb R}^n$, hence the gradients $\nabla u(x)$ and $\nabla v(x)$ are linearly dependent at all points. This  indicates that the two functions $u$, $v:\>{\mathbb R}^n\to{\mathbb R}$ are functionally dependent, i.e., there is a "hidden" nontrivial $F:\>{\mathbb R}^2\to{\mathbb R}$  such that $$F\bigl(u(x),v(x)\bigr)\equiv0\ ,\qquad{\rm or}\qquad v(x)=\Phi\bigl(u(x)\bigr)\quad\forall x\in{\mathbb R}^n\ .$$
Concerning functional dependence see this question or, e.g., pages 50–58 in this document. But maybe you find something about functional dependence in an advanced calculus book.
When you look at your example $$f(x):=\exp(i\,a\cdot x)$$
you get $u(x)=\cos(a\cdot x)$, $\,v(x)=\sin(a\cdot x)$, so that we have the "hidden" dependence $u^2+v^2=1$.
