TITLE: Mean value theorem and the axiom of choice
QUESTION [10 upvotes]: There's this theorem in Spivak's book of Calculus: 

Theorem 7
Suppose that $f$ is continuous at $a$, and that $f'(x)$ exists for all $x$ in some interval containing $a$, except perhaps for $x=a$. Suppose, moreover, that $\lim_{x \to a} f'(x)$ exists. Then $f'(a)$ also exists, and 
  $$f'(a) = \lim_{x \to a} f'(x)$$
Proof
By definition,
  $$f'(a) = \lim_{h \to 0} \frac{f(a+h)-f(a)}{h}$$
  For sufficiently small $h>0$ the function $f$ will be continuous on $[a,a+h]$ and differentiable on $(a,a+h)$ (a similar assertion holds for sufficiently small $h<0$). By the Mean Value Theorem there is a number $\alpha_h$ in $(a,a+h)$ such that
  $$\frac{f(a+h)-f(a)}{h} = f'(\alpha_h)$$
  Now $\alpha_h$ approaches $a$ as $h$ approaches $0$, because $\alpha_h$ is in $(a,a+h)$; since $\lim_{x \to a} f'(x)$ exists, it follows that
  $$f'(a) = \lim_{h \to 0} \frac{f(a+h)-f(a)}{h} = \lim_{h \to 0} f'(\alpha_h) = \lim_{x \to a} f'(x)$$
  (It is a good idea to supply a rigorous $\epsilon$-$\delta$ argument for this final step, which we have treated somewhat informally.) $\blacksquare$

Following the recommendation of supplying the details I had the question of $\alpha_h$ being a choice function. This is because for every $h$ there is the possibility of having a lot of points $c$ such that $f'(c)=\frac{f(a+h)-f(a)}{h}$. Then we choose one of them to have a function $\alpha_h$. I'm not sure though because I'm always struggling with the axiom of choice that I cannot distinguish if it's needed or not. Also maybe in this case what the author is saying is something different. Can you guys please help me?

REPLY [4 votes]: The Mean Value Theorem is a consequence of Rolle's Theorem, which says that if $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$, and $f(a)=f(b)$, then there exists $c \in (a,b)$ such that $f'(c)=0$. This is proven by letting $c$ be a point where $f$ attains its global minimum or maximum on $(a,b)$; such a point must have $f'(c) = 0$.
To avoid having to make a choice here, you can specify $c$ uniquely as:
$$c = \sup\{x \in (a,b) | f \text{ attains its global minimum or maximum at } x\}$$
Then $f$ attains its global minimum or maximum at $c$, by continuity. (See [1] below for what to do if $c=b$.)
Armed with this version of Rolle's Theorem, you can use it to prove a similar non-choice version of the Mean Value Theorem. You can then use this theorem in your proof.

[1] It can happen that this supremum is equal to $b$, which we don't want. In this case:

if $f(b)$ is a global minimum but not a global maximum, let $c = \sup\{x \in (a,b) | f \text{ attains its global maximum at } x\}$;
if $f(b)$ is a global maximum but not a global minimum, let $c = \sup\{x \in (a,b) | f \text{ attains its global minimum at } x\}$;
if $f(b)$ is both a global minimum and a global maximum, then $f$ is consant, so we can choose $c=\frac12(a+b)$.