# Proof: If $f'=0$ then is $f$ is constant

I'm trying to prove that if $f'=0$ then is $f$ is constant WITHOUT using the Mean Value Theorem.

My attempt [sketch of proof]: Assume that $f$ is not constant. Identify interval $I_1$ such that $f$ is not constant. Identify $I_2$ within $I_1$ such that $f$ is not constant. Repeat this and by the Nested Intervals Principle, there is a point $c$ within $I_n$ for any $n$ such that $f(c)$ is not constant... This is where I realized that my approach might be wrong. Even if it isn't I don't know how to proceed.

Thanks for reading and any help/suggestions/corrections would be appreciated.

• It does not really make sense to say $f(c)$ is not constant. It is one particular value. Commented Nov 6, 2011 at 18:08
• Personally, I would use the fundamental theorem of calculus to show that $f$ is constant, i.e. $f(b)-f(a) = \int_a^b f'(x)\mathrm{d}x = 0$ for any $a,b$ in the domain of definition of $f$. Commented Nov 6, 2011 at 18:15
• I was thinking of that too. It has been a while since I did analysis. Does the proof of the fundamental theorem depend on the MVT? Commented Nov 6, 2011 at 18:18
• @Heike I think that would be circular logic... The FTC is usually proven in two steps: 1) $\int_a^x f'(t) dt$ is an atiderivative of $f'$; 2) Any other antiderivative must differ from this by a constant, because exactly the result MMC is trying to prove. This is the "Calculus" proof, as noted below the real proof (in Analysis) relies on MVT. Commented Nov 6, 2011 at 18:19
• So, some of the proofs I am looking at use MVT to prove the fundamental theorem. Wouldn't that be circular though? Commented Nov 6, 2011 at 18:19

So we have to prove that $f'(x)\equiv0$ $\ (a\leq x\leq b)$ implies $f(b)=f(a)$, without using the MVT or the fundamental theorem of calculus.

