Let $f$ be a continuously differentiable real-valued function on $[a,b]$ such that $|f'(x)| \le K$ for all $x \in [a,b]$.
I am trying to show that $U(f,P) - L(f,P) \le K||P||(b-a)$
How can I show that for any partition $P$, $U(f,P)-L(f,P) \le ||P||(f(b)-f(a))$ ?
where $||P||$ denotes the norm of partition $P$.
I know that $U(f,P)-L(f,P) = \sum_{r=0}^n(M_r-m_r)(x_r-x_{r-1})$
where $M_r$ denotes the supremum of $f$ in $[x_{r-1},x_r]$ and $m_r$ denotes the infimum of $f$ in $[x_{r-1},x_r]$
I can see that $x_r-x_{r-1} \le ||P||$ for every $r$.
If I prove this, I shall use the Mean Value Theorem and then I'll be done
Note that by the mean value theorem, for any $x,y \in [x_{r-1},x_r]$ there exists $\xi$ between $x$ and $y$ such that
$$|f(x) -f(y)| = |f'(\xi)||x-y|\leqslant|f'(\xi)|(x_r - x_{r-1}) \leqslant K(x_r - x_{r-1}) \leqslant K\|P\|,$$
and
$$M_r - m_r = \sup_{x,y \in [x_{r-1},x_r]}|f(x) - f(y)| \leqslant K \|P\|$$
Thus,
$$U(f,P)-L(f,P) = \sum_{r=1}^n(M_r-m_r)(x_r-x_{r-1}) \leqslant \sum_{r=1}^nK\|P\|(x_r-x_{r-1}) = K\|P\|(b-a)$$