Sufficient and necessary condition for strictly monotone differentiable functions I read from a book without proof the following theorem: Let $f(x)$ be a differentiable function, then $f(x)$ is strictly increasing if and only if $f'(x) \geq 0$, and $f'(x) \gt 0$ almost everywhere. Is it correct? I doubt, but I could neither prove it nor give a counter example. 
 A: A necessary and sufficient condition is that $f^\prime\ge0$ everywhere and $f^\prime > 0$ on a dense subset of $\mathbb{R}$. The condition stated in the question is sufficient, but not necessary. Consider the following differentiable and strictly increasing function for which $f^\prime > 0$ does not hold almost everywhere. Let $C$ be the fat Cantor set (which is closed with positive measure, but does not contain any nontrivial open intervals). Let $g(x)$ be the distance from any point $x$ to $C$. Then, $g$ is continuous and vanishes precisely on $C$. The integral
$$
f(x)=\int_0^xg(y)\,dy
$$
is strictly increasing and continuously differentiable, but $f^\prime=0$ on $C$.
We can show that $f^\prime\ge0$ everywhere and $f^\prime > 0$ on a dense set is indeed necessary and sufficient for $f$ to be strictly increasing (see also  Olivier Bégassat's comments to the question).
Sufficiency: If $f^\prime\ge0$ then the mean value theorem implies that $f$ is increasing. If it was not strictly increasing then we would have $f(a)=f(b)$ for some $a < b$ implying that $f^\prime=0$ on $[a,b]$, contradicting the condition that $f^\prime > 0$ on a dense set. This proves sufficiency of the conditions.
Necessity: In the other direction, suppose that $f$ is strictly increasing. Then, $f^\prime\ge0$ follows directly from the definition of the derivative. Also, $f(a) < f(b)$ for any $a < b$. The mean value theorem implies that $f^\prime(x) > 0$ for some $x\in[a,b]$. So, $f^\prime > 0$ on a dense set.
A: As others have said, the proposed "almost everywhere" criterion is not correct: it is sufficient, but not necessary, for $f$ to be strictly increasing.
In his very nice answer, George Lowther has given a correct necessary and sufficient condition: namely that $f'(x) > 0$ on a dense subset of the domain.  As it happens, I recently covered this topic in my "Spivak calculus class" and found that even Spivak's text didn't give quite the treatment of this point that I wanted.  So I wrote something up myself.  Here is the statement:
[Warning: where others here say "strictly increasing", I say "increasing"; where others say "increasing", I say "weakly increasing", and similarly for "monotone" and "weakly monotone".]

Second Monotone Function Theorem:
Let $f: I \rightarrow \mathbb{R}$ be a function which is continuous on $I$ and differentiable on the interior $I^{\circ}$ of $I$.
a) The following are equivalent:
(i) $f$ is weakly monotone.
(ii) Either we have $f'(x) \geq 0$ for all $x \in I^{\circ}$ or $f'(x) \leq 0$
for all $x \in I^{\circ}$.
b) Suppose $f$ is weakly monotone.  The following are equivalent:
(i) $f$ is not monotone.
(ii) There exist $a,b \in I^{\circ}$ with $a < b$ such that the restriction of $f$ to $[a,b]$ is constant.
(iii) There exist $a,b \in I^{\circ}$ with $a < b$ such that $f'(x) = 0$ for all
$x \in [a,b]$.

Note that my statement of the equivalence is slightly different (and, perhaps, slightly simpler?) than George's.  For the proof, please see $\S 5.1$ of these notes.  Finally, note that when George appeals to the Intermediate Value Theorem I think he really means to appeal (as I do) to the Mean Value Theorem, although (confusingly, for students) these names are not completely standardized even among mathematicians.
