I stumbled upon this problem and I'm having hard time understanding the solution , mainly the part about the supremum of the function.
Study the uniform convergence of the following sequence of functions on the interval [$0,1$].
$$f_n(x)= \begin{cases} n^2x, & \text{$0\le x\le \frac{1}{n}$}\\ n^2(\frac{2}{n}-x), & \text{$\frac{1}{n}< x< \frac{2}{n}$}\\ 0, & \text{$\frac{2}{n} \le x \le 1$} \end{cases}$$
The solution :
If $x=0$ then $f_n(x)=0$. This is obvious Let $x\neq0$. Then there exists $n_0 \in N$ such that $\frac{2}{n_0}<x$ and for every $n\ge n_0,\ f_n(x)=0$
Why do we only look at the case $x=0$ and $x>\frac{2}{n}$. What about $\frac{1}{n}<x<\frac{2}{n}$?
So $f_n(x)$ converges pointwise to $f(x)=0$.
Now we need to find $\sup \left \lvert{f_n(x)-f(x)}\right \rvert=\sup > f_n(x)\ge f_n(\frac{1}{n})=n \rightarrow \infty$
The last part is the one I'm at most confused about.
Similarly what is the supremum of the following sequence of functions?
$$f_n(x)= \begin{cases} nx, & \text{$0\le x\le \frac{1}{n}$} \\ 2-nx, & \text{$\frac{1}{n}<x<\frac{2}{n}$}\\ 0, & \text{$\frac{2}{n}\le x\le3$} \end{cases}$$