# Prove $\int_\Omega f(x) \,dx=f(x_B) \int_\Omega1 dx+ \mathcal O(\int_\Omega1 dx \cdot \sup_{x,y\in\Omega}\|x-y\|_2^2)$?

Let $\Omega \subset \Bbb R^n$ be a convex domain and $f: \Omega \to \Bbb R$ and $f \in \mathcal C^2(\Omega)$.

Let $x_B$ be the barycentre of $\Omega$ with $$x_B:= \frac{\int_\Omega x \,dx}{\int_\Omega 1\,dx}$$

Show that $$\int_\Omega f(x) \,dx=f(x_B) \int_\Omega1\,dx+ \mathcal O\left(\int_\Omega1\,dx \cdot \sup_{x,y\in\Omega}\|x-y\|_2^2\right)$$ if $\sup_{x,y\in\Omega}\|x-y\|_2 \to0$

I've got a lack of knowledge in (functional) analysis of 2nd, 3rd and 4th term and wanted to know whether there are important sentences,etc. which I don't know and that I should know to solve this problem.

For instance I've read in a book, that a convex domain means that $\Omega$ is an open connected non-empty subset and it's convex that means that $\{(\lambda+1)x+\lambda y\mid 0 \le \lambda \le 1, x,y \in\Omega\}$, especially it's path-connected and it's also star-shaped and contractible. And I'm not sure how the integral over $\Omega$ looks like. Maybe someone could name a book and important topics which I should read through.

Replace $f(x)$ by its Taylor expansion at $x_B$, that is,

$$f(x) = f(x_B) + \nabla f(x_B)\cdot (x-x_B) + \mathcal{O}(\Vert x-x_B\Vert^2_2)\,.$$

You can do this because:

1. $f\in C^2(\bar{\Omega})$
2. $x_B \in \Omega$, because $\Omega$ is convex
3. $\sup_{y,z\in\Omega}\Vert y-z\Vert_2 \to 0$

Then, you get

\begin{align*} \int_\Omega f(x) dx &=\int_\Omega f(x_B) + \nabla f(x_B)\cdot (x-x_B) + \mathcal{O}(\Vert x-x_B\Vert^2) dx\\ &= f(x_B)\int_\Omega 1 dx + \nabla f(x_B)\cdot\int_\Omega x-x_B dx + \int_\Omega\mathcal{O}(\Vert x-x_B\Vert^2) dx\\ &= f(x_B)\int_\Omega 1 dx + \int_\Omega\mathcal{O}(\Vert x-x_B\Vert^2) dx\\ &= f(x_B)\int_\Omega 1 dx + \int_\Omega\mathcal{O}(\sup_{y,z\in\Omega}\Vert y-z\Vert^2_2) dx\\ &= f(x_B)\int_\Omega 1 dx + \mathcal{O}(\int_\Omega\sup_{y,z\in\Omega}\Vert y-z\Vert^2_2 dx)\,, \end{align*} because $$\int_\Omega x-x_B dx = 0$$ by the definition of $x_B$.