# How discontinuous can the limit function be?

While I was reading an article on Wikipedia which deals with pointwise convergence of a sequence of functions I asked myself how bad can the limit function be? When I say bad I mean how discontinuous it can be?

So I have these two questions:

1) Does there exist a sequence of continuous functions $f_n$ defined on the closed (or, if you like you can take open) interval $[a,b]$ (which has finite length) which converges pointwise to the limit function $f$ such that the limit function $f$ has infinite number of discontinuities?

2) Does there exist a sequence of continuous functions $f_n$ defined on the closed (or, if you like you can take open) interval $[a,b]$ (which has finite length) which converges pointwise to the limit function $f$ such that the limit function $f$ has infinite number of discontinuities and for every two points $c\in [a,b]$, $d\in [a,b]$ in which $f$ is continuous there exist point $e\in [c,d]$ in which $f$ is discontinuous?

I stumbled upon Egorov´s theorem which says, roughly, that pointwise convergence on some set implies uniform convergence on some smaller set and I know that uniform convergence on some set implies continuity of the limit function on that set but I do not know can these two questions be resolved only with Egorov´s theorem or with some of its modifications, so if someone can help me or point me in the right direction that would be nice.

• You might find the Baire-Osgood theorem interesting. (Disclaimer: I wrote up the first version of the page at ProofWiki.) You might also find this question/example interesting. – kahen Oct 10 '15 at 18:48
• Pretty sure that if you consider the usual construction of the Cantor set and think about the indicator functions of each stage in the construction, you'll find an example of misbehavior 1). Sure, the indicator functions of the intermediate stages aren't continuous, but I'm sure you can "perturb" them a tiny bit to make them everywhere continuous. – goblin Feb 9 '16 at 14:59

The following is a standard application of Baire Category Theorem:

Set of continuity points of point wise limit of continuous functions from a Baire Space to a metric space is dense $G_\delta$ and hence can not be countable.

Another result is the following:

Any monotone function on a compact interval is a pointwise limit of continuous functions.

Such a function can have countably infinite set of discontinuities. For example in $[0,1]$ consider the distribution function of the measure that gives probability $1/2^n$ to $r_n$ where $(r_n)$ is any enumeration of rational numbers in $[0,1]$. The set of discontinuity points of this function is $\mathbb{Q}\cap[0,1]$.

The answer to 1 is yes. Here is a (kinda cheesy) construction. We want to replicate the behavior of $x^k$ infinitely many times near $x=1$. We start by working on the real line for convenience. Let $n$ be a natural. On each interval $[n,n+1],$ we build a piece $g_{n,k}(x)$ so on the first half of the interval it decreases linearly from $1$ to $0$. On the second half, it increases as $\left(2(x-n+1/2)\right)^k$. Note each $g_{n,k}$ is continuous. And they agree on their shared boundaries. So pasting all of the $g_{n,k}$ together gives us a continuous function $g_k$ on the positive reals.

Now we scale down to $[0,1)$ by a continuous function, namely $h(x)=\frac{x}{x+1}$. Note $h$ is bijective with a continuous inverse. Now $f_k = h g_k h^{-1}$ should have the desired behavior. Continuous functions pass through limits, for for a fixed $x\in [0,1)$, convergence of $f_k(x)$ is equivalent to convergence of $g_k(x)$. So that works.

Next, we want to check that there are infinitely many discontinuities. We designed the $g_k$ to have this behavior so that whenever $h^{-1}(x)$ is an integer, we have a discontinuity in the limit infinitely often near $x=1$, as desired.

You can quite easily construct a concrete example exhibiting behaviour "2)":

We will construct a sequence of functions whose graphs consist of spikes converging pointwise to Thomae's function

$f_1$ will have a single spike of width $4^{-1}$ around $\tfrac12$ and height $\tfrac12$.

$f_2$ starts as $f_1$ except we narrow its spike to $4^{-2}$ and then we add two spikes of the same width at $\tfrac13$ and $\tfrac23$ each of height $\tfrac13$.

For $f_3$ we again narrow the spikes to $4^{-3}$ and then we add spikes at $\tfrac14$ and $\tfrac34$ of height $\tfrac14$.

Of course writing this out in full detail is mindnumbling crazy and boring, and obviously also missing the point.

What should hopefully be clear is that the $f_n$ will form a sequence converging pointwise to Thomae's function showing that you indeed can have functions as discontinuous as you desired.

But this is nowhere near as bad as possible. You can have limit functions which are discontinuous on a set of measure $1$, though it must still be comeagre per the Baire–Osgood theorem (see my comment below the question for links)