1

My textbook is asking to construct such a function, but this thread seems to say that's not possible. What am I missing here? I want to construct a function that's not differentiable for $x=c$, for any $c$ in the interval.

I am referring to part B below: this problem.

bob
  • 344

1 Answers1

7

The question to which you have linked discusses the impossibility of constructing a function that is continuous, monotone, and nowhere differentiable. However, you are not being asked to construct such a function. You are being asked to construct a continuous, monotone function which is non-differentiable on a dense subset of $\mathbb{R}$.

My goto example of such a function is a function which has a little "jump" at each rational number. To build such a function, start by defining $$ f(x) = \begin{cases} 1 & \text{if $x \ge 0$, and} \\ 0 & \text{otherwise.} \end{cases} $$ This function has a jump discontinuity at zero.

Next, observe that the rational numbers are countable, which implies that there is a bijection $q : \mathbb{N} \to \mathbb{Q}$ which provides an enumeration of $\mathbb{Q}$. Let $q_n := q(n)$ for each $n\in\mathbb{N}$. At each $n$, we are going to define a function $f_n$ which has a jump discontinuity at $q_n$. In order to ensure that the function we get doesn't "blow up", we are going to build the jumps in such a way that they get small relatively quickly. Specifically, define $$ f_n(x) := \frac{f(x-q_n)}{2^n}. $$ If you prefer something more explicit, note that $$ f_n(x) = \begin{cases} 2^{-n} & \text{if $x \ge q_n$, and} \\ 0 & \text{otherwise.} \end{cases} $$

Because we have chosen the jumps in such a way that they get small fast, we can sum all of these functions and get something that converges. So define $$ g(x) = \sum_{n=1}^{\infty} f_n(x). $$ It is not too hard to show that this function converges pointwise and has a discontinuity at every rational number.

Finally, as per the hint in your homework, define $$ G(x) = \int_{a}^x g(x)\,\mathrm{d}x. $$ As per the quoted text, $G$ is not differentiable at any rational number.

Note that I have left out quite a few details which you should fill in. You should make sure that you understand why $\mathbb{Q}$ is countable and dense in $\mathbb{R}$ (unless these are facts that you are allowed to take for granted). You should also check that $g$ really is discontinuous at each rational, and you should make sure that you understand why the series defining $g$ actually converges. Finally, it might be a good idea to build $G$ a little more carefully so that it is more artfully restricted to the interval of interest, i.e. the interval $[a,b]$.

EDIT: As per the comment left below by Dave L. Renfro, these kinds of results can be pushed farther to obtain, for example, Lipschitz continuous monotone functions which are non-differentiable on a dense subset of $\mathbb{R}$. The relevant discussion is contained in this answer to another question on MSE.