When is a continuous function piecewise monotone?

Given a continuous function $f:[a,b]\mapsto \mathbb{R}$, are there known additional conditions that ensure $f$ is piecewise monotone?

Like this question, my motivation is to decompose the interval $[a,b]$ as disjoint union of countable subintervals such that $f$ is monotone over each of these subintervals. However, I want to understand what condition on $f$, in addition to given continuity, is required for piecewise monotonicity.

So far I understand that continuity is not enough since it does not exclude the possibility of nowhere differentiable functions such as this. Also, requiring $f$ to be differentiable is not enough as it can be everywhere differentiable but nowhere monotonic. What, then, is required to make a continuous function piecewise monotonic?

• Doubt if this helps, but a continuous function is strictly monotone if and only if it is injective. – Chee Han Jul 4 '15 at 6:26

What about the set of points where $f$ has local extrema is the finite sum of points and intervals?
• It would be great if you could point a reference, in case this is well-known. The reason I care about "minimal additional requirement" is that piecewise monotonicity would follow, for example, if $f$ is analytic. But perhaps asking it to be analytic is too strong? – Abhishek Halder Jul 4 '15 at 7:57
• I don't have a reference. Clearly requesting $f$ to be analytic is to strong as $f$ is then infinitely differentibale which might not be the case for analytic functions. – mathcounterexamples.net Jul 4 '15 at 8:18