If $f : [a,b]\to\Bbb R$ is continuous, are there $x_1,x_2\in (a,b)$ such that $\tfrac{f(b)-f(a)}{b-a} = \tfrac{f(x_1)-f(x_2)}{x_1-x_2}$? I just thought about the mean value theorem and wondered whether the following statement is true:

If $f : [a,b]\to\Bbb R$ is continuous, then there are $x_1,x_2\in (a,b)$
  such that $\tfrac{f(b)-f(a)}{b-a} = \tfrac{f(x_1)-f(x_2)}{x_1-x_2}$.

One way to look at it is to consider the function $F : \{(x,y) : x,y\in[a,b],\,y>x\}\to\Bbb R$, defined by $F(x,y) = \tfrac{f(x)-f(y)}{x-y}$. If there don't exist such $x_1,x_2$, then $(a,b)$ is a maximum of a minimum of $F$. But I don't know what to conclude from that. Does anybody have an idea?

First, without loss of generality assume that $f(a) = 0$(why can we do this?).
Next, set $h(x) = \frac{f(b)(x-a)}{b-a}$ on the interval $[a,b]$. This function is continuous. Note that $h(a) = 0$ and $h(b) = f(b)$.
Therefore, so is $g(x)  = h(x) - f(x)$ on $[a,b]$. Note that $g(a)  = 0$ and $g(b) = 0$.

Suppose there existed $x,y$ such that $g(x) = g(y)$ on $[a,b]$. Then, $h(x) - h(y)  = f(x) - f(y)$, resulting in $\frac{f(b) - f(a)}{b-a} =\frac{f(x) - f(y)}{x-y}$, while noting that $f(a) = 0$. 
Therefore, all we are reduced to proving is that there exist $x,y \in (a,b)$ such that $g(x) = g(y)$, for any continuous function $g$ on $[a,b]$ satisfying $g(a) =g(b) = 0$.

First of all, note that if $g$ is constant then of course we are done.
Without loss of generality, assume that $\max_{[a,b]} g(x) > 0$. (Otherwise, take $-g$). Now, the maximum is attained at a point $z$, where $z \in (a,b)$ (because $g$ is zero at the endpoints). If it is attained in two different points, then we are done by taking those two points. So we assume only one maximum exists.
Let $\delta > 0$ be such that $|y-z| < \delta \implies f(z)> f(y) >  0$. Let $y$ satisfy $|y-z| < \delta$, and $b > y > z$. Then define $l : [a,y] \to \mathbb R$ by $l(x) = g(x) - g(y)$. Note that $l$ is continuous, $l(a) < 0$ and $l(z) > 0$. So there exists $b \in (a,z)$ such that $l(b) = 0$ or that $g(b) = g(y)$. Hence, we are done.

EDIT : Here is the strengthening.

Let $g$ be a non-constant continuous function on $[a,b]$ such that $g(a) = g(b) = 0$(WLOG , $g(y) > 0$ for some $y$) . Let $z$ be any point at which $g(z) = \max_{[a,b]} g$(such a point exists, definitely). Let $d_z = \min\{z-a,b-z\}$. Then for all $v < d_z$, there exist points $x_1,x_2 \in (a,b)$ such that $x_1 - x_2 = v$ and $g(x_1) = g(x_2)$.

Proof : let $J(x)$ be defined on $(z-d_z,z+d_z)$ and be given by $J(x) = g(x) - g(x+v)$. Then, $J(z-v) \leq 0$ and $J(z) \geq 0$, so there is some point $l \in (z-v,z)$ such that $J(l) = 0$, or that $g(l) = g(l+v)$.
Note that if there are many maximums, then choosing a very central maximum(thus maximizing $d_z$) allows us to expand the range of values that $x_1 -x_2$ can attain.