Assume that an $\epsilon>0$ is given once and for all. As $f'(x)\equiv0$, for each fixed $x\in I:=[a,b]$ there is a neighborhood $U_\delta(x)$ such that $$\Biggl|{f(y)-f(x)\over y-x}\Biggr|\leq\epsilon\qquad\bigl(y\in\dot U_\delta(x)\bigr)$$ ($\delta$ depends on $x$). For each $x\in I\$ put $U'(x):=U_{\delta/3}(x)$. Then the collection $\bigl(U'(x)\bigr)_{x\in I}$ is an open covering of $I$. Since $I$ is compact there exists a finite subcovering, and we may assume there is a finite sequence $(x_n)_{0\leq n\leq N}$ with $$a=x_0<x_1<\ldots< x_{N-1}<x_N=b$$ such that $I\subset\bigcup_{n=0}^N\ U'(x_n)$. The $\delta/3$-trick guarantees that $$|f(x_n)-f(x_{n-1})|\leq \epsilon(x_n-x_{n-1}).$$ By summing up we therefore obtain the estimate $|f(b)-f(a)|\leq \epsilon(b-a)$, and as $\epsilon>0$ was arbitrary it follows that $f(b)=f(a)$.

• Ah, this is basically the proof I was trying to write down, but with no luck. +1 Commented Nov 6, 2011 at 21:16

Does the real line have gaps? That's the issue. Suppose you can partition the line into two sets $A$ and $B$, so that

• Every real number belongs to either $A$ or $B$;
• No number belongs to both;
• Every member of $A$ is less than every member of $B$;
• For every member of $A$, there is a larger number that is still a member of $A$;
• For every member of $B$, there is a smaller number that is still a member of $B$.

In that case, there would be no boundary point, such that every number less than that point is in $A$ and every number greater than that is in $B$. That would be a gap.

Now suppose $f(x) = 0$ if $x\in A$ and $f(x)=1$ if $x\in B$. Then $f\;'(x)=0$ for every value of $x$, but $f$ is not constant.

You can't prove every function whose derivative is everywhere $0$ is constant unless you rule out gaps. The proof of the mean value theorem conventionally relies on Rolle's theorem, which in turn relies on the fact that a continuous function on a closed interval has a maximum and a minimum in that interval. That theorem is not true unless the real line is gapless. A continuous function could increase on the set $A$ described above and decrease on $B$, and it would have no maximum.

The mean value theorem is how the gaplessness of the line gets involved in the proof that if $f\;'=0$ everywhere then $f$ is constant.

Probably you could find other ways of proving that, but they'd have to invoke gaplessness somehow.

• I wonder if an even better way to think about this begins by pointing out that domains of some functions have gaps of the kind described. If $f(x)=1/x$ then $f'(x)=1/x^2$ is always positive. But it decreases as $x$ goes from $-1$ to $+1$. That is of course because of the "gap" at $0$. The rule that if $f'>0$ then the function increases does not apply when such gaps intervene, and the maximum value theorem also doesn't apply, and the intermediate value theorem, and the mean value theorem. Proving all of those depends on having no gaps in the domain between the specified points. Commented Nov 7, 2011 at 17:33
• It is beyond me how this answer got nine votes. It doesn't even try to bring the notion of derivative into the picture. All we hear is that ${\mathbb R}$ has no gaps. Commented Nov 7, 2011 at 20:39
• @Christian It does bring in derivatives where it gives an example of a non-constant function whose derivative is everywhere zero. The point is that gaplessness is needed; otherwise the proposed theorem is false. Commented Nov 7, 2011 at 21:32
• I think what you're saying is that, for example, if $f \colon [0,1] \cup [2,3] \rightarrow \mathbb{R}$, then $f'(x)=0$ implies $f$ is constant on each connected component of its domain, but not necessarily the same constant. If your function is $f \colon \mathbb{R} \rightarrow \mathbb{R}$ and $f' \colon \mathbb{R} \rightarrow \mathbb{R}$ is identically zero, then what MathMathCookie wrote is true. Since this question seems like it's from a low level calculus course, I think MathMathCookie is intending that $f$ has domain $\mathbb{R}$ or at least a domain which is connected. Commented Nov 7, 2011 at 21:50
• I had in mind things more like $(-\infty,0)\cup(0,\infty)$. The set $[0,1]\cup[2,3]$ does not have a "gap" in the sense defined in the answer I posted. Commented Nov 8, 2011 at 1:11

Depending on how much technology you want to use, you could perhaps use the fact that $H^0_{\text{dR}}(\mathbb{R}^n) \cong \mathbb{R}$. (This follows from $\mathbb{R}^n$ being homotopy equivalent to a point) Hence any closed $0$-form (so any function smooth function $f:\mathbb{R} \rightarrow \mathbb{R}$ with $df=0$) is constant.

I think that all of this doesn't use the Mean Value Theorem, but I guess it's a bit of an overkill...

There's a constructive proof of this fact (which uses dependent choice), though it can easily be altered into a non-constructive proof which does not use dependent choice.

Suppose given $$a \leq b$$ and $$f: (a, b) \to \mathbb{R}$$ which is differentiable on $$(a, b)$$, and suppose that for all $$x \in (a, b)$$, $$f'(x) = 0$$. Take $$c, d \in (a, b)$$ such that $$c < d$$. We will show that $$f(c) \geq f(d)$$.

Proof: We note that $$f(c) \geq f(d)$$ iff it is not the case that $$f(c) < f(d)$$ - this is true constructively. Suppose now that $$f(c) < f(d)$$.

We will construct a sequence of pairs $$\{(c_i, d_i)\}_{i = 0}^\infty$$ such that for all $$i \in \mathbb{N}$$, $$f(d_i) > f(c_i) + (f(d) - f(c)) / 2^{i+1}$$; furthermore, $$\{c_i\}$$ will be monotonically increasing sequence while $$\{d_i\}$$ will be monotonically decreasing, and we will have $$d_i = c_i + (d - c) 2^{-i}$$.

Define $$c_0 = c$$ and $$d_0 = d$$. Then we have $$c \leq c_0 \leq d_0 \leq d$$, and we have $$f(d) > (f(d) + f(c))/2$$ and therefore $$d_0 > c_0 + (d - c)/2$$; and clearly, we have $$d_0 = c_0 + (d - c) / 2^0$$. Now suppose we have $$c_i$$ and $$d_i$$ satisfying the above properties. Then we have $$f(c_i) + (f(d) - f(c)) / 2^{i+2} < f(d_i) - (f(d) - f(c)) / 2^{i + 2}$$. Let $$m = (c_i + d_i) / 2$$. By the locatedness property of Dedekind cuts, we either have $$f(m) > f(c_i) + (f(d) - f(c)) / 2^{i+2}$$ or $$f(m) < f(d_i) - (f(d) - f(c)) / 2^{i + 2}$$. Using dependent choice, we either choose $$(c_{i + 1}, d_{i + 1}) = (c_i, m)$$ in which case $$f(m) > f(c_i) + (f(d) - f(c)) / 2^{i + 2}$$, or we choose $$(c_{i + 1}, d_{i + 1}) = (m, d_i)$$ in which case $$f(m) < f(d_i) + (f(d) - f(c)) / 2^{i + 2}$$; in either case, we have $$d_i = c_i + (d - c) / 2^{i + 1}$$; and we have $$f(d_{i + 1}) > f(c_{i + 1}) + (f(d) - f(c)) / 2^{i + 2}$$; and we have $$c_i \leq c_{i + 1}$$ and $$d_i \geq d_{i + 1}$$.

Now the $$c_i$$ and $$d_i$$ are clearly Cauchy sequences which converge to the same value; call the limit $$x$$. We see that $$c \leq x \leq d$$; then $$x \in (a, b)$$; then $$f'(x) = 0$$. Then $$\lim\limits_{h \to x} \frac{f(h) - f(x)}{h - x} = 0$$. This implies that for all $$\epsilon$$, there is some $$\delta$$ such that for all $$h \in (x - \delta, x + \delta)$$, $$|f(h) - f(x)| \leq \epsilon |h - x|$$ and therefore, for all $$h_1 \in (x - \delta, x]$$ and $$h_2 \in [x, x + \delta)$$, $$|f(h_2) - f(h_1)| \leq \epsilon (h_2 - h_1)$$. But now set $$\epsilon = \frac{f(d) - f(c)}{2(d - c)}$$ and take an appropriate $$\delta$$. Take $$i$$ such that $$c_i \in (x - \delta, x]$$ and $$d_i \in [x, x + \delta)$$. Then $$f(d_i) - f(c_i) > \frac{f(d) - f(c)}{2^{i + 1}} = \epsilon \frac{d - c}{2^i} = \epsilon (d_i - c_i)$$. Contradiction. Then it cannot be the case that $$f(c) < f(d)$$; then $$f(c) \geq f(d)$$.

The same argument shows that $$f(c) \leq f(d)$$. Therefore, whenever $$c < d$$, we have $$f(c) = f(d)$$.

Finally, take arbitrary $$x, y \in (a, b)$$. Then $$a < x$$ and $$a < y$$. Take rational numbers $$r \in (a, x)$$ and $$p \in (a, y)$$; let $$w = \min(r, p)$$. Then $$w < x$$ and $$w < y$$. Then $$f(w) = f(x)$$ and $$f(w) = f(y)$$; then $$f(x) = f(y)$$. Then $$f$$ is constant. QED.