# Intermediate value theorem for mean

Suppose the function $f:\mathbb{R}\rightarrow\mathbb{R}$ is continuous. For a natural number $k$, let $x_1,x_2,...,x_k$ be points in $[a,b]$. Prove there is a point $z$ in $[a,b]$ at which $$f(z)=(f(x_1)+f(x_2)+...+f(x_k))/k$$.

So I'm thinking about applying the intermediate value theorem:

If $$a<x_1<b,a<x_2<b,...,a<x_k<b$$, then $$f(a)<f(x_1)<f(b),...,f(a)<f(x_k)<f(b)$$ or $$k.f(a)<f(x_1)+...+f(x_k)<k.f(b)$$ $$f(a)<(f(x_1)+f(x_2)+...+f(x_k))/k<f(b)$$

But I couldn't think of any way to prove that $f(a)<f(x_k)<f(b)$ or is it even true?

EDIT: Thanks everyone for your effort.

-
How do you know that $f(x_{k}) < f(b)$ or $f(x_{k}) > f(a)$ for any natural number $k$? –  anbarief Oct 30 '13 at 8:40

Hint:

Take $z\in\{x_1,\cdots x_k\}$ such that $f(z)\le f(x_j)$ for any $x_j$.

Take $w\in\{x_1,\cdots x_k\}$ such that $f(w)\ge f(x_j)$ for any $x_j$.

Then $$f(z)\le \frac{f(x_1)+\cdots+f(x_k)}{k}\le f(w)$$

Now, use the intermediate value theorem.

-

$m\le {1\over k}\sum_{i=1}^{k} f(x_i)\le M$ where $M= \max f(x),m=\min f(x)$ on $[a,b]$, Now apply IVT

-