# Intuition for visualising dense monotonic discontinuous function

My question is about the function defined in Rudin 4.31, mentioned by this question:

Remark 4.31 in Baby Rudin: How to verify these points?

The function is defined as $$f(x) \colon= \sum_{x_n < x} c_n \ \ \ \ \text{ for all } x \in (a,b).$$

I'm having trouble trying to visualise what such a function would look like in terms of its "smoothness". In particular, I'm interested in the case where $$a = 0$$ $$b = 1$$ $$\{x_n\} = \{\mathrm{rationals\:in\:(0,1)}\}$$ $$c_n = \frac{1}{2^n}$$

My question is

What would the graph of $f$ look like in terms of its "smoothness"?

I thought it would look something like the Weierstrass function but monotonic. It seems like there would have to be some sort of recursive/fractal structure, and yet there also has to be a definite "jump" at each rational point in the domain.

I would appreciate a diagram with an intuitive explanation.

Edit: This image is how I'm trying to imagine it. The blue line is $f(x)$. The total length of the green gaps converge to $2$. The red gaps can't really exist, because the rationals are dense, so I'm wondering if the actual graph when you get rid of the red gaps would look "smooth" or "jagged" (like the Weierstrass function).

• Even the general appearance would depend heavily on the choice of enumeration of the rationals. For example, given any $0<\delta,\epsilon<1$, and any subinterval $I$ of length $\delta$, you can choose an enumeration such that $f$ will have almost all of its increase (say, at least $1-\epsilon$ out of $1$) on $I$. On the other hand, you could partition $[0,1]$ into $N$ subintervals of equal length, and choose an enumeration such that $f$ increases by at least $1/2^N$ on each subinterval. – Bungo Sep 1 '15 at 1:35
• @Bungo, I understand that, but I was wondering about the "smoothness"- for example the Weierstrass function exhibits a recursive structure, where if you kept zooming in you would see the same pattern. – ignoramus Sep 1 '15 at 2:04
• That's pretty extreme, bountying away practically your complete rep and thus sacrificing e.g. the comment privilege. Are you sure you did intend that? – Daniel Fischer Sep 2 '15 at 10:00
• @DanielFischer Yes, I did, and I've done it before. I just made a post on meta about it. – ignoramus Sep 2 '15 at 10:01
• Okay then. But out of curiosity, why didn't you place a 200 or 250 bounty? – Daniel Fischer Sep 2 '15 at 10:03

## 1 Answer

like the Weierstrass function but monotonic

The Weierstrass function is quite unlike any monotone functions. It is nowhere differentiable, while every monotone function is differentiable at almost every point.

Specifically, your function $f$ has $f'(x)=0$ for almost every $x$. Indeed, by definition $f$ is the cumulative distribution function for a measure that is purely singular with respect to the Lebesgue measure. Therefore, its Radon-Nikodym derivative is zero a.e. This corresponds to the derivative of $f$.

So, by zooming in on a random point of the graph of your function, you will see it getting flatter and flatter: the vertical size of jumps will be small compared to horizontal scale.

Another way to visualize the situation is to rotate the picture by 45 degrees clockwise. Then the graph of any increasing function $f$ becomes the graph of some $1$-Lipschitz function $g$, i.e., $|g(x)-g(y)|\le |x-y|$ for all $x,y$. (This requires adding vertical segments at the discontinuity points of $f$, as on your picture). There is nothing particularly bad about Lipschitz functions: they may have corners like $y=|x|$, but otherwise they are differentiable a.e.

It would be difficult to get an explicit plot of your $f$, since it depends on some enumeration of rationals. Also, the arbitrariness of enumeration destroys any hope for a nice self-similar structure of any kind. If you want a fractal-like monotone function, I suggest a different approach, based on an 1943 paper of Salem: described in my blog post. I think that Salem-type functions are as fractal-like as any monotone function can be.

• Is it possible to give an explicit plot for some arbitrarily small segment of $f$ that might correspond to an arbitrary enumeration to illustrate the jumps? Could it possibly look like the Salem-type function in your image for some enumeration? I would like to see if it increases "smoothly" like a curve or if there are "corners". Also, if you rotated a vertical gap by 45 degrees, wouldn't there be a horizontal gap of non-zero measure? So how can it be differentiable a.e. after rotation? – ignoramus Sep 3 '15 at 3:55
• How can a discontinuous function "increase smoothly"? Those jumps you see in the picture aren't going anywhere. Just plot any step function: that's what $f$ will look like on a finite scale. As for the gaps, I wrote in the post : "This requires adding vertical segments at the discontinuity points of f, as on your picture". – user147263 Sep 3 '15 at 3:59
• Yes I know it can't actually be smooth, I was just wondering if there was a possible intuitive way to see its structure. As for the gaps, I just realised that you meant adding the segments before rotation. (You mentioned adding the segments after you mentioned rotation so it was confusing because it wouldn't be vertical anymore.) – ignoramus Sep 3 '15 at 4:05