Example of a sequence of bounded functions $(f_n)$ on $[0, 1]$ which converges pointwise to an unbounded function $f$

examples-counterexamplesproof-verification

Give an example of a sequence of bounded functions $(f_n)$ on $[0, 1]$
which converges pointwise to an unbounded function $f$

I was thinking of modifying the example (which runs into trouble at $x=0$, since $f_n(0)=n$):

$$ f_n(x)= \frac{n}{nx +1}=\frac{1}{x+ \frac{1}{n}} $$

Since $\lim_{n\to \infty}f_n(x)=\frac{1}{x}$

This is unbounded on $(0,1)$ (but undefined at $0$), but I am having a bit trouble with generalising this to $[0,1]$, would the example
$$ f_n(x)= \frac{n}{nx +n+1}=\frac{1}{x+ 1+ \frac{1}{n}} $$
Work because it is bounded on $[0,1]$ but the function sequence pointwise limit has an asymptote at $x=-1 \dots $ which is not in the interval.

I feel like I'm overthinking this question a bit. I want to somehow "fix" this example for $x=0$.


Edit: basically I'm having troubling defining an example on the closed interval $[0,1]$, everything is fine for $(0,1)$

Best Answer

Let $f_n(x)=0$ on $[0,1/n]$ and otherwise $f_n(x)=1/x.$ Each $f_n$ is bounded, but pointwise limit is $f(0)=0,\ f(x)=1/x [x \in (0,1],$ not bounded.