# Convergence on a Piecewise $f_n$ convergence

$$f_n:[0,1]\rightarrow \mathbb{R}$$ and $$f_n(x)=\begin{cases} n^2x & \text{ if } 0\leq x< \frac{1}{n} \\ \frac{1}{(n+1)x-1}& \text{ if } \frac{1}{n}\leq x\leq 1 \end{cases}$$

Study convergence and the uniformly convergence.

for $$x=0$$ we have $$f_n(0)=0$$ for $$0< x\leq 1$$ it exists a $$n_o \in\mathbb{N}$$ such that $$\frac{1}{n_0} for every $$n>n_0$$ $$\frac{1}{n} $$f_n(x)=\frac{1}{(n+1)x-1}\rightarrow 0$$ as $$n\rightarrow \infty$$

$$\Rightarrow f_n\rightarrow0$$

I want to show that $$f_n$$ doesn't convergence uniformly, I calculated $$\int_{0}^{1}f_ndx=1/2\neq 0$$ and that mean that indeed it doesn't convergence uniformly. But it $$\int_{0}^{1}f_ndx=0$$ does that mean that $$f_n$$ convergence uniformly? Are there any other ways to show that it is uniformly converges or not. how can I use the $$sup$$ on a piecewise $$f_n$$?

I think that it is much simpler to say that$$\sup_{x\in[0,1]}|f_n|=n.\tag1$$So, you don't have $$\lim_{n\to\infty}|f_n-0|=0$$, which means that the convergence is not uniform.
Note that $$f_n\left(\frac1n\right)=n$$, and this is enough to prove that $$\sup_{x\in[0,1]}|f_n|\geqslant n$$, which, in turn, is enough to prove that the convergence is not uniform. You actually have $$(1)$$ because $$f$$ is increasing on $$\left[0,\frac1n\right]$$ and decreasing on $$\left[\frac1n,1\right]$$.
On the other hand, even if $$(f_n)_{n\in\Bbb N}$$ is a sequence of continuous functions from $$[0,1]$$ into $$\Bbb R_+$$ which converges pointwise to the null function and that $$\lim_{n\to\infty}\int_0^1f_n(x)\,\mathrm dx=0$$, you cannot deduce that the convergence is uniform. Take, for instance$$\begin{array}{rccc}f_n\colon&[0,1]&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}nx&\text{ if }x\leqslant\frac1{2n}\\1-nx&\text{ if }x\in\left[\frac1{2n},\frac1n\right]\\0&\text{ otherwise.}\end{cases}\end{array}$$The convergence is not uniform because$$(\forall n\in\Bbb N):\sup f_n=f_n\left(\frac1{2n}\right)=\frac12.$$
For all $$n$$ you have $$f_n(1/n) = n$$ Hence $$\sup_{x \in [0,1]} |f_n(x)| \ge n$$ This means that $$f_n$$ does not converge uniformly.