Continuous function whose right hand derivative equals 0 is constant?

Solution 1:

Yes, $f$ is necessarily constant.

One can proceed similarly as in the proofs of the mean value theorem and Rolle's theorem for differentiable functions.

It suffices to show that $f(c) = f(d)$ for $a < c < d < b$. The continuity of $f$ then implies that $f$ is constant on $[a, b]$.

Assume that $f(c) \ne f(d)$, without loss of generality $f(c) < f(d)$. Consider the function $$ g(x) = f(x) - (x-c)\frac{f(d)-f(c)}{d-c} $$ for $x \in [c, d]$. The right-hand derivative of $g$ is $$ g_+'(x) = f_+'(x) - \frac{f(d)-f(c)}{d-c} = - \frac{f(d)-f(c)}{d-c} < 0 $$ for all $x \in [c, d)$.

But $g(c) = g(d)$, so that $g$ attains its minimum at a point $x_0 \in [c, d)$, where $$ g_+'(x_0) = \lim_{x \to x_0^+} \frac{g(x)-g(x_0)}{x-x_0} \ge 0 \, , $$ which is a contradiction. This completes the proof.

Solution 2:

Given $\epsilon>0$, we find for each $x\in[a,b)$, the set $$ A_x:=\{\,\xi\in[a,b]\mid \xi>x,\left|\tfrac{f(\xi)-f(x)}{\xi-x}\right|\le \epsilon \,\}$$ contains some open interval $(x,y)$. Let $y^*(x)$ be the supremum of all $y$ with $(x,y)\subseteq A_x$. Clearly, $y^*(x)>x$. By continuity, $y^*(x)\in A_x$.

Suppose $y^*(a)<b$. Then for $y^*(a)<\xi<y^*(y^*(a))$, we have $$\frac{f(\xi)-f(a)}{\xi-a}=\frac{\xi-y^*(a)}{\xi-a}\cdot\frac{f(\xi)-f(y^*(a))}{\xi-y^*(a)}+ \frac{y^*(a)-a}{\xi-a}\cdot\frac{f(y^*(a))-f(a)}{y^*(a)-a},$$ which is a convex combination of numbers $\in[-\epsilon,\epsilon]$. We conclude that $\xi\in A_a$. It follows that $y^*(a)\ge y^*(y^*(a))$, contradiction. We conclude that $y^*(a)=b$, so $A_a=(a,b]$. As $\epsilon$ was arbitrary, $f$ must be constant.