# Does it exist a nowhere continuous monotonic function in a closed interval?

I saw an explanation for a nowhere monotonic continuous function, an example of which is the Weierstrass function. However, the difference here is drastic, because I am interested in a function which is everywhere discontinuous.

• – Invisible Nov 11 '20 at 11:34

A monotonic function $f:\mathbb{R}\to\mathbb{R}$ has at most countably many discontinuities, so cannot be everywhere discontinuous.

To show that $f$ has at most countably many discontinuities, first note that the one-sided limits $f(x-)$ and $f(x+)$ must exist for all $x$, and (assuming that $f$ is increasing) $f$ is discontinuous at $x$ if and only if $f(x-)<f(x+)$.

In particular, for each point of discontinuity $x$ we can choose a rational number $r_x\in (f(x-),f(x+))$, and one can show that if $x<y$ are two points of discontinuity then $r_x<r_y$. Thus there is an injective map from the points of discontinuity of $f$ to the rational numbers, so the set of points of discontinuity is at most countable.

• I still do not get why the one sided limits must exist. – IRO Dec 14 '16 at 23:47
• If $f$ is increasing, then $\lim_{t\to x^-}f(t)=\sup_{t<x}f(t)$, while $\lim_{t\to x^+}f(t)=\inf_{t>x}f(t)$. – carmichael561 Dec 15 '16 at 3:05

one can easily show monotonic functions are Riemann-integrable, and so the Lebesgue measure of the discontinuity set is $0$.

To show integrability notice that the upper and lower sum of the partition into $n$ equal parts is equal to $\frac{(f(b)-f(a))(b-a)}{n}$.

• And what is the implication for my question? – IRO Dec 15 '16 at 0:06
• since the set of discontinuities has lebesgue measure zero it follows that every monotonic function is continuous at some point in $[0,1]$ – Yorch Dec 15 '16 at 0:07

If $f:\mathbb{R}\to\mathbb{R}$ is everywhere discontinuous, in order to be monotonic, it should be either strictly increasing or strictly decreasing, otherwise there would exist $x_c$ such that $f(x)=c$ for all $x$ in a neighborhood of $x_c$ and hence $f$ would be continuous. Suppose that $f$ is increasing. It follows that $\forall x, \forall \delta > 0, \exists \epsilon_1 > 0$ such that $f(x+\delta)-f(x) \geq\epsilon_1$. This implies that $\exists\epsilon_2$ s.t. $f(x+\delta/2)-f(x) \geq\epsilon_2<\epsilon_1$ and so on, such that $\lim_{n\to \infty}[f(x+\delta/n)-f(x)]=0$, thus $f$ is continuous, what contradicts with the hypothesis.