Mean value theorem
For a continuously differentiable function on $(u,v)$ and for any $u < a < b < v$ there exists at least one $c$ in $[a,b]$ with $f'(c) = (f(b)-f(a))/(b-a)$.
In this demo, $f(x) = x^3 - x - 1$ and $[u,v] = [-3/2, 3/2]$. For a given selection of $[a,b]$ a secant line is drawn and for any value $c$ found a tangent line is drawn.
Select
a′=; Select
b′=
We take a,b = extrema((a′, b′))