Application of Telescope series in Rolle's theorem In a solution to a certain Rolle's theorem problem, I have $x_k=a+\frac{k}{n}(b-a)$ and
$$
0=f(b)-f(a)=\sum_{k=1}^nf(x_k)-f(x_{k-1})=\frac{b-a}n\sum_{k=1}^n\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}
$$
How exactly does this work? I mean, let's say $$\sum_{k=1}^nf(x_k)-f(x_{k-1})$$ has $$f(x_2)-f(x_{2-1})$$ as one of it's terms. How will
$x_k=a+\frac{k}{n}(b-a)$ be used in this? Also, how we define $n$ there? Does it mean that $k$ is divided by $n$? Is $n$ supposed to be some large finite number?
Excuse me if the question sounds silly.
 A: You're given that
$$x_k=a+\frac{k}{n}(b-a) \tag{1}\label{eq1}$$
Also, it's stated that
$$0=f(b)-f(a)=\sum_{k=1}^nf(x_k)-f(x_{k-1})=\frac{b-a}n\sum_{k=1}^n\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}} \tag{2}\label{eq2}$$
It seems you're asking about how & why \eqref{eq2} works. Well, you're dealing with a function $f(x)$, with $x \in [a,b]$ and $f(a) = f(b)$. The interval $[a,b]$ is divided into $n$ equal parts, for some $n \in \mathbb{N}$, with the $k$'th point ($0 \le k \le n$) being given by \eqref{eq1}. Note that
$$\begin{equation}\begin{aligned}
\sum_{k=1}^n \left(f(x_k)-f(x_{k-1})\right) & = (f(x_1) - f(x_0)) + (f(x_2) - f(x_1)) + \ldots + (f(x_n) - f(x_{n-1})) \\
& = f(x_n) - f(x_0) \\
& = f(b) - f(a)
\end{aligned}\end{equation}\tag{3}\label{eq3}$$
Note this is a Telescoping series, so all of the terms except for $f(x_0)$ and $f(x_n)$ cancel each other. Next, from \eqref{eq1}, you have that
$$\begin{equation}\begin{aligned}
x_k - x_{k-1} & = \left(a + \frac{k}{n}(b-a)\right) - \left(a + \frac{k - 1}{n}(b-a)\right) \\
& = \frac{b - a}{n}
\end{aligned}\end{equation}\tag{4}\label{eq4}$$
Thus, the last part of \eqref{eq2}, i.e.,
$$\frac{b-a}n\sum_{k=1}^n\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}} \tag{5}\label{eq5}$$
is basically multiplying the middle part by the RHS of \eqref{eq4}, then dividing by the LHS of \eqref{eq4}, and moving that last factor into the summation (which you can do as it's just a constant).
A: For those inexperienced in $\Sigma$ notation, try writing a particular example.  Say $n=4$.  Then $x_0 = a$ and $x_4 = b$.
So
$$
\sum_{k=1}^n \big(f(x_k)-f(x_{k-1}\big) \\= 
\big(f(x_1)-f(x_0)\big)+\big(f(x_2)-f(x_1)\big)+\big(f(x_3)-f(x_2)\big)+\big(f(x_4)-f(x_3)\big)
\\ = f(x_4)-f(x_0) = f(b)-f(a).
$$
