Proving a continuous function is a constant

Let $$f$$ be a function that is continuous on an interval $$[a,b]$$ and differentiable on $$(a,b)$$. Assume $$f'(x)=0$$ for all $$x\in (a,b)$$. Show f is a constant.

I feel like the obvious set up is by contradiction. If I assume $$f$$ is not a constant, then it must have a variable, but I'm unsure how to construct an $$f$$ (without loss of generality) which I can then differentiate to contradict $$f'(x)=0$$.

any suggestions to start this proof?

• Do you know the mean value theorem? – Randall Nov 29 '18 at 4:07
• doesn't that rely on the assumption that $f(a)=f(b)$ though? – Jess Savoie Nov 29 '18 at 4:10
• No. You may be thinking of Rolle. – Randall Nov 29 '18 at 4:11
• Why don't we try using the very definition of differentiation? – Aniruddha Deshmukh Nov 29 '18 at 4:11
• @AniruddhaDeshmukh: Because that would be much more difficult than using the mean value theorem. See for example, Tim Gowers's discussion here: dpmms.cam.ac.uk/~wtg10/meanvalue.html – Hans Lundmark Nov 29 '18 at 5:50

Let, $$x,y\in [a,b]$$ then by Mean value theorem we have, $$f(x)-f(y)=(x-y)f'(\xi)$$ for some $$x<\xi and as given $$f'(t)=0,\forall t\in(a,b)$$ so, $$f'(\xi)=0\implies f(x)=f(y),\forall x,y\in[a,b]$$

Hence, $$f$$- is constant.

We have to show: $$(f'(x)=0 \implies f(x)=C) \ni \text{C is a constant}$$

Which is nothing but, $$P\implies Q$$.

Suppose: $$\lnot (P\implies Q)$$

Which is nothing but, $$P \land \lnot Q$$

Therefore, suppose: $$f'(x)=0 \land f(x)=h(x) \ni \text{h(x) is an arbitrary non-constant function}$$

[$$(h'(x)\neq 0)(\forall x\neq C^p_n)$$; where $$C^p$$ is the critical point, and $$n$$ is an arbitrary index.] This bit is not really relevant since, we are comparing $$f(x)$$ and $$h(x)$$ on $$A\subseteq D$$ where the functions are identical: f(x)=h(x).

Notice, however, $$\frac{d}{dx}f(x)=\frac{d}{dx}h(x)$$

$$\frac{df}{dx}=\frac{dh}{dx}$$

Recall that we assumed: $$h(x) \text{ is an arbitrary non-constant function}$$

Therefore,

$$\frac{dh}{dx}=[k(x) \lor L]$$ Where $$k(x)$$ is an arbitrary function not equal to zero and $$L$$ is an arbitrary non-zero constant.

However, in either case:

$$\frac{dh}{dx}\neq0=\frac{df}{dx}=f'(x)$$

Therefore, since $$\lnot (P\implies Q) \implies \bot$$, then:

$$(P\implies Q)\implies \top$$

• I'm not sure all the logic actually helps. Also, the non-constant function $h(x) = \begin{cases} 1, & x \geq 0\\ -1, & x<0\end{cases}$ has $h'(x)=0$ (at all but one point) but isn't constant, which complicates your argument. – Randall Nov 29 '18 at 15:02
• @Randall I thought the logical mechanism might be useful. That said, $(h'(x)\neq 0)(\forall x\neq C^p_n)$; where $C_p$ is the critical point, and $n$ is an arbitrary index. Other than that, thanks for the input. – Bertrand Wittgenstein's Ghost Nov 29 '18 at 18:16

Let f be a function that is continuous on an interval [a,b] and differentiable on (a,b)\$

1) that means for all $$a \le a' < b' \le b$$ then $$f$$ is continuous on the interval $$[a', b']\subset [a,b]$$ and differentiable on $$(a',b') \subset (a,b)$$.

and

2) The mean value thereom applies.

So for any $$a \le a' < b' \le b$$ we have that there is a $$c; a' < c < b'$$ where $$f'(c) = \frac {f(b') - f(a')}2$$.

But $$f'(c) = 0$$ so $$f(b') = f(a')$$ for all $$a \le a' < b' \le b$$.

So $$f$$ is constant in the interval $$[a,b]$$ (can't say anythin about $$f$$ outside that interval.)

Here is an alternate proof which bypasses the Mean Value Theorem, and which I hope might be more conducive to visualization. First, I'll start off with a small topological lemma to abstract out that part of the argument:

Lemma: Suppose $$A \subseteq [0, 1]$$ satisfies $$0 \in A$$, $$A$$ is closed under the left half-interval topology, and $$A$$ is open under the right half-interval topology. Then $$A = [0, 1]$$.

Proof (outline): Let $$B := \{ x \in [0, 1] \mid [0, x] \subseteq A \}$$ and $$c := \sup B$$ (using the fact that $$0 \in B$$ so $$B$$ is nonempty) and suppose that $$c < 1$$. Then from the condition that $$A$$ is closed under the left half-interval topology, we can conclude that $$c \in B$$. On the other hand, the fact that $$A$$ is open under the right half-interval topology will now give a contradiction. Therefore, $$c = 1$$; and again, from the condition that $$A$$ is closed under the left half-interval topology, this will imply that $$1 \in B$$, so $$A = [0, 1]$$ as desired. $$\square$$

Now, to use this: to illustrate the essential points of the argument, I will restrict to the case where the domain of $$f$$ is $$[0, 1]$$ and $$f(0) = 0$$. The more general case should be straightforward to prove in a similar manner. Now, fix any $$\epsilon > 0$$, and let $$A_\epsilon := \{ x \in [0, 1] \mid |f(x)| \le \epsilon x \}$$. Then $$0 \in A_\epsilon$$; and it should be straightforward to see that $$A_\epsilon$$ is closed in the usual topology, and therefore also closed in the left half-interval topology. On the other hand, suppose $$x \in A_\epsilon$$; then from the hypothesis $$f'(x) = 0$$, we see that there exists $$\delta > 0$$ such that whenever $$0 < |y-x| < \delta$$, then $$\left| \frac{f(y) - f(x)}{y - x} \right| < \epsilon$$. Then, if in addition $$y > x$$, it follows that $$|f(y)| \le |f(x)| + |f(y) - f(x)| < \epsilon x + \epsilon |y-x| = \epsilon y$$; this shows that $$A_\epsilon$$ is open in the right half-interval topology. Now from the lemma, it follows that $$A_\epsilon = [0, 1]$$.

In summary, we have shown that $$\forall \epsilon > 0, \forall x \in [0, 1], |f(x)| \le \epsilon x$$. We may now interchange the two quantifiers to conclude $$\forall x \in [0, 1], \forall \epsilon > 0, |f(x)| \le \epsilon x$$. However, this easily implies $$\forall x \in [0, 1], f(x) = 0$$.

Well, $$f'(x)$$ gives the rate of change of $$f$$ at a point $$x$$. If $$f'(x)=0 \forall x \in (a,b)$$, then $$f(x)$$ isn't changing, i.e. it is constant, on $$(a,b)$$.

That's the idea, you just need to show it mathematically.