If $\sum_ix^i\partial_if=0$, then $f$ is constant?

139 Views Asked by At

Let $f$ be a real-valued function defined on a neighborhood $D$ of $0\in\mathbb R^n$ - is it true that $\sum_ix^i\partial_if=0$ implies that $f$ is constant? Intuitively, I'd say yes:

Consider the radial vector field $R(x):=x$, then $\sum_i x^i\partial_if=\mathrm df(R)$ and we get that $f$ is constant on each ray emanating from the origin. Because of continuity, $f$ should be constant everywhere.

Is my reasoning correct? What properties does $D$ need to have such that everything works out? (My guess would be that $D$ needs to be star-shaped w.r.t. the origin.)

Motivation: As far as I understand, this is used in the proof of Lemma $4.13$ of Heat Kernels and Dirac Operators.