Definition:
Let $f: [0, 1] \rightarrow \mathbb{R}$ be a function. Say $f$ is Totally-Nonmonotonic iff for any $a, b$ in [$0, 1$], $f$ is NOT monotonic on [$a, b$].
Question:
Let $f: [0, 1] \rightarrow \mathbb{R}$ (both of which are equipped with the topology generated by the usual distance) be a continuous function and let $\epsilon$ be a real positive real number. Prove that there exists a continuous totally-nonmonotonic function $g: [0, 1] \rightarrow \mathbb{R}$ such that |$f(t) - g(t)$| $\leq \epsilon$ for every $t \in [0, 1]$.
I am tempted to apply Stone-Weirstrass Theorem here but then realize that although the set of all totally-nonmonotonic continuous functions does separate points in $C[X, \mathbb{R}]$, however, it is not a subalgebra because, assuming $h$ is a totally-nonmonotonic continuous function, both $h$ and $-h$ are in the set but $h + (-h)$ is not in the set. I think the purpose here is to prove that the set of all totally-nonmonotonic continuous function is dense in $C[X, \mathbb{R}]$. Could you anybody provide me some hints if you have any ideas?
Any responses will be appreciated.