I can prove the following result when $n=2$. I wonder if it is still true when $n\geq3$.
Let $f_2,\ldots,f_{n}:\mathbb{R}^n\rightarrow\mathbb{R}$ a family of functions of class $C^\infty$ such that for any, $\mu=2,\ldots,n$, $$ \frac{\partial f_\mu}{\partial{x_1}}+\sum_{i=2}^nf_i\frac{\partial f_\mu}{\partial{x_i}}=0. $$Then $(f_2,\ldots,f_n)$ are constant.
The proof for $n=2$ goes as the following. We consider the vector field on $\mathbb{R}^2$ given by $X=\frac{\partial}{\partial x_1}+f\frac{\partial}{\partial x_2}$. The equation is equivalent to $X(f)=0$ and hence the flow of $X$ is given by $\phi(t,x)=x+tF(x)$ where $F(x)=(1,f(x))$ and to be a flow one must have $F(x+tF(x))=F(x)$ for any $x$ and any $t$. Let $x,y$ such that $F(x)$ and $F(y)$ are linearly independent. Then $x-y=tF(x)+sF(y)$ and hence $F(x)=F(y)$ which is a contradiction. So we must have $F(x)=\alpha(x)x_0$ and since $F(x)=(1,f(x))$, $\alpha$ is constant and the result follows.