Intermediate secant slope from endpoint derivatives (source code)

= Intermediate secant slope from endpoint derivatives
{title2=$f'(a)<k<f'(b)\ \Longrightarrow\ \frac{f(b')-f(a')}{b'-a'}=k$}

Let $m=(f(b)-f(a))/(b-a)$ for a function differentiable on a neighborhood of $[a,b]$. If $m=k$, use the whole interval. If $m>k$, the continuous extension of $(f(x)-f(a))/(x-a)$ takes values $f'(a)$ and $m$ at the endpoints, so the <intermediate value theorem> supplies a secant of slope $k$ starting at $a$. If $m<k$, use the continuous extension of $(f(b)-f(x))/(b-x)$ and obtain a secant ending at $b$. The <mean value theorem> then produces an interior <derivative> equal to $k$, without requiring a continuous derivative.