# continuous nowhere monotonic function

Let $f$ be a real-valued continuous function defined on the unit interval $[0,1]$. It seems intuitively clear that $f$ should be monotonic on some subinterval $I$ of $[0,1]$. Most of the concrete examples seem to support this. A counterexample is termed nowhere monotonic, meaning that the function is not monotonic in any subinterval of $[0,1]$. Surprisingly, nowhere monotonic functions do exist:

###### Proposition 1.

There exists a real-valued continuous function defined on $[0,1]$ that is nowhere monotonic.

A sketch of the proof goes as follows:

1. 1.

Let $X$ be the set of all continuous real-valued functions on [0,1]. Then $X$ is a complete metric space given the sup norm. Clearly $X$ is non-empty.

2. 2.

Given any subinterval $I$ of $[0,1]$, the subset $P(I)\subseteq X$ consisting of all non-decreasing functions, the subset $Q(I)\subseteq X$ consisting of all non-increasing functions, and hence their union $M(I)$, are closed.

3. 3.

Furthermore, $M(I)$ is nowhere dense.

4. 4.

Let $S$ be the set of all rational intervals in $[0,1]$ (a rational interval is an interval whose endpoints are rational numbers). Then $S$ is countably infinite. Take the union $M$ of all $M(I)$, where $I$ ranges over $S$.

5. 5.

If $f$ is monotone on some interval $J$ in $[0,1]$, then $f$ is monotone on some rational interval $I\subseteq J$. If the theorem is false, then every continuous function is monotone on some rational interval, which means $M=X$.

6. 6.

However, $M$ is a countable union of nowhere dense sets and $X$ is a non-empty complete metric space. By Baire Category Theorem, this can not happen. Therefore, $M\subset X$ strictly and there exists a continuous nowhere monotone real-valued function defined on $[0,1]$.

## Example : van der Waerden function

The above shows the existence of such a function. Here is an actual example of a nowhere monotonic continuous function, called the van der Waerden function. This function, which we designate by $f$, is given by a series

 $f(x)=\sum_{k=0}^{\infty}f_{k}(x)$

where the functions $f_{k}$ are defined by

 $f_{0}(x)=\begin{cases}x,&\text{if}\;\;0\leq x\leq\frac{1}{2}\\ -x+1,&\text{if}\;\;\frac{1}{2}\leq x\leq 1\end{cases}\quad\quad\text{and}\quad% \quad f_{k}(x)=\frac{1}{2^{k}}f_{0}(2^{k}x)$

where each $f_{k}(x)$ is defined on $[0,2^{-k}]$. Since $f_{k}$ agrees on the endpoints, we can extend the its domain to the entire unit interval by periodic extension (so that the graph of $f_{k}(x)$ has the shape of a sawtooth).

$\quad\;$

- It is easy to check that each $f_{k}$ is continuous. Using the Weierstrass M-test we can also see that the series converges uniformly, and therefore conclude that $f$ itself is a continuous function (it is the uniform limit of continuous functions).

- We now prove that $f$ is nowhere monotonic:

The set $\{\frac{L}{2^{k}}:k\in\mathbb{N},\;0 is dense in $[0,1]$. Given any interval $I\subset[0,1]$ we can then find a point of the form $\frac{L}{2^{k}}$ in its interior.

It is easily seen that $f_{j}(\frac{L}{2^{k}})=0$ for $j\geq k$.

For any integer $j>k$, consider the points $a_{j}:=\frac{2^{j-k}L-1}{2^{j}}$ and $b_{j}:=\frac{2^{j-k}L+1}{2^{j}}$. The points $a_{j}$ (resp. $b_{j}$) are just the points on the left (resp. on the right) of $\frac{L}{2^{k}}$ when we divide the unit interval in segments of size $\frac{1}{2^{j}}$.

A direct calculation would show that

 $\begin{cases}f_{s}(a_{j})=0,&s\geq j\\ f_{s}(a_{j})=\frac{1}{2^{j}},&j>s\geq k\\ f_{s}(a_{j})=f_{s}(\frac{L}{2^{k}})\pm\frac{1}{2^{j}},&k>s\geq 0\end{cases}$

and similarly for $b_{j}$.

Evaluating $f$ in the points $a_{j}$ and $b_{j}$ we obtain

 $\displaystyle f(a_{j})$ $\displaystyle=$ $\displaystyle\sum_{s=0}^{\infty}f_{s}(a_{j})$ $\displaystyle=$ $\displaystyle\sum_{s=0}^{j-1}f_{s}(a_{j})$ $\displaystyle=$ $\displaystyle\sum_{s=0}^{k-1}f_{s}(a_{j})+\sum_{s=k}^{j-1}f_{s}(a_{j})$ $\displaystyle=$ $\displaystyle\sum_{s=0}^{k-1}f_{s}(\frac{L}{2^{k}})+\sum_{s=0}^{k-1}(\pm\frac{% 1}{2^{j}})+\frac{j-k}{2^{j}}$ $\displaystyle=$ $\displaystyle f(\frac{L}{2^{k}})+\sum_{s=0}^{k-1}(\pm\frac{1}{2^{j}})+\frac{j-% k}{2^{j}}$

and similarly for $f(b_{j})$.

The least value we can obtain is $\displaystyle f(a_{j})=f(\frac{L}{2^{k}})-\frac{k}{2^{j}}+\frac{j-k}{2^{j}}=f(% \frac{L}{2^{k}})+\frac{j-2k}{2^{j}}$, and even in this extreme case we can still choose $j$ large enough so that $a_{j}\in I$ and $j>2k$.

For this appropriate $j$ we see that $f(a_{j})>f(\frac{L}{2^{k}})$, and similarly $f(b_{j})>f(\frac{L}{2^{k}})$.

Recall that $a_{j}<\frac{L}{2^{k}}. We conclude that $f$ is not monotonic in $I$, and hence it is nowhere monotonic.

Remark. The van der Waerden function turns out to be nowhere differentiable as well.

Title continuous nowhere monotonic function ContinuousNowhereMonotonicFunction 2013-03-22 14:59:08 2013-03-22 14:59:08 asteroid (17536) asteroid (17536) 19 asteroid (17536) Result msc 54E52 van der Waerden function