If $g:[0,1] \to \Bbb{R}$ such that $g(x)=g(y) \implies g'(x)=g'(y)$ for all $x,y \in (0,1)$, then $g$ is monotonic?

Solution 1:

If $g$ is not monotone, then neither is the restriction $\def\eps{\epsilon}g|_{\smash{(0,1)}}$. Non-monotonicity on $(0,1)$ implies the existence of $0<a<b<1$ with (w.l.o.g.)

$$\gamma :=g(a)=g(b)\implies g'(a)=g'(b)=:\gamma'>0$$

(I can go into details here if needed, but it is not too hard to see using the intermediate value theorem and the mean value theorem, there are just a lot of annoying details pay attention to). So there is some $\def\eps{\epsilon}\eps>0$ with

$$g(a+x)>\gamma\quad\text{and}\quad g(b-x)<\gamma,\qquad\text{for all $x\in[0,\eps]$}.$$

Define $M:=\{x\in [a+\eps,b-\eps]\mid g(x)< \gamma\}$. Note that $M$ is non-empty, hence we can define $a^*:=\inf M\in(a,b)$. By continuity, we have $g(a^*)=\gamma\implies g'(a^*)=\gamma '>0$, implying the existence of $ \delta>0$ with

$$g(a^*+x) > \gamma,\qquad\text{for all $x\in[0,\delta]$}$$

in contradiction to the choice $a^*:=\inf M$.

$\qquad\qquad\qquad\qquad$

Solution 2:

Lemma: for any $d \in (0,1)$, if $g'(d) \ne 0$ and $g(d) \ne g(0)$ and $g(d) \ne g(1)$, then $\{ x \in [0,1] \mid g(x) = g(d) \}$ is closed, hence compact; discrete, hence finite; and finally is a singleton.

Proof: WLOG $g'(d) > 0$ (the proof of $g'(d) < 0$ is similar). It is clear that the set is closed, hence compact. Now, if $g(x) = g(d)$, then $g'(x) = g'(d) > 0$, so taking $\varepsilon = g'(x)/2$, we obtain $\delta$ such that $\left| \dfrac {g(x+h) - g(x)} {h} - g'(x) \right| < \dfrac {g'(x)} 2$ whenever $h \in (-\delta, \delta)$, so this is a neighbourhood of $x$ that contains only $x$ from the set, so the set is discrete. Since the set is compact and discrete, it follows that it is finite. Now that it is finite, if it has two distinct points, then there are two distinct points $x_1$ and $x_2$ from the set that are next to each other. But again using epsilon-delta on the derivative of the two points we would find two points between $x_1$ and $x_2$ such that the function is above $g(d)$ at one point and below $g(d)$ at another, and by IVT on the function it would have to pass through $g(d)$ again, contradicting the fact that $x_1$ and $x_2$ are the closest two points from the set.


If the function has positive derivative $g'(x)$ at a point $x$, then there is an open neighbourhood of the point where the function is trapped between two lines with slope $\frac12 g'(x)$ and $\frac32 g'(x)$:


WLOG assume $g(0) \le g(1)$, and we shall prove that $g$ is increasing.

Step 1: $g(1)$ is a global maximum.

Proof: Otherwise, there is $x_0 \in (0,1)$ with $g(x_0) > g(1)$ being the global maximum. To establish a contradiction, we find $x_R \in (x_0, 1)$ such that $g(1) < g(x_R) < g(x_0)$ and $g'(x_R) < 0$. This is a contradiction, as $g(0) < g(x_R) < g(x_0)$, so by IVT there should be $x_L \in (0,x_0)$ such that $g(x_L) = g(x_R)$, but the lemma says that the set $\{ x \in [0,1] \mid g(x) = g(x_R) \}$ is a singleton.

We now find the required $x_R$. First, let $x_1$ be the minimum value after $x_0$ such that $g(x_1) = \frac12[g(x_0) + g(1)]$, which exists because $\{ x \in [x_0,1] \mid g(x) = \frac12[g(x_0) + g(1)] \}$ is closed (hence compact) and non-empty (by IVT). Trivially we have $x_0 < x_1$, and that $g(x) > \frac12[g(x_0) + g(1)]$ whenever $x \in (x_0, x_1)$. We now obtain $x_R$ through MVT at the points $x_0$ and $x_1$.

Step 2: $g(0)$ is a global minimum.

Proof: Similar to Step 1.

Step 3: $g$ is increasing.

Otherwise, there would be $c<d$ such that $g(c) > g(d)$. We let $e$ be the smallest value after $c$ such that $g(e) = g(d)$, and then it is clear that $c < e$ and that $g(x) \in (g(d), g(c))$ whenever $x \in (c,e)$. We use MVT on $c$ and $e$ to obtain $x_R$ such that $g(d) < g(x_R) < g(c)$ and $g'(x_R) < 0$ as before, and derive a contradiction as before, noting that there must be $x_L \in (0,c)$ such that $g(x_L) = g(x_R)$.