How does one prove if a multivariate function is constant?

Suppose we are given a function $f(x_{1}, x_{2})$. Does showing that $\frac{\partial f}{\partial x_{i}} = 0$ for $i = 1, 2$ imply that $f$ is a constant? Does this hold if we have $n$ variables instead?


Solution 1:

Yes, it does, as long as the function is continuous on a connected domain and the partials exist (let's not get into anything pathological here).

And the proof is the exact same as in the one variable case (If there are two points whose values we want to compare, they lie on the same line. Use the multivariable mean variable theorem to show that they must have the same value. This proof is easier if you know directional derivatives and/or believe that you can assume that the partial derivative in the direction of this line is zero because all other basis-partials are zero.)