# How to construct a function whose set of discontinuities is not closed?

Any ideas/hints on how to construct a non-decreasing function on $[0,1]$ whose set of discontinuities is not closed?

The motivation is that I noticed that most "regular" functions have closed (discrete) sets of discontinuities, so I was wondering whether it is possible to construct a function whose set of discontinuities is not closed.

I did have an idea to construct a function whose set of discontinuities is a sequence whose limit point is a point of continuity, but I failed to implement this idea.

• @Carl Mummert I've added the motivation and my thoughts. However, sometimes it is the case that one doesn't know how to get started; I thought in such a case it's appropriate to ask here how to get started. Jun 24, 2018 at 19:12
• I have voted to re-open the question. Jun 25, 2018 at 2:44
• user5579085 - asking how to get started is great - but having some sense of how you are thinking about the problem makes it easier for others to answer, and it also makes the post more useful for future reference, compared to just an unmotivated question. Jun 25, 2018 at 3:25

In general, the points of continuity make a $G_\delta$ set (a countable intersection of open sets), so the points of discontinuity are an $F_\sigma$ set (a countable union of closed sets). So, unless we are really lucky, there ought to be some function that has a $F_\sigma$ but not closed set of discontinuities. The simplest kind of non-closed $F_\sigma$ set consists of a convergent sequence that does not include its limit point, such as $(1/n)$.

To make a function that is discontinuous only on points of the form $1/n$, take an atomic measure $\mu$ with weight $2^{−n}$ at $1/n$ and no weight elsewhere, and let $f(x)=\int_{-\infty}^x 1\,d\mu$. This will be discontinuous at each $1/n$ because of the point mass. The only other point where $f$ could conceivably be discontinuous is $x=0$, but it is not hard to show it's continuous there, because $\sum 2^{-n}$ converges.

This cumulative distribution method is guaranteed to make an increasing $f$ because the cumulative distribution of any measure is increasing. It also has the benefit that we don't need to specify the function by cases, or explicitly write any intervals in the definition of $f$, because the integral takes care of everything.

The converse question is: is every $F_\sigma$ set of reals the set of points of discontinuity of some function? That is, is every $G_\delta$ set of reals the set of points of continuity of a function? The answer is yes, as shown by Young in 1903; see this MathOverflow post for more information.

Young's result will not hold for monotonic functions, however, because the set of points of discontinuity of a monotonic function is countable, so even a simple uncountable closed set like the Cantor set cannot be the set of points of discontinuity of a monotone function. However, Rudin, Principles of Mathematical Analysis, 3rd ed., Remark 4.31 shows that every countable set of real numbers is the set of points of discontinuity of a monotone function, using the same cumulative distribution method.

HINT: Can you find a function that is continuous at $0$ but discontinuous at $1/n$ for $n\in\Bbb N$?

• I'm not sure how to do this at all. Jun 17, 2018 at 22:19
• Start by drawing some pictures. Think about step functions. Jun 17, 2018 at 22:20
• Sorry, I forgot the assumption that the function must be non-decreasing. Should I still try to follow your hint, or does it become invalid? Jun 17, 2018 at 22:28
• You've got it perfectly. What does the $...$ mean? You're defining $f(x) = 1/(n+1)$ if $x\in [1/(n+1),1/n)$ and $f(0)=0$. You've defined the function for all $x\in [0,1]$. Jun 17, 2018 at 23:50
• @user5579085: the method I mentioned in a comment above, using an integral to make a cumulative distribution function, avoids the issue of having to specify the values on all the intervals precisely. In your case, if you make $\mu$ a measure so that point $1/n$ has weight $2^{-n}$, and all others have weight $0$, just let $f(x) = \int_{-\infty}^x 1\,d\mu$. Jun 25, 2018 at 2:56

Let $(a_n)_{n\in \Bbb N}$ and $(b_n)_{n\in \Bbb N}$ be strictly increasing sequences of members of $[0,1]$ with $a_1=b_1=0$ and with $1=\lim_{n\to \infty}a_n=\lim_{n\to \infty}b_n.$

For $n\in \Bbb N$ let $g_n: [a_n,a_{n+1}] \to \Bbb R$ be linear with $g_n(a_n)=b_{2n-1}$ and $g_n(a_{n+1})=b_{2n}.$ Now let $f(x)=g_n(x)$ when $a_n\leq x<a_{n+1}.$

Note that the point $(a_{n+1}, g(a_{n+1}))=(a_{n+1},b_{2n})$ does $not$ belong to the graph of $f.$

And let $f(1)=1.$ The set $D$ of points of discontinuity of $f$ is $\{a_n:n\geq 2\},$ and $\{1\}=\overline D\;\backslash D.$

It may help to draw a sketch of $f$.