Real Analysis – Discontinuity Under Uniform Convergence

continuityreal-analysisuniform-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?

Best Answer

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}$.