TITLE: The proof use intermediate value theorem?
QUESTION [5 upvotes]: 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.

REPLY [2 votes]: 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.