# Discontinuity under uniform convergence

Suppose I have sequence of functions $\; f_n : [a, b] → \mathbb R$ that uniformly converges, i.e. $f_n \rightrightarrows f$ as $n \to \infty,$ and $f_n$ has finitely many discontinuities, $\forall\; n \in \mathbb N.$

I'm trying to show that $f$ does not necessarily has finitely many discontinuities, i.e. I am trying to find an example of $f$ with infinitely many discontinuities.

One example I came up with is: $\quad f_n(x)= \begin{cases} x + \frac{1}{n}, & x = 1,\, \dots,\, n \\ x, & otherwise \end{cases} \quad$ which uniformly converges to $\;f(x)=x\;$, but it is continuous, hence has finitely many discontinuities, so is not valid counter example. If I change it to the $\quad f_n(x)= \begin{cases} x + 1 + \frac{1}{n}, & x = 1,\, \dots,\, n \\ x, & otherwise \end{cases} \quad$ it solves the problem finding infinitely many discontinuities, but now it does not converge uniformly, but rather pointwise to $\quad f(x)= \begin{cases} x + 1, & x \in \mathbb N \\ x, & otherwise \end{cases} \quad$

So far every example I could think of is either converges uniformly to continuous function, or does converge to a function with infinitely many discontinuities, but pointwise.

Any ideas?

• Not for nothing, the 2nd example you provided appears to converge uniformly. If $n>1/\epsilon$, $|f_n-f|<\epsilon ~ \forall x$. – Jake Stevens-Haas Oct 30 at 6:03
• Another thing worth noting is that the reason both examples work is because the each discontinuity in $f_n$ appears at the correct location at finite $n$. If a discontinuity only approaches its proper place $x_0$ as $n\rightarrow \infty$, then you can show that for a small enough $\epsilon$, any $n$ you might choose to achieve $|f_n(x_0)-f(x_0)|<\epsilon$ allows a continuous region $[x_0+\delta]$ in $f_n$ where $|f_n(x_0+\delta)-f(x_0+\delta)|>\epsilon$ – Jake Stevens-Haas Oct 30 at 7:00

Choose $[a,b]=[0,1]$ for simplicity.
Let $f = \sum_{k=1}^\infty {1 \over k} 1_{[{1 \over 2k+1},{1 \over 2k} ) }$. It is easy to check that $f$ has discontinuities at $\{ { 1 \over n} \} _n$.
Let $f_n = f \cdot 1_{[{1 \over n}, 1]}$, then $f_n$ has a finite number of discontinuities and $|f_n(x) -f(x)| \le {2 \over n}$.