Is the limit of a sequence of continuous functions bounded

continuityfunctional-analysispointwise-convergencereal-analysissequence-of-function

Let $(f_n)_{n \in\Bbb{N}}$ be a sequence of continuous functions on $[0,1]$. Suppose $f_n \rightarrow f$ pointwise. Is $f$ bounded? If yes, prove it, if not, give a counter example.


My attempt:

No $f$ is not bounded. Consider $f(x) = \frac{1}{x}$ and $f_n(x) = \frac{1}{x}+\frac{1}{n}$. Clearly $\lim_{n\rightarrow \infty}f_n=f$ and $\lim_{x\rightarrow 0} \frac{1}{x}=\infty$, thus, $f$ is not bounded.

There are some flaws in my counter-example though. The functions should be defined on [0,1] but clearly $f$ is not defined at $0$. I tried to fix this by the following:

$f(x) =
\begin{cases}
1/x, & x \in(0,1]\\
\infty, &x=0
\end{cases}$

But I don't think this is valid (Would this still be continuous?).

If someone could help fix my counter-example, or show me why $f$ is bounded, that would be greatly appreciated!

Best Answer

You can take, for instance,$$f_n(x)=\begin{cases}n^2x&\text{ if }x\in\left[0,\frac1n\right]\\\frac1x&\text{ otherwise.}\end{cases}$$Each $f_n$ is continuous, but $(f_n)_{n\in\Bbb N}$ converges pointwise to$$\begin{array}{rccc}f\colon&[0,1]&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}0&\text{ if }x=0\\\frac1x&\text{ otherwise.}\end{cases}\end{array}$$