Let $f,g$ be two smooth functions on $\mathbb{R}^2$ and $U,V$ be two smooth vector fields on $\mathbb{R}^2$. What is the sufficient condition for local existence of a solution $\phi$ of equations \begin{align} U \cdot \nabla \phi &= f \\ V \cdot \nabla \phi &=g \end{align}
I know the answer if $U=(1,0)$ and $V=(0,1)$. Then we have classical problem of finding potential for vector field $(f,g)$ and the sufficient condition for local existence is that curl of $(f,g)$ has to be zero. In the virtue of this classical problem, we can try to derive similar condition \begin{align} (V\cdot \nabla)(U\cdot \nabla)\phi &= (V\cdot\nabla)f \\ (U\cdot \nabla)(v\cdot \nabla)\phi &= (U\cdot\nabla)g \\ \end{align} Using comutator $[A,B] = AB-BA$ we can rewrite the first equation as \begin{align} (U\cdot \nabla)(V\cdot \nabla)\phi + [(V\cdot \nabla),(U\cdot \nabla)] \phi &= (V\cdot\nabla)f \end{align} This leads to \begin{align} [(V\cdot \nabla),(U\cdot \nabla)] \phi = (V\cdot\nabla)f - (U\cdot\nabla)g \end{align} If the commutator vanishes then the condition is \begin{align} 0 = (V\cdot\nabla)f - (U\cdot\nabla)g \end{align} Which, I think, can be proven to be a sufficient condition for local existence. But what happens when the commutator does not vanish?
The problem can be reformulated in the language of differential geometry
Let $X,Y$ be two vector fields on manifold $M$. What is the necessary condition for local existence of a function $\phi$ which satisfy \begin{align} X(\phi) &= 1 \\ Y(\phi) &= 1 \end{align}
Connection to the previous formulation is \begin{align} X &= \frac{U}{f} \cdot \nabla \\ Y &= \frac{V}{g} \cdot \nabla \end{align}
If $[X,Y] = 0$ then I can find coordinate functions $\psi_x$ and $\psi_y$ such that \begin{align} X(\psi_x) &= 1\\ X(\psi_y) &= 0\\ Y(\psi_x) &= 0\\ Y(\psi_y) &= 1 \end{align} Then the solution is $\phi = \psi_x + \psi_y$.
If $[X,Y] \neq 0$, I cannot solve the problem with coordinate functions, but can I find $\phi$? Or I'm guaranteed that it does not exists?