Given that we have sequence of piece-wise functions $S_{n}$ on [0,2] given by $ \frac{1}{n}x+x^{2}$ for ,$ 0\leq x \leq 1$ and $\frac{1}{2n}$ for , $1<x \leq 2$
Whether this sequence converge in sup-metric, where sup metric distance between functions $ d_{s}(h,g) = \underset{a \in {[0,2]}}{sup} | f(a) -g(a) |$
Now, for first two functions n=1 and 2. The distance between them by sup-metric is $0.5$ and for n=2 and 3 its $0.1667$ and it keeps on decreasing as n increases to infinity. Is this true, and how we can prove its convergence formally. I am not sure how to identify the limiting function in this sequence.
we have to show that for all $\varepsilon>0$ there exist an $N \in \mathbb{N}$ such that for all $n >N$ it is true that sup-metric $d_{s} (f_{n}, f_{0}) < \varepsilon$ where $f_{0}$ is the limiting function in the sequence.
You have the pointwise limit
$$f(x)=\begin{cases} x^2,&\text{if }0\le x\le 1\\ 0,&\text{if }1<x\le 2\;, \end{cases}$$
so you just need to see whether the functions $S_n$ converge to $f$ in the sup metric. For each $n\in\Bbb Z^+$ we have
$$d_s(S_n,f)=\sup_{x\in[0,2]}|S_n(x)-f(x)|\;,$$
where
$$|S_n(x)-f(x)|=\begin{cases} \frac{x}n,&\text{if }0\le x\le 1\\ \frac1{2n},&\text{if }1<x\le 2\;. \end{cases}$$
Clearly $\frac{x}n$ is increasing on the interval $[0,1]$, so $\frac{x}n\le\frac1n$ on $[0,1]$ with equality at $x=1$, and since $\frac1{2n}<\frac1n$, it follows that $d_s(S_n,f)=\frac1n$. Thus,
$$\lim_{n\to\infty}d_s(S_n,f)=\lim_{n\to\infty}\frac1n=0\;,$$
and $f$ is also the limit of the sequence $\langle S_n:n\in\Bbb Z^+\rangle$ in the sup metric.