Given the equation:
$$\nabla f(x) \times \nabla g(x) = 0$$
for two scalar fields $f$ and $g$. It follows that when this is satisfied $h(f,g)=0$ for some function $h$. The question is to find a smooth function $h$ given functions $f$ and $g$ such $h(s,t)=0$ if and only if there exists a solution to: $s=f(x), t=g(x), \nabla f(x) \times \nabla g(x) = 0$ and otherwise $h(s,t)\neq 0$.
Can we infer a differential equation that is satisfied by $h$? Or any other properties?
If we write $h$ as:
$$h(f,g) = \sum a_{nm} f^n g^m$$
is there a way to find values of $a_{nm}$ knowing the functions $f(x)$ and $g(x)$ ?
My first attempt at trying to write a function which if it converges (which it probably doesn't) seems to have the right properties
$$ \frac{1}{h(u,v)} = \int \frac{1}{\left((u-f(x))^2+(v-g(x))^2 + |\nabla f(x) \times \nabla g(x)|^2\right)^2 } dx^3 $$
Theoretically this has the right properties but I can't simplify it. e.g. whenever the top equation is satisfied the RHS becomes infinite which implies the function h is zero as required.
If the cross product is zero, then you have 3 equations looking like $f_xg_y=f_yg_x$, with subscripts denoting partial derivatives. So one example of a scalar $h$ is $h=f_xg_y-f_yg_x$. To have a stronger statement, i.e. $h(f,g)=0 \implies \nabla f \times \nabla g =0$ will require a more complex $h$ or a vector-valued $h$.