$\forall n \in \mathbb{N}$ let $f_n:[0,1] \rightarrow \mathbb{R}$ be the function defined by
$f_n(x)= 1$ if $0<x \leq 1/n$
$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