# Weighted Average Fixed Point Theorem

I was wondering if someone can help with the following question. I am pretty sure I have to apply the Intermediate Value Theorem for the solution, just I am not quite sure exactly how to set the problem up so I can the theorem.

The problem is as follows:

Suppose that $f(x)$ is continuous over $[a,b]$. Let $a<x_1<x_2<\ldots<x_n<b$. Let $w_1,\ldots, w_n$ be $n$ positive real numbers to be interpreted as weights. Show that there exists $c\in[a,b]$ such that $f(c)=\frac{w_1f(x_1) + \ldots + w_nf(x_n)}{w_1+\ldots + w_n}$.

Let $p_j = \frac{w_j}{\sum_{j=1}^n w_j}$ for $1 \leq j \leq n$.
Then $\sum_{j=1}^n p_j = 1$.
Moreover, $(\sum_j p_j )(\inf_{x \in [a,b]} f(x)) \leq \frac{w_1 f(x_1)+ ... + w_n f(x_n)}{w_1 + ... + w_n} \leq (\sum_j p_j)(\sup_{x \in [a,b]}f(x))$
Hence, $(\inf_{x \in [a,b]} f(x)) \leq \frac{w_1 f(x_1)+ ... + w_n f(x_n)}{w_1 + ... + w_n} \leq (\sup_{x \in [a,b]}f(x))$.
By the continuity of $f$ on the compact interval $[a,b]$, the infimum and the supremum of $f$ are both attained. So we can invoke the Intermediate Value Theorem to conclude that there exists a $c \in [a,b]$ such that $f(c) = \frac{w_1 f(x_1)+ ... + w_n f(x_n)}{w_1 + ... + w_n}$
You may assume that $f(x_1)\le\ldots\le f(x_n)$. Then $$f(x_1) \le \frac{w_1f(x_1)+\ldots+w_nf(x_n)}{w_1+\ldots+w_n} \le f(x_n).$$ By the IVT, there is a $c$ between $x_1$ and $x_n$ such that $f(c)=\frac{w_1f(x_1)+\ldots+w_nf(x_n)}{w_1+\ldots+w_n}$.