Artificial intelligent assistant

Prove there exists $x \in (a,b)$ such that the following holds Let $f$ be continuous on $(a,b)$ and let $x_1,...,x_n \in (a,b)$. Then, there exists $x \in (a,b)$ such that $$ f(x) = \frac{ f(x_1) + ... + f(x_n) }{n} $$ ### attempt The natural thing to do is to define $F(x) = nf(x) - f(x_1) - ... - f(x_n)$. Sice $x_i \in (a,b)$ for all $i$, the $f(b) \geq f(x_i)$ for all $i$ so $F(b) > 0$ and similarly $F(a)<0$, thus by IVT there is some $c \in (a,b)$ such that $F(c) = 0$ which gives the result. However, I feel like Im missing something here. Can I assume $f$ is monotonic?

Hint:

Let $i_{\mathrm{max}}$ be the value of $i$ that maximizes $f(x_i)$, and similarly $i_{\mathrm{min}}$ the value of $i$ that minimizes $f(x_i)$.

What can you then say about $F(x_{i_{\mathrm{max}}})$ and $F(x_{i_{\mathrm{min}}})$?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 98516560a5128e857adc2dd826ae838c