Sequence of Functions Converging Pointwise to an Almost Everywhere Continuous Function

continuitypointwise-convergencereal-analysis

Suppose I have a function $f:I \to \mathbb{R}$ that is continuous at $I$, except at a finite number of points, for example $ \{ C_n; \enspace (n \le K) \in \mathbb{N} \}$.

How can I build a sequence of continuous functions $f_n :I \to \mathbb{R}$ that converge pointwise to $f$?


My Idea, at first, was to take the Fourier series but I realized that it would not work because:

  • I don't know what kind of discontinuity points I have;
  • the Fourier series at discontinuity points converges to the mean value of the lateral limits, so we would not have pointwise convergence there.

Best Answer

Cut out a ball of radius $\tfrac1n$ around each discontinuity $x_k$ (assume $n$ is large enough that these balls are all disjoint). Then just define $f_n$ to agree with $f$ on the complement of the balls. On the ball around $x_k$, define $f_n$ to be linear so that it "spans the gap", i.e., connects the points $(x_k-\tfrac1n,f(x_k-\tfrac1n))$ and $(x_k+\tfrac1n,f(x_k+\tfrac1n))$.

It may be necessary to make two segments if the the linear part doesn't happen to agree with $f$ at $x_k$. But that's easy: first span the gap between $(x_k-\tfrac1n,f(x_k-\tfrac1n))$ and $(x_k,f(x_k))$, then span the gap between $(x_k,f(x_k))$ and $(x_k+\tfrac1n,f(x_k+\tfrac1n))$. This ensures that $f_n(x_k)=f(x_k)$ for all $n$ and $k$.