Here is the question in my real analysis textbook.
$f$ is a continuous on $\mathbb{R}$
Say $f_n(x) = {n \over 2}\int_{x-{1 \over n }}^{x+{1 \over n }} f(t) dt$
Show the $f_n$ converge uniformly to $f(x)$ on $[0,1]$
In fact, the textbook itself solve this by M.V.T for integral.
But I tried a different way like the below.
$(sol)$ For $\forall x \in [0,1]$, consider the $I_n = [x- {1 \over n }, x+{1 \over n }]$
Since $f$ is a continuous on $I_n$, $f$ is uniformly continuous on $I_n $
Therefore, by the definition of the uniform continuity
$(1)$ $\exists {2 \over n} \leq \delta $ s.t. $\Vert x-y \Vert < \delta$ $\Rightarrow$ $\Vert f(x) - f(y) \Vert <{2\epsilon \over n } $
$(2)$plus, By Archimedes $\exists k \in \mathbb N s.t. n \geq k \Rightarrow {2\epsilon \over n } < \epsilon$
By $(1)$ and $(2)$ $\Vert f_n(x) - f(x) \Vert = \Vert {n \over 2}\int_{x-{1 \over n }}^{x+{1 \over n }} (f(t) - f(x)) dt \Vert \leq {n \over 2}\int_{x-{1 \over n }}^{x+{1 \over n }} \Vert f(t) - f(x) \Vert dt \leq {n \over 2 } {2 \over n } \epsilon =\epsilon $
Hence, $\exists k s.t. n \geq k \Rightarrow \Vert f_n(x) - f(x) \Vert < \epsilon$ (Uniform convergence).
I don't have a confidence my solution is right or not. Please check my idea and solution.
Thank you.