A function with a non-negative upper derivative must be increasing? I am trying to show that if $f$ is continuous on the interval $[a,b]$ and its upper derivative $\overline{D}f$ is such that $ \overline{D}f \geq 0$ on $(a,b)$, then $f$ is increasing on the entire interval. Here $\overline{D}f$ is defined by
$$
\overline{D}f(x) = \lim\limits_{h \to 0} \sup\limits_{h, 0 < |t| \leq h} \frac{f(x+t) - f(x)}{t} 
$$
I am not sure where to begin, though. Letting $x,y \in [a,b]$ be such that $x \leq y$, suppose for contradiction that $f(x) > f(y)$, then continuity of $f$ means that there is some neighbourhood of $y$ such that $f$ takes on values strictly less than $f(x)$ on this neighbourhood. Now I think I would like to use this neighbourhood to argue that the upper derivative at $y$ is then negative, but I cannot see how to complete this argument.
Any help is appreciated! :)
 A: Probably not the best approach, but here is an idea: show taht MVT holds in this case:
Lemma Let $[c,d]$ be a subinterval of $[a,b]$. Then there exists a point $e \in [c,d]$ so that 
$$\frac{f(d)-f(c)}{d-c}=\overline{D}f(e)$$
Proof:
Let $g(x)=f(x)-\frac{f(d)-f(c)}{d-c}(x-c) \,.$
Then $g$ is continuous on $[c,d]$ and hence it attains an absolute max and an absolute minimum. Since $g(c)=g(d)$, then either $g$ is constant, or one of them is attatined at some point $e \in (c,d)$. 
In the first case you can prove that $\overline{D}g=0$ on $[c,d]$, otherwise it is easy to conclude that $\overline{D}g(e)=0$.
Your claim follows immediately from here.
A: This is based on David's comment above. 
Choose $u,v, \epsilon$ such that $ a < u < v < b$ and $ \epsilon > 0 $. 
Let $$ S = \{ x \in [u,v] : f(x) + \epsilon x \geq f(u) + \epsilon u \}.$$ $S$ is not empty as $ u \in S$ and $S$ is closed as $f$ is continuous. 
Let $\sup S = t$, $t$ is in $S$ as $S$ is closed. We will show $t=v$.
If $ t < v$, then define for $ \delta \in (0, v- t] $, $g(\delta) = \sup_{0 < h \leq \delta} \dfrac{f(t+h) - f(t)}{h}$. 
Since $g(\delta)$ decreases to $\overline{D}f(t) \geq 0$  as $ \delta \to 0^+$, we must have $ g(\delta) > -\epsilon $ for sufficiently small positive $\delta$, and this means, the set $g(\delta)$ is a supremum of, must contain an element greater than $-\epsilon$. Hence there is a $t_1 \in (t,v]$ with $\dfrac{f(t_1) - f(t)}{t_1 - t} > -\epsilon$, we have $f(t_1) + \epsilon t_1 > f(t) + \epsilon t \geq f(u) + \epsilon u$, i.e., $t_1 \in S$. This contradiction implies $v = \sup S$ and $f(v) \geq f(u ) + \epsilon (v - u)$. Letting $\epsilon \to 0$, we have $f(v) \geq f(u)$. Hence $f$ is non-decreasing on $(a,b)$. This can be extended to all of $[a,b]$ by keeping $v$ fixed and letting $u \to a$ and keeping $u$ fixed and letting $v \to b$. 
A: The following is in response to a recent comment to my answer of Dini or Right or upper derivative of Weierstrass function.
Corollary 11.4.1 on p. 128 of [1] (proved concisely on p. 128), and V.34.1 on pp. 200-201 of [2] (proved in detail on pp. 201-202), each state a result that is slightly stronger than the following, where $D^{+}f$ is the right upper Dini derivate of $f.$

Let $I$ be an open interval in $\mathbb R$ and let $f:I \rightarrow {\mathbb R}$ be a function. If $f$ is continuous and $D^{+}f \geq 0$ on $I$ for all but countably many $x \in I,$ then $f$ is non-decreasing on $I.$

