Let $f:\mathbb{R}\longrightarrow\mathbb{R}$ be a continuous function. I need to prove that a sequence $(f_n)$ defined as $$f_n(x)=\frac{n}{2}\int_{x-\frac{1}{n}}^{x+\frac{1}{n}}f(t)\ dt$$ is uniformly convergent on every closed interval $[a,b]$.
I wanted to use Dini's theorem here (nothing else came to my mind). But to do that I need to show $f_n$ are monotonic. I attempted to calculate
$$\begin{align} \frac{n+1}{2}\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt - \frac{n}{2}\int_{x-\frac{1}{n}}^{x+\frac{1}{n}}f(t)\ dt=\\ \frac{n}{2}\left(\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt - \int_{x-\frac{1}{n}}^{x+\frac{1}{n}}f(t)\ dt\right)+\frac{1}{2}\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt =\\ \frac{n}{2}\left(\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt - \int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt - \int_{x-\frac{1}{n}}^{x-\frac{1}{n+1}}f(t)\ dt - \int_{x+\frac{1}{n+1}}^{x+\frac{1}{n}}f(t)\ dt\right) + \frac{1}{2}\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt = -\frac{n}{2}\left(\int_{x-\frac{1}{n}}^{x-\frac{1}{n+1}}f(t)\ dt + \int_{x+\frac{1}{n+1}}^{x+\frac{1}{n}}f(t)\ dt\right)+\frac{1}{2}\int_{x-\frac{1}{n+1}}^{x+\frac{1}{n+1}}f(t)\ dt \end{align}$$ But as you see, it was not a good idea. And even if I succeeded, I still had to find pointwise limit of $f_n$...
Any thoughts?
Use the fact that a continuous function on a closed interval is uniformly continuous.
So, fix $[a,b]$ and let $\epsilon>0$. Then there is a $N$ so that for $n\ge N$, we have $$ f(x)-\epsilon\le f(t)\le f(x)+\epsilon,\ \text{for all}\ t\in[x-1/n,x+1/n]\cap[a,b]. $$
From this, and basic results on the definite integral, it follows that if $n\ge N$ $$ {2\over n}(f(x)-\epsilon)\le\int_{x-1/n}^{x+1/n}f(t)\,dt\le{2\over n}(f(x)+\epsilon). $$ for all $x\in[a,b]$.
From this, we have, for $n\ge N$, that $$ f(x)-\epsilon\le f_n(x) \le f(x)+\epsilon $$ for all $x\in[a,b]$; as desired.