<s>[INST] $f(x)>0, f''(x)>0$. Prove: $\int_a^b f(x) dx > (b-a) f(\frac{a+b}{2})$ On $[a,b]$ function $f$ is differentiable for arbitrary order, and $f(x)>0, f''(x)>0$. Prove: $\int_a^b f(x) dx > (b-a) f(\frac{a+b}{2})$.
I first try Taylor expansion at $x_0=\frac{a+b}{2}$, and drop higher order term ($(x-x_0)^3$ terms). But this works only locally at the neighborhood of $x_0$. How to prove this inequality on a finite interval? Thank you.
 [/INST] Let $L(x) = f'\left(\frac{a+b}{2}\right)\left(x - \frac{a+b}{2}\right) + f\left(\frac{a+b}{2}\right)$. Then, $L$ describes the line tangent to $f$ at $x=\frac{a+b}{2}$. Note that:
$$\int_{a}^{b}L(x)\ dx = (b-a)f\left(\frac{a+b}{2}\right)$$
Now, consider $g(x) = f(x)-L(x)$. Note that $g''(x) > 0$ because $L''(x)=0$ and $f''(x)>0$. Additionally, note that $ g\left(\frac{a+b}{2}\right) = g'\left(\frac{a+b}{2}\right) = 0$.
Note that $g'(x)$ is an increasing function because $g''(x)>0$. Then, since $g'\left(\frac{a+b}{2}\right) = 0$, we must have $g'(x) > 0$  for $x>\frac{a+b}{2}$. Repeating this argument for $g(x)$, we can see that $g(x)>0$ for $x>\frac{a+b}{2}$.
Similarly, since $g'(x)$ is increasing and $g'\left(\frac{a+b}{2}\right) = 0$, we must have $g'(x)<0$ for $x<\frac{a+b}{2}$. This shows that $g(x)$ is decreasing for $x<\frac{a+b}{2}$. Combining this with $g\left(\frac{a+b}{2}\right) = 0$, we see that $g(x) > 0$ for $x<\frac{a+b}{2}$.
We can conclude that $g(x) > 0$ for all $x\neq \frac{a+b}{2}$. Thus:
$$\int_{a}^{b}g(x)\ dx = \int_{a}^{b}f(x) - L(x)\ dx > 0$$
$$\int_{a}^{b}f(x)\ dx > \int_{a}^{b}L(x)\ dx$$
$$\boxed{\int_{a}^{b}f(x)\ dx > (b-a)f\left(\frac{a+b}{2}\right)}$$
An intuitive but less rigorous way to understand this is that $f(x)$ is always above $L(x)$ because convex functions (defined by $f''(x)>0$) "curve" upwards from their tangent lines.

</s>