# Why does zero derivative imply a function is locally constant?

I've been trying to prove to myself that if $\Omega$ is an open connected set in $\mathbb{R}^n$, then if $f\colon\Omega\to\mathbb{R}^m$ is a differentiable function such that $f'(x)=0$ for all $x\in\Omega$, then $f$ is constant.

I've reduced the problem to just showing $f$ is locally constant on $\Omega$. Given $x_0\in\Omega$, I know that $$\lim_{x\to x_0}\frac{\|f(x)-f(x_0)-f'(x_0)(x-x_0)\|}{\|x-x_0\|}=\lim_{x\to x_0}\frac{\|f(x)-f(x_0)\|}{\|x-x_0\|}=0.$$

This implies $\lim_{x\to x_0}\|f(x)-f(x_0)\|=0$. So for any $\epsilon>0$, there exists some open ball $B(x_0,\delta)$ around $x_0$ in $\Omega$ such that $\|f(x)-f(x_0)\|<\epsilon$ for $x\in B(x_0,\delta)$. But since the choice of the open ball changes with $\epsilon$, I don't think I can conclude $\|f(x)-f(x_0)\|=0$ for $x\in B$. So this doesn't convince me that there actually exists a neighborhood of $x_0$ on which $f$ is constant.

How can you make the leap from zero derivative to locally constant?

• Have you come across the mean value theorem? Jul 19, 2013 at 16:52
• Restrict to an open ball contained in the domain so that segments $[x_0,x]$ be contained in the domain of $f$. Then consider the function $f((1-t)x_0+tx)$ of the real variable $t$. Jul 19, 2013 at 17:04
• @julien Thanks. Is the point that if $g(t)=f((1-t)x_0+tx)$, then there exists $c\in (0,1)$ such that $g(1)-g(0)=g'(c)$. But $g(1)=f(x)$, $g(0)=f(x_0)$, and $g'(c)=0$ since $f$ has zero derivative, which implies $f(x)=f(x_0)$. Since there is a segment contained in the ball from $x_0$ to any other $x$, this shows $f$ is constant on the ball? Jul 19, 2013 at 17:31
• Simply, since $g(t)=f((1-t)x_0+tx)$ is differentiable on an open interval containing $[0,1]$ with zero (whence continuous) derivative by chain rule, FTC yields $f(x)-f(x_0)=g(1)-g(0)=\int_0^1g'(t)dt=0$. Of course, the MVT works as well, but attention: you need to consider $t\longmapsto (g(t),v)$ for a fixed vector $v$ as Peter did. Jul 19, 2013 at 17:34
• @julien Thank you for explaining. Jul 19, 2013 at 17:38

Recall that an open connected set is $$\Bbb R^n$$ is polygonally connected. The generalized mean value theorem says that if $$f:\Omega\subseteq \Bbb R^n\to\Bbb R^m$$ is differentiable in the open set $$\Omega$$ then for each $${\bf a,b}\in\Omega$$ such that $$\mathscr L({\bf a},{\bf b})\subseteq \Omega$$ and any $$\bf w\in\Bbb R^m$$ there exists a $$\bf z$$ in the line joining $$\bf a$$ and $$\bf b$$ such that $${\bf w}\cdot (f({\bf b})-f({\bf a}))={\bf w} \cdot {\rm D}f({\bf z})({{\bf b}}-{\bf a})$$

Since the derivative vanishes, this says that the dot product of $$f({\bf b})-f({\bf a})$$ with every vector in $$\Bbb R^m$$ is zero, so we must have $$f({\bf b})=f({\bf a})$$ for each $${\bf b},{\bf a}\in\Omega$$.

I think it is worth adding a proof of both claims. First, let's show that

Every open connected set $$\Omega$$ in the Euclidean space is polygonally connected.

P Fix a point $$x\in \Omega$$, and let $$S$$ denote the set of points that can be joined by a polygonal path to $$x$$. Note $$S$$ is nonempty, for $$x\in S$$. Let $$T=\Omega\smallsetminus S$$. Then $$S\cup T=\Omega, S\cap T=\varnothing$$. We will show both $$S$$ and $$T$$ are open, which will force $$T=\varnothing$$; as desired.

Let $$a\in S$$, and join $$a$$ to $$x$$ by a polygonal path. Since $$\Omega$$ is open, there exists a ball $$B(a)$$ such that $$B(a)\subseteq \Omega$$. But if $$a'\in B(a)$$; we can join $$a$$ to $$a'$$ and subsequently $$a'$$ to $$x$$ by a polygonal path, since $$B(a)$$ is convex. Thus $$B(a)\subseteq S$$, and $$S$$ is open.

Now let $$b\in T$$. Since $$\Omega$$ is open, there is a ball $$B(b)\subseteq \Omega$$. If we could join a point $$b'\in B(b)$$ to $$x$$, then we would join $$b$$ to $$x$$, since $$B(b)$$ is convex. Since this cannot be possible, we have $$B(b)\subseteq T$$, and $$T$$ is open.

But then, since $$\Omega$$ is connected and $$S\neq \varnothing$$, we must have $$T=\varnothing$$. Since $$x$$ was arbitrary, this proves the claim. $$\blacktriangle$$

The proof of the generalized MVT is a consequence of the usual unidimensional mean value theorem. Pick $${\bf x},{\bf y}$$ and let $${\bf u}={\bf y}-{\bf x}$$. Pick $$\bf w$$ and define $$F(t)={\bf w}\cdot f({\bf x}+t{\bf u})$$

so that for $$t\in(-\delta,1+\delta)$$ with $$\delta >0$$ small enough we have $${\bf x}+t{\bf u}\in \Omega$$. Apply the mean value theorem to $$F$$, whose derivative is $$F'(t)={\bf w}\cdot {\rm D}f({\bf x}+t{\bf u})({\bf u})$$

A cute direct proof (styled after path connectedness ones) is to pick any point $$x$$ in the domain and consider the set $$U$$ on which $$f$$ takes the value $$f(x)$$ and the set $$V$$ on which it does not take this value. These sets are non empty if the hypothesis fails. Clearly $$V$$ is open, so we are done if $$U$$ is open.

It is enough to prove that around any $$y\in U$$ there is a ball also in $$U$$. But choosing any ball $$U'$$ containing $$y$$, we note that any other point $$x'\in U'$$ is connected to $$y$$ by a line, and that the function restricted to that line is differentiable with derivative zero.

Now it is a standard 1D problem. If we consider a function $$g(t)=f(y+t(x'-y))-f(y)-\Delta t$$ on that line with $$\Delta$$ chosen such that $$g$$ vanishes at either end, then it achieves its maximum/minimum at some point and its derivative vanishes there. This implies $$\Delta$$ is zero and so $$f$$ took the same value at either end. (This is a compressed proof/reminder of MVT and Rolle.)