# On two functions with isodirectional gradients

Let $U\subset \mathbb{R}^n$ be open and $f,g:U \to \mathbb{R}$ be two $C^1$ functions whose gradients are always in the same direction, i.e. $\forall i,j \in \left\{1,...,n\right\}$ $$(\partial_i f) (\partial_j g) - (\partial_j f) (\partial_i g)=0$$ Denote by $L_c=\left\{\mathbf{r} \in U \left.\right| f(\mathbf{r})=c\right\}$ a "level set" of $f$. Let $C$ be a connected component of $\partial L_c$. Is $g$ constant on $C$?

This sounds like a standard question to me, so a simple reference will do as an answer.