# Uniform convergence of piecewise sequence of functions

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}$$

• 0 will never be greater than a positive number. May 18, 2018 at 15:29

• For the first question the goal is to study point wise convergence. So $x$ is fixed and then $n$ goes to $+\infty$.

You have $\frac{1}{n}<x<\frac{2}{n}$ for only a finite number of $n$ so it does not matter when $n \to \infty$.

• As uniform convergence implies point wise convergence, if we suppose (by contradiction) that $f_n \to f$ uniformly then the convergence is also pointwise. But by uniqueness of the limit as we have shown the point wise convergence to $0$ we must have $f=0$.

At this point we have:

If $f_n \to f$ uniformly then $f=0$.

It remains to show that $f_n$ does not converge to $0$ i.e that: $$\|f_n-0\|\_\infty \not \to0$$ as $$\sup_{x} |f_n(x)-0| \geq \left|f \left( \frac{1}{n} \right)-0\right| = n$$ you can conclude that $f_n \not \to 0$ and so $f_n$ does not converge uniformly to any function.

For the second example similarly you can show that $f_n$ converge pointwise to $0$ but that: $$\sup |f_n-0| \geq 1$$ so the sequence does not converge uniformly.

Edit

(If you want to find the supremum of such function the first thing is to plot the functions. You can then observe see it is a moving triangle with base $(0/n,2/n)$ and height $n$.)

To show that the supremum is $n$ for the first case you can show both points:

• There exist $x_0$ such that $f_n(x_0)=n$ (more generally, if your function is less "nice" there exist a sequence $x_k$ such that $f_n(x_k) \to n$ when $k \to \infty$).
• For all $x$, $f_n(x)\leq n$.
• The part that confuses me is finding the supremum of such defined functions? If it is a normal function then we can find the critical points and check for maximum however that's not the case here. Could you point me in the right direction? May 18, 2018 at 15:39

For every fixed $x$, then, unless $x=0$, $x>\frac2n$ if $n$ is large enough. But then $f_n(x)=0$, and this proves that $\lim_{n\to\infty}f_n(x)=0$.

On the other hand, $\sup f_n\geqslant f_n\left(\frac1n\right)=n$. Therefore, your sequence is cannot converge uniformly to the null function (or to any bounded function).

• Why is $\sup f_n = \frac{1}{n}$? May 18, 2018 at 15:43
• @DreaDk Where did you get that idea? What I wrote was that $\sup f_n\geqslant f_n\left(\frac1n\right)=n$. May 18, 2018 at 16:53