Let $f$ be increasing and $x_1 < \dotsb < x_n$ in $[a,b]$. Show that $\sum_{i=1}^n o(f,x_i) < f(b)-f(a)$, where $o$ is the oscillation. Let $f$ be increasing on $[a,b]$, take points $x_1 < \dotsb < x_n$ in $[a,b]$. I am trying to show that $\sum_{i=1}^n o(f,x_i) < f(b)-f(a)$ where $o(f,x_i) $ is the oscillation of the function at $x_i$.
Here is what I have done: for any $\delta$, $$M(x_i,f,\delta)-m(x_i,f,\delta)\le f(\min(x_i+\delta,b))-f(\max(x_i+\delta,a))$$ where $M(a,f,\delta)$ is $\sup \{f(x)\}$ for $x$ in a $\delta$-neighborhood of $a$, and $m$ is the infimum. The oscillation is the limit of the difference as $\delta \to 0$. I have an upper bound for the oscillation, but I can't find a way to make the terms cancel out when I add them.
 A: Since the function is increasing, we have
$$\tilde{M}(x_i,f,\delta) := \sup \left\lbrace f(x) : x \in [x_i-\delta, x_i +\delta]\right\rbrace = f(x_i+\delta)$$
and similarly $\tilde{m}(x_i,f,\delta) = f(x_i-\delta)$. Using a closed interval instead of an open one simplifies matters here, otherwise we'd have to use the one-sided limits of $f$ at $x_i \pm\delta$. It does not influence the oscillation, since for $0 < \delta < \delta'$ we have $M(x_i,f,\delta) \leqslant \tilde{M}(x_i,f,\delta) \leqslant M(x_i,f,\delta')$ and similarly for the infima.
That gives us
$$o(f,x_i) = \lim_{\delta\searrow 0} \left(\tilde{M}(x_i,f,\delta) - \tilde{m}(x_i,f,\delta)\right) = f(x_i^+) - f(x_i^-).$$
Now to obtain the estimate for the sum of oscillations, use intermediate points $y_i = \frac12(x_i + x_{i+1})$, where we add $x_0 = a$ and $x_{n+1} = b$ if the two are not among the $x_i$, otherwise let $y_0 = a$ resp. $y_{n} = b$. Then $x_{i} < y_i < x_{i+1}$, except perhaps at the endpoints of the interval, and
$$\sum_{i=1}^n o(f,x_i) = \sum_{i=1}^n (f(x_i^+) - f(x_i^-)) \leqslant \sum_{i=1}^n (f(y_i) - f(y_{i-1}) = f(y_n) - f(y_0) \leqslant f(b) - f(a).$$
