I am currently studying Calculus of Variations and have come up with this problem.
What functions $f:\Bbb R^n\to\Bbb R$ satisfy $$\sum\limits_i\frac{\partial f}{\partial x_i}=0\tag1$$ with $f$ of differentiability class $C^\infty$?
It can be shown that if the total derivative is zero; that is, if $$\frac{dF}{dt}=\sum_i\frac{\partial f}{\partial x_i}\cdot\frac{dx_i}{dt}=0$$ with $F(t)=f(x_1(t),\cdots,x_n(t))$, then $f$ is constant. However, I cannot see how the same approach can be used for $(1)$.
The trivial function $f(x)=c$ satisfies $(1)$. For even $n>1$, a non-trivial solution is the function $$f(x_1,\cdots,x_n)=\exp\left(\sum_i(-1)^{i+1}x_i\right)$$ since consecutive partial derivatives of $f$ cancel each other out. I suspect there are more solutions that invoke trigonometric expressions.
Is it possible to derive the entire family/families of functions $f$ that satisfy $(1)$?