Show that if the partial derivatives of $f: U \rightarrow \mathbb{R}$, for $U \subset \mathbb{R}^m$ open and connected, are zero, then $f$ is constant

partial derivativepartial differential equationsreal-analysis

I've been self studying real analysis lately and was trying to solve the following problem from my textbook:

Show that if the partial derivatives of $f:U \rightarrow \mathbb{R}$, for $U \subset \mathbb{R}^m$ open and connected, are zero, then $f$ is constant.

My approach was as follows: If I could prove that $f$ is differentiable just by knowing that its partial derivatives vanish everywhere, then I would be able to prove that $f$ is constant by applying the MVT and using the fact that $U$ is connected and open (hence, poligonally path-connected). To be fair, I wasn't even sure if that was true. I knew that simply having partial derivatives everywhere wasn't enough to guarantee differentiability, but I suspected that the additional condition on the partial derivatives being zero would give us differentiability, so that's what I aimed to prove. I think I managed to give a valid proof, but I was wondering whether someone here could double check it for me. The math started to get a bit messy…
My proof goes as follows:

Since each $\partial f/ \partial x_i=0$, in order to show that $f$ is differentiable, it suffices to prove that, for any $a \in U$, we have
$$\lim_{v \rightarrow 0}\frac{f(a+v)-f(a)}{|v|}=0.$$
To this end, let $v=(\alpha_1, \dots, \alpha_m) \in U$ be such that $a+v \in U$, and then notice that

$\displaystyle \begin{align} \frac{f(a+v)-f(a)}{|v|} & = \frac{1}{|v|} \left[\sum_{j=1}^{m-1} |\alpha_j e_j| \cdot \frac{f\left(a+\sum_{i=j}^m \alpha_i e_i \right)-f\left(a+\sum_{i=j+1}^m \alpha_i e_i \right)}{|\alpha_j e_j|} +|\alpha_m e_m| \cdot \frac{f\left(a+\alpha_m e_m \right)-f\left(a\right)}{|\alpha_m e_m|} \right] \\ &= \sum_{j=1}^{m-1} \frac{|\alpha_j|}{|v|} \frac{f\left(a+\sum_{i=j}^m \alpha_i e_i \right)-f\left(a+\sum_{i=j+1}^m \alpha_i e_i \right)}{|\alpha_j|} +\frac{|\alpha_m|}{|v|} \frac{f\left(a+\alpha_m e_m \right)-f\left(a\right)}{|\alpha_m|}. \end{align} \tag*{}$

Since all norms are equivalent in $\mathbb{R}^m$, we may consider $|v| := \max_{1 \leq k \leq m} \{|\alpha_k|\}$. Therefore,
$$\frac{|\alpha_i|}{|v|}=\frac{|\alpha_i|}{\max_{1 \leq k \leq m} \{|\alpha_k|\}}\leq \frac{|\alpha_i|}{|\alpha_i|}=1.$$
Hence, $\frac{|\alpha_i|}{|v|}$ is bounded as $v \rightarrow 0$ for each $i=1, \dots, m$. This, along with the observation that $v \rightarrow 0 \implies \alpha_i \rightarrow 0$, gives us

$\displaystyle \begin{align} \lim_{v \rightarrow 0} \frac{f(a+v)-f(a)}{|v|} & \leq \lim_{v \rightarrow 0} \left[\sum_{j=1}^{m-1} \frac{f\left(a+\sum_{i=j}^m \alpha_i e_i \right)-f\left(a+\sum_{i=j+1}^m \alpha_i e_i \right)}{|\alpha_j|} + \frac{f\left(a+\alpha_m e_m \right)-f\left(a\right)}{|\alpha_m|}\right] \\ & = \sum_{j=1}^{m-1} \frac{\partial f}{\partial x_j} \left(a+ \sum_{i=j}^{m} \alpha_j e_j\right)+ \frac{\partial f}{\partial x_m}(a) \\ & = 0 \end{align} \tag*{}$

since the partial derivatives of $f$ vanish everywhere. Thus, $$\lim_{v \rightarrow 0} \frac{f(a+v)-f(a)}{|v|}=0$$ for every $a \in U$. Equivalently, $f$ is differentiable, which guarantees that its differential is zero, so $f$ is constant.

Best Answer

All the partials exist and vanish; i.e they are clearly continuous. This implies $f$ is $C^1$. You can definitely use the mean-value inequality to show immediately that $f$ is constant on every ball (or more generally convex set, or even on a star-shaped open set). To go from here to a general connected set, you use a basic topological fact: a locally constant function on a connected topological space is constant.

It seems like the rest of your argument amounts to reproving a special case of “continuous partial derivatives implies (continuously Frechet) differentiable”, i.e you’re doing unnecessary work.

Related Question