Can all non-monotonic functions be treated as monotonic functions if we adequately partition it into sub-intervals? Monotonic functions defined in an interval must either increase or decrease(strictly or otherwise), whereas non-monotonic functions don't. But can we say that a non-monotonic function can be partitioned into many monotonic functions in various intervals?
Say, $y=x\sin x$, then for interval [0, 2.029] it is monotonic? Then again it seems for [2.029, 4.913] it is monotonic, or am I missing something?
Because then it would imply that all non-monotonic functions can be monotonic functions when defined at appropriate intervals.
I was reading "Calculus, Volume 1 - Tom Apostol" when I encountered monotonic
functions. Also any suggestions on learning calculus would be appreciated.
Thank you for your time.
 A: This is not exactly true. Someone gave the Dirichlet function as an example but you might think that that's super pathological so maybe this works for nicer functions. You can actually show that there exists a continuous function $f: [0,1] \to \mathbb{R}$ which is not monotone on any subinterval.
A standard proof of this is via the Baire Category Theorem, though there are also constructive proofs that you can read about. The Weierstrass function (which is continuous but nowhere differentiable) is an example of such a function.
On the other hand, the strategy of trying to consider the question for "nice enough" functions does lead somewhere.
Let $f: (0,1) \to \mathbb{R}$ be a function which is differentiable and is such that its derivative $f'$ is continuous. Let $a \in (0,1)$ be a point where $f'(a) > 0$. Since $f'$ is continuous, there is an open interval $I$ around $a$ in which $f' > 0$. So, $f$ is actually going to be monotone in this interval.
You can then go on and prove stronger results once you have more tools available to you, of course. This is just something for you to think about as you learn more about these things :)
