Help me prove the following probldem regarding continuity of functions.

Let $f:(a,b) \rightarrow \mathbb{R}$ be a continuous function. Let $x_1,x_2,x_3,\dots,x_n \in (a,b)$. Prove that there exists a point $c \in (a,b)$ such that $$f(c) = \dfrac{f(x_1)+f(x_2)+......+f(x_n)}{n}$$

Since $x_1, x_2, \ldots, x_n \in (a,b)$, there is a closed interval $[a',b'] \subset (a,b)$ which contains all of them.
Let $$\alpha = \frac{f(x_1) + f(x_2) + \ldots + f(x_n)}{n}$$ and write $$M = \max\{f(x) : x\in [a',b']\}, \text{ and } m = \min\{f(x) : x\in [a',b']\}$$ Then $$m \leq \alpha \leq M$$ and hence by the Intermediate Value Theorem, there exists a $c \in [a',b']$ such that $$f(c) = \alpha$$
• The function $f$ is defined on $(a,b)$, rather than $[a,b]$; your argument can be easily adjusted, though. Oct 24 '13 at 13:23
• The intermediate value theorem requires that the function is continuous at the interval specified. How do we prove that the function is continuous at $[a',b']$ ? Oct 24 '13 at 13:37
• Its continuous on $(a,b)$ which contains $[a',b']$ Oct 24 '13 at 14:31
• How do we prove that $m\leq \alpha \leq M$? Oct 24 '13 at 15:05