# Continuity and pointwise convergence doesn't imply contiunity

We have a function $f$ and a sequence of functions $f_n$, both on $[a,b] \to \mathbb{R}$. $f_n$ is continuous for each $n \in \mathbb{N}$, and $f_n$ converges pointwise to $f$. I am asked to give an example to show this does not imply that $f$ is continuous.

My thinking so far is that the example must break down on the boundaries, since within $(a,b)$, we pick the same $\epsilon>0$ for both definitions of continuity and pointwise convergence, we get an epsilon-delta rectangle about each point which both $f_n(x)$ and $f(x)$ must be in, so as epsilon shrinks we can define a slightly larger epsilon to get continuity of $f$. I can't get an example where it breaks though.

Is my reasoning sound, and any hints for getting an example that breaks this?

• $$f_n:[0,1]\ni x\mapsto x^n$$ – Vim Apr 11 '17 at 11:02
• The issue doesn't need to happen on the boundary, but it can. Think about $[0,1]$ and the function $f_n(x)$ is $1$ for $x<1/n$, the function is $0$ for $x>2/n$, and connected by a line between those two regions to make the function continuous. – Michael Burr Apr 11 '17 at 11:06
• It could also break at points other than the boundary. An example can be easily constructed from Vim's. Define the functions on $[0, 1]$ as Vim's and reflect them into $[1, 2]$. – badjohn Apr 11 '17 at 11:06

• Considering $a=0$, $b=1$ and $f_n\colon x\mapsto x^n$, the sequence converges pointwise to the function $f$ such that $f(x)=0$ for $0\leqslant x\lt 1$ and $f(1)=1$, which is not continuous.
• Let $a=0$, $b=1$, $f_n$ equal to $1$ on $[0,1/2-1/n)$, $-1$ on $(1/2+1/n,1]$ and linear on $(1/2-1/n,1/2+1/n)$. Then $f_n$ is continuous and converges pointwise to $f$, which equals $1$ on $[0,1/2)$, $-1$ on $(1/2,1]$ and $0$ at $1/2$, which is not continuous.