PROOF: (adapted from [1] and [2]) We first prove the weaker result that $D^{+}f(x) > 0$ (strict inequality) for all but countably many $x \in I$ implies that $f$ is non-decreasing on $I.$ Let $Z = \{x \in I: \; D^{+}f(x) \leq 0\}$ be the countable set at which $D^{+}f(x) > 0$ is not assumed. (Note that we are not claiming that $D^{+}f(x) \leq 0$ for all $x \in Z.)$ For a later contradiction, assume that $f$ is not non-decreasing on $I.$ Then there exist $a \in I$ and $b \in I$ such that $a < b$ and $f(b) < f(a).$ Choose $y_0 \in I$ such that $f(b) < y_0 < f(a)$ and $y_0 \notin f(Z) = \{f(x): \; x \in Z\}.$ This is clearly possible because there are uncountably many numbers between $f(b)$ and $f(a)$ and only countably many numbers in $f(Z).$ Let $E = \{x \in [a,b]: \; y_0 \leq f(x)\}.$ Note that $E \neq \emptyset$ because $a \in E.$ Thus, $\sup E$ exists. Let $x_0 = \sup E.$ I claim that $f(x_0) = y_{0}.$ For a later contradiction, suppose $f(x_0) > y_{0}.$ (Yes, a proof by contradiction within a proof by contradiction. This means careful reading is needed.) Since $f(b) < y_{0},$ it follows that $x_0 \neq b.$ Now by definition of $x_{0},$ we have $f(x) < y_0$ for all $x$ such that $x_0 < x \leq b.$ Hence, $\lim_{x \rightarrow x_{0}^{+}}f(x) \leq y_0.$ (Note that strict $<$ becomes $\leq$ after the limit is applied to both sides of $f(x) < y_0.)$ But we also have $y_0 < f(x_0)$ by our assumption (to be contradicted), so it follows that $\lim_{x \rightarrow x_{0}^{+}}f(x) < f(x_0),$ which contradicts (right) continuity of $f$ at $x = x_{0}.$ (In fact, both [1] and [2] deal with a weaker assumption than right continuity that also provides a contradiction at this point in the proof.) A proof that $f(x_0) < y_{0}$ also leads to a contradiction can be done in a similar way, so I’ll skip the details. Thus, we have $f(x_0) = y_{0},$ and hence $D^{+}f(x_0) \leq 0,$ which contradicts our choice of $y_0$ as not being an element of $Z.$ (Recall that the only possible points where $D^{+}$ can fail to be strictly positive are the points in $Z.)$
To prove the stronger result that $D^{+}f(x) \geq 0$ (non-strict inequality) for all but countably many $x \in I$ implies that $f$ is non-decreasing on $I,$ roughly what is done is to apply the just proved result to functions of the form $f_{\epsilon}(x) = f(x) + {\epsilon}x$ and let $\epsilon \rightarrow 0.$ The details are in [2] (top half of p. 202), but I believe this is a standard technique that can be found in many real analysis texts.
Incidentally, note that although the assumption is that $D^{+}f(x) \geq 0$ for all but countably many $x \in I,$ the result itself implies (among other things) that $D^{+}f(x) \geq 0$ for ALL $x \in I,$ because for non-decreasing functions $f$ we have $D^{+}f(x) \geq 0$ everywhere (indeed, all four Dini derivates will be $\geq 0$ everywhere).
[1] Andrew Michael Bruckner, Differentiation of Real Functions, 2nd edition, CRM Monograph Series #5, American Mathematical Society, 1994, xii + 195 pages. Review in Bull. AMS of 1980 1st edition [Note: The result above is also in the 1980 1st edition, same chapter-section-item number, but the page numbers are different.]
[2] Edward James McShane, Integration, Princeton Mathematical Series #7, Princeton University Press, 1944, viii + 392 pages. Review in Bull. AMS [No other editions were published, but the later re-printings are viii + 394 pages due to the addition of a 2-page Appendix at the end.]
A: The statement is not true. The Weierstrass function has upper derivative greater than zero everywhere, it is continuous, and it is not an increasing function. This question comes as an error in Royden, and should read that the lower derivative of $f$ is greater than or equal to zero, per this errata.
http://www2.math.umd.edu/~pmf/docs/Real%20Analysis.pdf
A: Let $ f:[a,b]→\Bbb{R}$ be a continuous function such that one of Dini's one-sided derivatives exists and positive. Then it can be shown $f$ is monotonically non-decreasing on $[a,b]$.
Assume, $D^{+} f(t):=lim sup_{\delta \to 
 0+} {\frac{f(t+\delta )−f(t)}{\delta}}$ exists and positive i.e $D^+{f(x)} >0, \space \forall x\in [a, b]$
Claim: $f$ is monotonically non-decreasing on $[a,b]$.
Suppose, $f$ fails to be non-decreasing on $[a,b]$.
Then, $\exists  c, d $ with $a\le c<d\le b$ such that $f(c) >f(d) $
Let, $y\in (f(d), f(c)) $
Since, $f\in C[a, b]$ , by Intermediate Value Theorem, $\exists t \in [c, d]$ such that $ f(t) =y$
Then, the set $\{x : f(x) =y\}\cap [c, d] $ is non empty.
Suppose, $x_o=Sup\{x : f(x) =y\}\cap [c, d]  \}$
Now, $f(d) <y$ and $f$ is continuous implies $x_o<d$
Thus, $f(x) <y, \forall x\in (x_o, d]$
And the set $\{x : f(x) =y \}$  is closed as $f$ is continuous, so $f(x_o) =y$
And, this implies that $D^+ { f(x_o) } \le 0$
Hence, a contradiction.
Hence, if $f$ is continuous and $D^+{f(x)} > 0,\space \forall x\in [a, b] $ then $f$ must be non -decreasing on $[a, b]$ $($ in fact, $f$ is strictly increasing on $[a, b]) $
