# Verification of proof for uniform convergence

I have constructed a proof involving pointwise convergence and uniform convergence, hope someone can help verify whether my proof is complete and also answer some questions I have.

Let M be a fixed positive integer M and let ${f_n:[0,M] \to \Bbb{R}}$ be a sequence of functions. Suppose that $f_n \to f$ pointwise on $[0,M]$ and that $f_n \to f$ uniformly on each subinterval $[k-1,k]$ for each $k=1,...,M$. Prove that $f_n \to f$ uniformly on $[0,M]$.

My proof:

By assumption, for any $\varepsilon > 0$, there exists $N_k(\varepsilon)$ such that $$|f_n(x)-f(x)|\le \varepsilon$$ for all $n \ge N_k(\varepsilon)$

We choose $N^*(\varepsilon)=\max\{N_1,...,N_{M-1}\}$.

Hence, for any $\varepsilon > 0$, there exists $N^*(\varepsilon)$ such that $$|f_n(x)-f(x)|\le \sup_{x\in[0,M]}|f_n(x)-f(x)|$$ $$=\max\{\sup_{x\in[0,1]}|f_n(x)-f(x)|,...,\sup_{x\in[M-1,M]}|f_n(x)-f(x)|\}$$ $=\varepsilon$ for all $n \ge N^*(\varepsilon)$

We conclude that $f_n \to f$ uniformly on $[0,M]$

1. Is this proof logical?

2. If the proof above is logical, why do we not have to use the assumption that $f_n \to f$ pointwise on $[0,M]$?

3. One of the definition of uniform convergence and pointwise convergence only differs by the condition of $N(\varepsilon)$ and $N(x,\varepsilon)$. But in terms of $\lim_{n\to\infty} f_n(x) = f(x)$, is there a difference between the definitions?

Thanks in advance!