If $f$ is continuously differentiable in $[a,b]$, $f(a)=f(b)$, and $f'(a)=f'(b)$, then there exist $aThis problem is from Apostol's Mathematical Analysis:

Let $f$ be continuously differentiable in $[a, b]$. If $ f(a) = f(b)$ and if
  $f^{'}(a) = f^{'}(b)$, then prove that there exists $x_1$ and $x_2$ in $(a, b)$ such that $x_1\neq x_2$ but $f^{'}(x_1) = f^{'}(x_2)$.

My try:
By Rolle's Theorem $\exists x_0\in (a,b) $ such that $f^{'}(x_0)=0$.
How to guarantee existence of $x_1,x_2 $ from here?
Can it be solved from a geometrical point of view?
 A: As you said, by Rolle's Theorem, we are guaranteed existence of $c \in (a,b)$ such that $f'(c) = 0$.  WLOG, let $f'(a) = f'(b) = k > 0$.  By the continuity of $f'$ and the intermediate value theorem, we get existence of $c_1 \in (a,c)$ such that $f'(c_1) = k_1$ where $0<k_1<k$.  Similarly, we get $c_2 \in (c,b)$ such that $f'(c_2) = k_1$.
Now, if $f'(a) = 0$, then let's look at some cases.  If $f(c) \neq f(a)$, then the mean value theorem gives existence of $d \in (a,c)$ such that $\alpha = f'(d) = \frac{f(c) - f(a)}{c - a}\neq 0.$  Now, we can apply the above argument again. 
If $f(c) = f(a) = f(b)$, then if $f'$ is nonzero at some point in the interval, the above argument works.  Otherwise, $f'$ is $0$ and the result follows.
A: (i) Let's suppose that $f'(a)>0$ (then we'll see the case $f'(a)=0$).
Because of (i), you can find a $\eta > 0$ (as small as it is) that we have $f(a + \eta) > f(a)$ and $f(b - \eta) < f(b)$.
$f$ is continuous on $[a + \eta, b-\eta]$, therefore there exists $c \in [a + \eta; b - \eta]$ so that $f(c) = f(a) = f(b)$. ($f(c)$ in $[f(a+\eta], f(b-\eta)])$.
$f$ is continuous on both intervals $[a, c] $ and $[c, b]$ and reach its maximums in a $x_1$ and $x_2$ ($x_1$ in $(a, c)$ and $x_2$ in $(c, b)$ because $a, c$ and $b$ are not the maximum since $a+\eta$ and $b-\eta$). 
We have $f'(x_1) = f'(x_2) = 0$
Opposite reasonning for $f'(a)<0$ leading to the same conclusion
(ii) if $f'(a) = 0$ because of Rolle's theorem you know that you have a $c$ in $(a,b)$ that $f'(c) = 0$. Assume that $f(c) = f(a)$ (then we reapply this reasonning on $a$ and $c$ instead of $a$ and $b$ until finding a $c_n$ that $f(c_n)$ is different from $f(a)$, if we can not find one then $f$ is constant and any $c_1<c_2$ in $(a, b)$ will do)
We have a $f(a) < f(c)$ and $f'$ continuous on $[a, c]$ and $f'(a) = f'(c) = 0$ but $f'$ not equal to $0$ and it exists a $c_1$ in $(a, c)$ so that $f'(c_1)>0$ because $f(a) < f(c)$.
Because of that and $f'$ continuous on this interval, $f'$ reaches its maximum in $d$ in $(a;c)$ and because of its continuity $f'$ reaches $f'(d)/2$ in two points $x_1,x_2$, where $a<x_1<d<x_2<c<b$. 
