Nonnegative derivative that is not identically zero on any interval implies increasing

Statement

On an open interval

Suppose $f$ is a function on an open interval $I$ that may be infinite in one or both directions (i..e, $I$ is of the form $\! (a,b)$, $(a,\infty)$, $(-\infty,b)$, or $(-\infty,\infty)$). Suppose the derivative of $f$ exists and is nonnegative everywhere on $I$, i.e., $\! f'(x) \ge 0$ for all $x \in I$. Further, suppose that there is no sub-interval of $I$ such that $f'(x) = 0$ for all $x$ in the sub-interval. Then, $f$ is an increasing function on $I$, i.e.:

$x_1,x_2 \in I, x_1 < x_2 \implies f(x_1) < f(x_2)$

On a general interval

Suppose $f$ is a function on an interval $I$ that may be infinite in one or both directions and may be open or closed at either end. Suppose $f$ is a continuous function on all of $I$ and that the derivative of $f$ exists and is nonnegative everywhere on the interior of $I$, i.e., $\! f'(x) \ge 0$ for all $x \in I$ other than the endpoints of $I$ (if they exist). Further, suppose that there is no sub-interval of $I$ such that $f'(x) = 0$ for all $x$ in the sub-interval. Then, $f$ is an increasing function on $I$, i.e.:

$x_1,x_2 \in I, x_1 < x_2 \implies f(x_1) < f(x_2)$

Formulation and relationship between the formulations

The following is true:

The derivative is zero only at isolated points, i.e., the set of points at which the derivative is zero is a discrete subset of the reals $\implies$ The derivative is not zero on any interval

Thus, the condition of derivative not being zero on any interval can be replaced by the stronger condition that the derivative is zero only at isolated points. The resulting statement is somewhat weaker (i.e., less powerful) because it assumes a stronger hypothesis on the function. In other words, there do exist functions that satisfy the hypothesis with the not zero on any interval version and are hence increasing but where the set of points for the derivative to be zero is not a discrete subset. (See example below).

For most practical purposes, the isolated points formulation suffices.

Example

Typical example: point of inflection with horizontal tangent

These are examples where a critical point (point of derivative being zero) coincides with a point of inflection (point where second derivative changes sign). To the left of the critical point, the derivative is positive and decreasing. At the critical point, the derivative becomes zero, attaining its local minimum. To the right of the critical point, the derivative is positive and decreasing. Thus, the function itself is increasing on the left of the critical point and increasing on the right of the critical point. Although the derivative drops to zero at the critical point, the function does not actually stop increasing.

Function General expression for derivative Why the derivative is always nonnegative Points where the derivative is zero Graph of function (blue) with derivative (purple)
cube function $x \mapsto x^3$ on all of $\R$ $x \mapsto 3x^2$ it's a positive constant times a square at $x = 0$ only.
$x \mapsto x - \sin x$ on all of $\R$ $x \mapsto 1 - \cos x$ We use that $\cos x \le 1$ for all $x \in \R$ at integer multiples of $2\pi$ only. This forms a discrete set, i.e., they are all isolated points. Fill this in later

Example to illustrate the distinction with the isolated points version

Consider the function:

$g(x) := \left\lbrace\begin{array}{rl}|x\sin(1/x)|, & x \ne 0 \\ 0, & x = 0 \\\end{array}\right.$

$g$ is a continuous function, and we can hence define:

$f(x) := \int_0^x g(t) \, dt$

Thus, by the fundamental theorem of calculus, $\! f' = g$. Note that by definition, $g(x) \ge 0$ for all $x$, because the outer part of the composite is an absolute value function. Also, the set of points where $g(x) = 0$ is $\{ 0 \} \cup \{ 1/(n\pi) : n \in \mathbb{Z} \}$, which is not a discrete set (in particular, the point 0 is not an isolated point and is in fact a limit point). However, it is true that the zero set of $g$ does not contain any intervals, and hence we can still conclude that $f$ is an increasing function on all of $\R$.