I am looking for a continuous function which is not piecewise monotonic.
This is the def. for piecewise monotonic functions. Let I = [a,b] be a closed, limited interval with a < b. A function f $\in \mathcal {F}([a,b])$ is piecewise monotonic, if there is a decomposition
\begin{aligned}[]\mathfrak {Z} = \left \lbrace {a = x_0 < x_1 < \ldots < x_n = b} \right \rbrace\end{aligned}
of [a,b] such that $f|_{(x_{k-1},x_k)}$ is monotonic for all $k \in \left \lbrace {1,\ldots ,n} \right \rbrace.$
I thought that any function could be made into a piecewise monotonic function if the intervals are made small enough. I now found non-continuous functions for which this is not true such as the Weierstrass function or sin(1/x). But now I am looking for a continuous function which is not piecewise monotonic.
Thank you
James
You have already mentioned one such function: the Wierstrass function. Another example is$$\begin{array}{rccc}f\colon&\mathbb R&\longrightarrow&\mathbb R\\&x&\mapsto&\begin{cases}x\sin\left(\frac1x\right)&\text{ if }x\neq0\\0&\text{ otherwise.}\end{cases}\end{array}$$There os no interval $[-a,a]$, with $a>0$, such that $f|_{[-a,a]}$ is monotonic.