# Pointwise and uniform convergence of a piece wise function

$$\forall n \in \mathbb{N}$$ let $$f_n:[0,1] \rightarrow \mathbb{R}$$ be the function defined by

$$f_n(x)= 1$$ if $$0

$$f_n(x) =0$$ otherwise

Study the pointwise convergence and the uniform convergence of the sequence $$(f_n)$$ in $$[0,1]$$

My guess is that it converges to $$0$$ but I don’t quite know how to show this formally.

About the uniform convergence, I thought on taking the sequence $$a_n = \sup \{|f_n(x)- f(x)|:x \in [0,1]\}$$ where $$f(x)$$ is the limit function of $$f_n(x)$$ which in this case would be the $$0$$ function, and showing that $$\lim (a_n) = 0$$ which would mean that the sequence converges uniformly (the supremum is not actually needed, it suffices with any superior bound $$(b_n) \geq (a_n)$$ and seeing that $$\lim(b_n) = 0$$ which would imply that the sequence converges uniformly to the $$0$$ function on [0,1].

I don’t really know if I am on the right track, if I am, any hints on how to write formally what I have just said would be appreciated. If I am not right then please show me what my mistakes are. Thank you.

What about $$\sum_{n=1}^\infty f_n$$ in $$[0,1]$$? Don’t know how to think of a sum of a function defined piece wisely

There is only one way to show pointwise convergence: find the limit at each point. If $$x=0$$ then $$f_n(x)=0$$ for all $$n$$. If $$x\in (0,1]$$ then there is $$n_0\in\mathbb{N}$$ such that $$\frac{1}{n_0}. Then for all $$n\geq n_0$$ we have $$f_n(x)=0$$. So the limit at every point is zero, hence $$f_n\to f$$ when $$f$$ is the zero function.
There is no uniform convergence because for each $$n\in\mathbb{N}$$ you can take $$x_n=\frac{1}{n}$$. Then $$\sup_{x\in [0,1]}|f_n(x)-f(x)|\geq |f_n(x_n)-f(x_n)|=|1-0|=1$$. This is true for all $$n$$ and this of course implies that the limit of the sequences of supremums cannot be zero.
• And what about $\sum_{n=1}^\infty f_n$? – Angus L May 23 '19 at 11:56
• The sum converges pointwise because at any fixed point $x$ you eventually only start adding zeros. However it can't converge uniformly because if a series $\sum_{n=1}^\infty f_n$ converges uniformly then the sequence $f_n$ must converge uniformly to the zero function. Here we know it is not the case. – Mark May 23 '19 at 12:21