Show that $\lim_{n\rightarrow \infty }\frac{1}{n}\sum_{k=1}^{n}(-1)^kf\left ( \frac{k}{n} \right )=0$ Let $f : [0, 1] → \mathbb{R}$ be a continuous function. Prove that  $$\lim_{n\rightarrow \infty }\frac{1}{n}\sum_{k=1}^{n}(-1)^kf\left ( \frac{k}{n} \right )=0$$
First, I observed that any pair of consecutive terms' input values have the same distance $\frac{1}{n}$, and this converges to $0$ as $n$ goes to infinity.
Proof:
Consider $f(\frac{a}{n})$ and $f(\frac{a+1}{n})$ for any $a\in \{1,2,3,...,n\}$.
Note that for any $a$, $\lim_{n\rightarrow \infty }(\frac{a+1}{n}-\frac{a}{n})=\lim_{n\rightarrow \infty }(\frac{1}{n})=0$.
So, for some $\delta_{1}>0,\; \; \; \exists N $ s.t
$$\left | \frac{1}{n} \right |< \delta _{1}\; \; \; \forall n>N$$
And since $f$ is continuous at $\frac{a}{n}$, $\forall \varepsilon > 0, \; \; \; \exists 0<\delta<\delta _{1} $ s.t
$$\forall x\in [0,1] \; \; \; \text {that satisfies}\; \; \;\left | x-\frac{a}{n} \right |< \delta < \delta _{1}, \text {we have}\; \; \;\left | f(x)-f(\frac{a}{n}) \right |< \varepsilon $$
Thus $\forall n>N$, we get
$$\left |\sum_{k=1}^{n}(-1)^kf(\frac{k}{n})  \right |=\left | -f(\frac{1}{n})+f(\frac{2}{n})-\cdot \cdot \cdot +(-1)^{n-1}f(\frac{n-1}{n})+(-1)^nf(\frac{n}{n}) \right |< \frac{n}{2}\varepsilon $$
This is because we have at least $ \frac{2}{n}$ many pairs of consecutive terms, and we can bound the series by Triangle Inequality.
Then this implies,
$$\frac{1}{n}\left |\sum_{k=1}^{n}(-1)^kf(\frac{k}{n})  \right |= \left |\frac{1}{n}  \right |\left |\sum_{k=1}^{n}(-1)^kf(\frac{k}{n})  \right |<\frac{\varepsilon }{2}<\varepsilon $$.
Hence, for $n>N$ and for any  $\varepsilon$, $\left |\frac{1}{n}  \sum_{k=1}^{n}(-1)^kf(\frac{k}{n})  \right |<\varepsilon$, so $\lim_{n\rightarrow \infty }\frac{1}{n}\sum_{k=1}^{n}(-1)^kf\left ( \frac{k}{n} \right )=0$. $\blacksquare $
Am I missing something in the proof?
Also, I doubt if we really can find some $0<\delta<\delta _{1}$. In other words, if we are looking for some  $\delta$ for a fixed  $\varepsilon$, is $\delta$ always bounded?
 A: $1/n \sum_{k=1}^n (-1)^k f(k/n) + 1/n \sum_{k=1}^n f(k/n)  = 2/n \sum_{k=1}^{n/2} f(2k/n) = 2/n \sum_{k=1}^{n/2} f(2k/n)$
Now limit $n \rightarrow \infty$ => $\lim_{n \rightarrow \infty }1/n \sum_k (-1)^k f(k/n) = \int_{0}^1 f(x) dx - \int_{0}^1 f(x) dx = 0$ because $\lim_{n \rightarrow \infty} 2/n \sum_{k=1}^{n/2} f(2k/n) = \lim_{n \rightarrow \infty}  1/n \sum_{k=1}^{n} f(k/n)=\int_{0}^1 f(x) dx $
A: Since $f$ is uniformly continuous on $[0,1]$, for $\epsilon>0$, there is some $\delta>0$ such that $|f(x)-f(y)|<\epsilon$ for $|x-y|<\delta$.
We first look at the subsequence of even terms, that is,
\begin{align*}
\dfrac{1}{2n}\sum_{k=1}^{2n}(-1)^{k}f\left(\dfrac{k}{2n}\right)
\end{align*}
Choose an $N$ such that $1/N<\delta$. For $n\geq N$, we have
\begin{align*}
\left|\dfrac{1}{2n}\sum_{k=1}^{2n}(-1)^{k}f\left(\dfrac{k}{2n}\right)\right|\leq\dfrac{1}{2n}\sum_{k=1}^{n}\left|f\left(\dfrac{k+1}{2n}\right)-f\left(\dfrac{k}{2n}\right)\right|\leq\dfrac{1}{2n}\sum_{k=1}^{n}\epsilon<\dfrac{\epsilon}{2}.
\end{align*}
For the subsequence of odd terms, one sees that
\begin{align*}
\dfrac{1}{2n+1}\sum_{k=1}^{2n+1}(-1)^{k}f\left(\dfrac{k}{2n}\right)=-\dfrac{1}{2n+1}f\left(\dfrac{1}{2n+1}\right)+\dfrac{1}{2n+1}\sum_{k=2}^{2n+1}(-1)^{k}f\left(\dfrac{k}{2n+1}\right),
\end{align*}
and perform the similar trick for the second expression above since there are even terms for that.
