Can somebody check my proof of this theorem about the derivative? I proved the following theorem and would greatly appreciate it if someone could check my proof:
Theorem: Let $f:[a,b]\to \mathbb R$ be differentiable and $\alpha$ such that $f'(a) < \alpha < f'(b)$ (or $f'(a) > \alpha > f'(b)$ ) then there exists $c\in (a,b)$ with $f'(c) = \alpha$
Proof: Define a map $g:[a,b]\to \mathbb R$ , $x \mapsto f(x) - x \alpha$. This map is continuous. Therefore $g$ attains a minimum on $[a,b]$. Let $c$ be in $[a,b]$ with the property that $g(c) = \min_x g(x)$. If $c=a$ (or $c=b$) then $g(a) = f(a) -a\alpha \le g(x) = f(x) - x\alpha$   and therefore for all $x \in [a,b]$: 
${f(a)-f(x)\over a - x} \ge \alpha > f'(a) = \lim_{x \to a}{f(a) - f(x) \over a-x}$.
As this holds for all $ x\in [a,b]$ it follows that 
$\lim_{x\to a}{f(a)-f(x)\over a - x} \ge \alpha > f'(a) = \lim_{x \to a}{f(a) - f(x) \over a-x}$ which is a contradiction. Similarly derive a contradiction for $c=b$. Therefore $c \in (a,b)$. But if $g$ attains an extremum on $(a,b)$ then $g'(c)=0$ and hence $f'(c) = \alpha$.

This is the Darboux's theorem
One point that is false : you divide by $a-x$ but this is negative so you must change the inequality.
This leads to $\frac{f(x) - f(a)}{x-a} <= \alpha$. Take a look at the min of $f(x)-x\alpha$ similarly to complete the proof
