TITLE: An Odd Mean Value Theorem Problem
QUESTION [11 upvotes]: If $f: [x_1,x_2] \to \mathbb{R}$ is differentiable, show for some $c \in (x_1,x_2)$ that 
$$
\frac{1}{x_1-x_2} \left| \begin{matrix} x_1 & x_2 \\
f(x_1) & f(x_2) \end{matrix} \right|=f(c)-cf'(c)
$$
My attempt: Actually taking the determinant, multiplying by a negative, and carrying across the denominator on the left gives
$$
x_1f(x_2)-x_2f(x_1)=(-f(c)+cf'(c)) \cdot (x_2-x_1)
$$
and this screams Mean Value Theorem. So I took the function $g(x)=(x_2+x_1-x)f(x)$ which is clearly differentiable on $[x_1,x_2]$, then by the Mean Value Theorem, we know there is a $c \in (x_1,x_2)$ such that 
$$
g(x_2)-g(x_1)=g'(c)(x_2-x_1)
$$
But for our function $g(x)$, we know $g(x_2)=x_1f(x_2)$ and $g(x_1)=x_2f(x_1)$. Moreover, $g'(x)= - f(x) + (x_2+x_1-x)f'(x)$. Then this gives
$$
x_1f(x_2)-x_2f(x_1)=(-f(c)+(x_2+x_1-c)f'(c))(x_2-x_1)
$$
which is so close to what we wanted to show that I do not see how this could not be the correct approach. Have I missed something or is the result false?

REPLY [8 votes]: Using Cauchy's Mean Value Theorem with functions $\frac{f(x)}x$ and $\frac1x$, we get
$$
\frac{x_1f(x_2)-x_2f(x_1)}{x_1-x_2}=\frac{\frac{f(x_2)}{x_2}-\frac{f(x_1)}{x_1}}{\frac1{x_2}-\frac1{x_1}}
=\frac{\frac{cf'(c)-f(c)}{c^2}}{-\frac1{c^2}}=f(c)-cf'(c)
$$
for some $c\in[x_1,x_2]$. For this, I believe we may need that $0\not\in[x_1,x_2]$.