Your proof is correct! In general you can prove that if a sequence of functions $\{f_n\}_n$ converges uniformly on a finite set of domains $A_1,\dots,A_k$ (in your case the domains are $A_1=\{a\},A_2=(a,b),A_3=\{b\}$), then it converges uniformly in its union $\cup_k A_k.$
The proof works exactly like yours.
Indeed, for every $\epsilon>0$ there exist $N_1,\dots,N_k$ such that for every $n\geq N_i$ it is true that $|f(x)-f_n(x)|<\epsilon$ for every $x\in A_i$.
It is then sufficient to consider $N=max \{N_1,\dots,N_k\}$ to say that $|f(x)-f_n(x)|<\epsilon$ for every $x\in \cup_i A_i$ and for every $n\geq N,$ which is exactly the concept of uniform convergence.
Use @Michael's idea: first, to fix your observation about the uniform continuous of $(f_n)$ on $[0,1]$, you have to break your line
$|f_n(x)-f_n(y)| \leqslant 2016|x-y|=\epsilon/3$
into two separate statements:
- $(f_n)$ is $2016$-Lipschitz.
- $\forall \epsilon > 0, \exists \delta > 0: \forall x,y \in [0,1], |x-y| < \delta \implies |f_n(x)-f_n(y)| < \epsilon / 3$.
But #2 is still ambiguous since there's no quantifier and domain for the variable $n$ stated, and it's not clear if $\delta$ depends on $n$. To make things clear, you may fix $\epsilon > 0$ and define $\delta = \epsilon / 6048$, so that whenever $|x-y| < \delta$, #1 can be applied to get #2.
Then we proceed to the partition $P = \{x_0 = 0,x_1 = \delta, x_2 = 2\delta, \dots, x_{M-1} = (M-1) \delta, x_M = 1\}$, where $M = \lceil 1/\delta \rceil$ is the number of subintervals of $P$. Use pointwise convergence on each partition point $x_i$ to yield $N_i \in \mathbb{N}$ such that for all $n \ge N_i$, $|f_n(x_i)| < \epsilon / 3$.
Observation 2: for each partition point $x_i$, $f_n(x_i)$ is $\epsilon$-small when $n$ is sufficiently large.
Now go back to the paragraph about the uniform continuity of $(f_n)$. Apply this on a partition point $x_i$ and a (non-partition) point $x \in [x_i,x_{i+1})$, then $|x_i - x| < \delta$, so $|f_n(x_i) - f_n(x)| < \epsilon / 3$.
Observation 1: when $x$ is $\delta$-close to a partition point $x_i$, $f_n(x_i)$ approximates $f_n(x)$ $\epsilon$-closely, and the error $\epsilon/3$ is independent of $n$.
The question asks for the uniform convergence of $(f_n)$ on $[0,1]$, so we need $N = \max\limits_{i \in \{0, 1, \dots, M\}} N_i$, so that whenever $n \ge N (\ge N_i)$ and $x \in [0,1]$, $$|f_n(x)| \le |f_n(x) - f_n(x_i)| + |f_n(x_i)| \le \epsilon /3 + \epsilon + 3 < \epsilon.$$
To recap:
- bounded derivatives gives subinterval length $\delta$ and $(f_n)$ Lipschitz.
- use $\delta$ to build partition $P = \{x_i\}_i$.
- apply pointwise convergence on partition points $x_i$. use $N = \max_i N_i$ to complete the logic.
- use triangle inequality to conclude.
$\require{AMScd}$
\begin{CD}
f_n(x_i) @<\delta \to 0< \text{uniform convergence} < f_n(x)\\
@V n \to \infty V \text{pointwise limit} V @.\\
0
\end{CD}
Best Answer
Try to apply your proof to the (valid) counterexample of your friend.
Can you show that $f_n$ is continuos at $x=0$? Lets assume $\epsilon=\frac1n$ is given. Can you find $\delta>0$ such that $|f_n(x)-f_n(0)|<\epsilon$ for all $x$ with $|x-0|<\delta$? The problem when attempting so is: Your proof requires one to choose $n$ after $\epsilon$ is given. But to show continuity of $f_n$, we go the other way around: $n$ is given (first) to specify which function we investigate for continuiuty, then $x_0$ and then $\epsilon$. As you see, chosing $\epsilon <\frac1n$ for $f_n$ as given by your friend and $x_0=0$, breaks your proof.