Problem
Assume $f(x)$ is differentiable over $[a,b]$ and $f'(a)=f'(b)$. Prove there exists $c \in (a,b)$ such that $$f(c)-f(a)=(c-a)f'(c).$$
Please notice that this is not Lagrange's Mean Value theorem at all.
Proof
Denote$$g(x):=\begin{cases}\dfrac{f(x)-f(a)}{x-a},&x \in (a,b],\\f'(a),&x=a.\end{cases}$$Then $g(x)$ is continuous over $[a,b]$ and differentiable over $(a,b)$. In order to prove the original consequence, it is sufficient to show that $$\exists c \in (a,b):g'(c)=0.\tag{*}$$ According to the continuity of $g(x)$ over such a closed interval, it can achieve its maximum and minimum values over $[a,b]$. If it achieve such a value (no matter it is maximum or minimum) over $(a,b)$, then by Fermat's Lemma, $(*)$ holds. If not, without loss of generality, we assume $$\forall x \in [a,b]:g(a)\leq g(x)\leq g(b),\tag{**}$$ the right hand of which can be rewritten as$$\forall x \in [a,b]:f(x)\leq f(a)+(x-a)g(b).$$Thus,$$\forall x \in [a,b):\frac{f(b)-f(x)}{b-x}\geq \frac{f(b)-f(a)-(x-a)g(b)}{b-x}=\frac{f(b)-f(a)}{b-a}=g(b).$$Taking the limits when $x \to b$,we obtain$f'(b)\geq g(b)$,and therefore $$g(a)=f'(a)=f'(b)\geq g(b).\tag{***}$$ Combining with $(**)$, we can see $g(x)$ is constant,and hence $\forall x \in (a,b):g'(x)\equiv 0$,$(*)$ also holds. We are done.
Please correct me if I'm wrong!