The proof use intermediate value theorem? Let $x_1, \dots, x_n$ distinct points in $[\alpha, \beta]$, and $y_1, \dots, y_n$ reals with same sign. Assume that $f: [\alpha, \beta] \rightarrow \mathbb{R}$ is continuous. Then, prove that exists $\lambda \in (\alpha, \beta)$ ( or conform @arovai said $[\alpha,\beta]$ ) such that $\sum\limits_{k=1}^n f(x_k)y_k = f(\lambda) \sum\limits_{k=1}^ny_k$.
I had tried proof using the mean value theorem, but... any hint?
Thanks.
 A: Let $a_k$ be normalized coefficients,
$$\displaystyle a_k = \frac{y_k}{\sum_{j=1}^n y_j}$$ 
As all the $y_k$ are of the same sign, all the $a_k$ are positive. Also $ a_k < 1$ and $\sum_{k=1}^n a_k = 1$. Hence the sum of the $f(x_k)$ weighted by the $a_k$ is bounded above and below:
$$\min_j f(x_j) \leq \sum_{k=1}^n a_k f(x_k) \leq \max_j f(x_j)$$
Let $\min_j f(x_j) = f(x_p)$, $\max_j f(x_j) = f(x_q)$ for some concrete $x_p$ and $x_q$. Assume that $p \neq q$, because if $x_p = x_q$ then all the $f(x_j)$ are equal and the result is trivial. 
What we shown so far is that for some $x_p$ and $x_q$,
$$ f(x_p)  \leq \sum_{k=1}^n a_k f(x_k) \leq f(x_q)$$
Without loss of generality, let $x_p < x_q$. By the continuity of $f$ and the Intermediate Value Property, there must be some $\lambda \in [x_p, x_q]$ such that
$$\sum_{k=1}^n a_k f(x_k) = f(\lambda)$$.
That is, for some $\lambda \in [x_p, x_q] \subset [a, b]$,
$$\sum_{k=1}^n y_k f(x_k) = f(\lambda) \sum_{k=1}^n y_k$$
A: I'd like to provide a higher view, where this is a classic theorem pitched for more general measures.
This is the First Mean Value Theorem of Integration against a weighted counting measure $\mu$, where $\mu(x_j) = y_j$ and $\mu(x) = 0$ otherwise. So if you compare the proof provided at wikipedia to Simon S's answer, you'll notice they are the exact same proof - and this is because they are the same theorem, just with different measures.
A: Note that in the thesis we should have $\lambda \in [\alpha, \beta]$. Otherwise the assertion is false, a counterexample being $\alpha =0$, $\beta=1$, $f(x)=x$, $n=1$ and $x_1=0$, $y_1=1$. So let's prove the assertion with $\lambda \in [\alpha, \beta]$ instead. 
If $y_i=0$ for every $i = 1, ..., n$ it's trivial. Otherwise, assume without loss of generality $f(x_1) \leq f(x_2) \leq ... \leq f(x_n)$ and $y_i \geq 0$ for $i=1, ..., n$, with $y_i>0$ for at least one $i \in \{1, ..., n\}$ and let $\delta = \frac{\sum_{i=1}^n f(x_i)y_i}{\sum_{i=1}^n y_i}$. Since $\delta$ is a weighted arithmetic mean of $f(x_1), ..., f(x_n)$ we have $f(x_1) \leq \delta \leq f(x_n)$ and thus, because the continuity of $f$, there exists $\lambda \in [x_1,x_n]$ (assuming $x_1<x_n$, $[x_n,x_1]$ otherwise) such that $f(\lambda) = \delta$. Such $\lambda$ is the one we are looking for.
