Spivak, Calculus on Manifolds, Problem 1-30 Let $f : [a,b] \to \mathbb R$ be an increasing function. If $x_1,,\ldots,x_n \in [a,b]$ are distinct, show that $\sum_{i=1}^n o(f,x_i)<f(b)-f(a)$.
Definitions:


*

*$o(f,x_i) := \lim_{\delta \to 0} [M(x_i,f,\delta)-m(x_i,f,\delta)]$ is the oscillation of $f$

*$M(x_i,f,\delta) := \sup\{f(x) \mid x \in A, |x-x_i| < \delta\}$

*$m(x_i,f,\delta) := \inf\{f(x) \mid x \in A, |x-x_i| < \delta\}$


My work:
Since $f$ is increasing, $x_i-\delta \le x \le x_i+\delta$ implies $f(x_i-\delta) \le f(x) \le f(x_i+\delta)$. So $M(x_i,f,\delta) \le f(x_i+\delta)$ and $m(x_i,f,\delta) \ge f(x_i-\delta)$. So $M(x_i,f,\delta)-m(x_i,f,\delta) \le f(x_i+\delta)-f(x_i-\delta)$.
I am not sure how to proceed next. I have to choose some $\delta > 0$ that will work but I'm not entirely sure. Any hints will suffice.
 A: Lets assume that $x_1 < x_2 < \dots < x_n$. 
$$\sum_{i=1}^n o(f,x_i) = \sum_{i=1}^n \lim_{\delta \to 0} [M(x_i,f,\delta)-m(x_i,f,\delta)] = 
\lim_{\delta \to 0} \sum_{i=1}^n  [M(x_i,f,\delta)-m(x_i,f,\delta)]
$$
Starting from some $\delta$, the balls $B(x_i,\delta)$ do not intersect. Denote $M_i(\delta)$ and $N_i(\delta)$ as maximum and minimum values of $f$ on $B(x_i,\delta)$ respectively. Then 
$$
\lim_{\delta \to 0} \sum_{i=1}^n  [M(x_i,f,\delta)-m(x_i,f,\delta)] = \lim_{\delta \to 0} \sum_{i=1}^n  M_i-N_i 
$$
Exploiting the increasing property (there a picture could be useful), we get
$$\lim_{\delta \to 0} \sum_{i=1}^n  M_i-N_i  \le \lim_{\delta \to 0} \sum_{i=1}^n  M_i-N_i + \lim_{\delta \to 0} \sum_{i=2}^n  N_{i}-M_{i-1} = \lim_{\delta \to 0} M_N-N_1 \le  f(b)-f(a)$$
A: I figured out my own question after receiving a bit of help from my professor.
Assume without loss of generality that $x_1 < \cdots < x_n$. Choose $$\delta :=\min\{x_1-m_0,m_1-x_1,\ldots,m_n-x_n\},$$ where $m_k:=\frac{x_{k+1}-x_k}2$ for all $k \in \{1,\ldots,n-1\}$, $m_0:=a$, and $m_n:=b$. If $x \in (x_i-\delta,x_i+\delta)$, then $x \in (m_{i-1},m_i)$, and so since $f$ is increasing $f(m_{i-1})\le f(x)\le f(m_i)$. Thus, $M(x_i,f,\delta) \le f(m_i)$ and $m(x_i,f,\delta) \ge f(m_{i-1})$. Consequently, $$o(f,x_i) < M(x_i,f,\delta)-m(x_i,f,\delta) \le f(m_i)-f(m_{i-1}),$$ and so $$\sum_{i=1}^n o(f,x_i) < \sum_{i=1}^n (f(m_i)-f(m_{i-1})) = f(m_n)-f(m_0)=f(b)-f(a).$$
