How to find a $c \in \mathbb [a, b]$ such that $f(c) = [f(x_1) + f(x_2) + ... + f(x_n)] / n$? So suppose I have a continuous function on, say, $[a,b]$ with $x_1, x_2, ..., x_n \in [a, b]$. I want to prove that there exists a $c \in [a, b]$ such that $f(c) = [f(x_1) + f(x_2) + ... + f(x_n)] / n$. I thought about using mathematical induction at first for n. In this case, $n = 1$ is trivial since $f(x_1) = f(x_1)$. But then I need to begin with $n = 2$, as in finding a $c \in [a, b]$ such that $f(c) = [f(x_1) + f(x_2)]/n$. However, all the theorems I've tried so far don't seem to work. For instance, the Bolzano Intermediate Value Theorem doesn't work since there is a possibility that $f(b) \lt [f(x_1) + f(x_2)]/n$ or $[f(x_1) + f(x_2)]/n \lt f(a)$. I'm very stuck on this and I'm not sure where to begin. Any help would be much appreciated. 
 A: The key points are that $f$ is continuous, $[a,b]$ is compact and connected, and continuous functions on compact connected sets attain extreme values, as well as all values between those extreme values on compact connected sets. 
Somewhat more formally:
Since $f$ is continuous, and $[a,b]$ is compact, it follows that there exist $x_{m},x_{M} \in [a,b]$ such that for all $x \in [a,b]$, $f(x_{m}) \leq f(x) \leq f(x_{M})$. Now, let $\lbrace x_{1}, \ldots, x_{n} \rbrace \subset [a,b]$, then $nf(x_{m}) \leq \sum_{j=1}^{n}f(x_{j}) \leq nf(x_{M})$. Since $f$ is continuous, and $[a,b]$ is connected, it follows that $\frac{1}{n}\sum_{j=1}^{n}f(x_{j}) \in f([a,b])$ (this is nothing more than the intermediate value theorem!); that is, there exists $c \in [a,b]$ such that $f(c) = \frac{1}{n}\sum_{j=1}^{n}f(x_{j})$.
Hope this helps!
A: Hint:


*

*Just consider $g(x) = f(x)-\frac{1}{n}\sum_{k=1}^nf(x_k)$ on $[a,b]$ and evaluate $g$ at the points where $f$ attains its minimum and maximum, resp.

*Since $g$ is continuous on [a,b], this gives a point $c \in [a,b]$ with $g(c) = 0$. So, you found your $c$.

