Let $f:[a,b]\rightarrow \mathbb{R} $ be differentiable with $f'(a) = f'(b)$. There exist a $c\in(a,b)$ such that $f'(c) = \frac{f(c) - f(a) }{c -a}$. Can someone help me with the following problem?

Let $f:[a,b]\rightarrow \mathbb{R} $ be differentiable and suppose that $f'(a) = f'(b)$. Show that there exist a $c\in(a,b)$ such that $f'(c) = \frac{f(c) - f(a) }{c -a}$.

My idea is to take first the case $f'(a) = f'(b) = 0$. In this case, consider 
$$\phi(x) = \frac{f(x)-f(a)}{x-a}, \quad \forall x \in (a,b],$$
and $\phi(a) = 0$. Is obvious that $\phi$ is continuous in $(a,b]$. While in $a$, the continuity of $\phi(a)$ follows from the fact $$\lim_{x\to a^{+}} \phi(x) = f'(a) = 0 = \phi(a).$$
Therefore, $\phi$ is continuous in $[a,b]$. So, $\phi$ attains its maximum and its minimum in $[a,b]$. If one of them is in $(a,b)$, let $c$ be this point. So, since $\phi$ is differentiable in $(a,b)$, I know that we must have $\phi'(c) = 0$. But
$$\phi'(x) = \frac{f'(x)}{x-a} - \frac{f(x)-f(a)}{(x-a)^2}.$$
So
$$\phi'(c) = 0 \Rightarrow f'(c) = \frac{f(c) - f(a) }{c -a}.$$
The problem is that I can't ensure that a point of maximum or minimum must be in $(a,b)$. 
Note that, once I solve this case ($f'(a) = 0$), the general case is solved just considering $g(x) = f(x) - f'(a) x$. Because $g'(a) = g'(b) = 0$. And then if there exists a $c\in(a,b)$ with 
$$ g'(c) = \frac{g(c)-g(a)}{c-a},$$
then
$$f'(c) - f'(a) = \frac{f(c) - f'(a)c -f(a) + f'(a)a}{c-a} = \frac{f(c) -f(a)}{c-a} - f'(a).$$
Therefore,
$$f'(c) = \frac{f(c) - f(a) }{c -a}.$$

Assume that the only extremum points of $\phi$ are $a$ and $b$. Without loss of generality, we assume that $\phi(a) \leq \phi(x) \leq \phi(b)$ for all $x \in [a,b]$. The second inequality means that
$$
f(x) \leq f(a) + (x-a) \phi(b)
$$
for all $x \in [a,b]$. This yields, for any $x \in [a,b)$,
$$
\frac{f(b)-f(x)}{b-x} \geq \frac{f(b)-f(a)-(x-a)\phi(b)}{b-x} = \frac{f(b)-f(a)}{b-a}.
$$
Letting $x \to b^{-}$, we deduce $f'(b) \geq \phi(b)$. Since $f'(b)=f'(a)$, we have $f'(a) \geq \phi(b)$, so $\phi(a) \geq \phi(b)$. This implies that $\phi$ is constant, and this is a trivial case.
Hence either $\phi$ is constant, or $\phi$ has an interior critical point. In both cases, your proof is complete.
