Prove $\left|\int_a^bf(x)dx \right|\le \frac{(b-a)^3}{24} \max_{a\le x\le b}|f''(x)|$ Suppose that $f\in C^2 [a, b]$ and that $f(\frac{a+b}{2}) =0$ then prove that \begin{equation}  \bigg|\int_a^bf(x)dx \bigg|\le \frac{(b-a)^3}{24} \max_{a\le x\le b}|f''(x)| \end{equation}.
I know that since $f\in C^2$, by the Taylor expansion of $f$, in a neighborhood of $x_0$ up to the 2nd derivative I can express $f$ as
$$f(x) = f(x_0) +\frac{(x-x_0)}{1!}f'(x_0)+\frac{(x-x_0)^2}{2!}f''(x_0)$$
I'm not sure if this is right, but  I go ahead to write the integral as
$$\bigg| \int_a^b f(x) dx\bigg|\le \max_{a\le x\le b}|f''(x) | \bigg| \int_a^b \frac{(x-x_0)^2} {2!} dx\bigg|. $$
But I don't seem to be getting what is needed because I have to use the condition $f(\frac{a+b} {2})$. What is wrong here with my approach?
 A: Solution:
The Taylor expansion (with Lagrange remainder) of $f(x)$ at the point of $x=\dfrac{a+b}{2}$ is
\begin{align}
f(x)&=\color{blue}{\underbrace{f\left(\frac{a+b}{2}\right)}_{0}}+f^\prime\left(\frac{a+b}{2}\right)\left(x-\frac{a+b}{2}\right)+\frac{1}{2}f^{\prime\prime}\left(\xi\right)\left(x-\frac{a+b}{2}\right)^2\\
&=f^\prime\left(\frac{a+b}{2}\right)\left(x-\frac{a+b}{2}\right)+\frac{1}{2}f^{\prime\prime}\left(\xi\right)\left(x-\frac{a+b}{2}\right)^2,~~x\in[a,b],
\end{align}
where $\xi\in[a,b]$.
Integrate both sides, then we have
\begin{align}
\int_a^bf(x)dx&=f^\prime\left(\frac{a+b}{2}\right)\color{blue}{\underbrace{\int_a^b\left(x-\frac{a+b}{2}\right)dx}_{0}}+\frac{1}{2}\int_a^bf^{\prime\prime}\left(\xi\right)\left(x-\frac{a+b}{2}\right)^2dx\\
&=\frac{1}{2}\int_a^bf^{\prime\prime}\left(\xi\right)\left(x-\frac{a+b}{2}\right)^2dx.
\end{align}
Finally, there is
\begin{align}
\left|\int_a^bf(x)dx\right|&\le \frac{1}{2}\int_a^b\left|f^{\prime\prime}\left(\xi\right)\left(x-\frac{a+b}{2}\right)^2\right|dx\\
&\le\frac{A}{2}\int_a^b\left(x-\frac{a+b}{2}\right)^2dx=\frac{(b-a)^3}{24}A,
\end{align}
where $A=\underset{a\le x\le b}{\max}\left|f^{\prime\prime}(x)\right|$.
A: First let's do a little shifting. Assume $a<b$. Let $c=|b-a|/2$ and let $m=(a+b)/2$. Then,
$$\int_{a}^{b}f(x)\mathrm dx=\int_{-c}^c g(x)\mathrm dx$$
Where $g(x)=f(x-m)$. The point is that we can WLOG consider only symmetric intervals $(-c,c)$. So we will proceed under this assumption. You can shift it back at the end if you'd like.

Assume $c>0$. We would like to show
$$\left|\int_{-c}^c g(x)\mathrm dx\right|\leq \frac{c^3}{3}\max_{x\in[-c,c]}\left|g''(x)\right|$$
Under the assumption that $g\in C^2((a,b),\Bbb R)$ and $g(0)=0$.
Let's start. From Taylor's theorem we know that, $\exists~ \xi(x)\in(0,x)$ such that
$$g(x)=g(0)+g'(0)~x+\frac{g''(\xi(x))}{2!}~x^2 \\ =g'(0)x+\frac{g''(\xi(x))}{2!}x^2$$
Since $g(0)=0$. Then,
$$\int_{-c}^c g(x)\mathrm dx=\int_{-c}^c \left(g'(0)~x+\frac{g''(\xi(x))}{2!}~x^2\right)\mathrm dx \\ =\frac{1}{2}\int_{-c}^c g''(\xi(x))~x^2~\mathrm dx$$
Now let
$$M=\max_{x\in[-c,c]}|g''(\xi(x))|=\max_{\xi\in[-c,c]}|g''(\xi)|$$
(This is because $\xi:[-c,c]\to[-c,c]$).
Then,
$$\left|\int_{-c}^c g(x)\mathrm dx\right|\leq \frac{M}{2}\int_{-c}^c x^2~\mathrm dx$$
Evaluating the simple integral, we get the desired bound:
$$\left|\int_{-c}^c g(x)\mathrm dx\right|\leq \frac{c^3}{3}~\max_{\xi\in[-c,c]}|g''(\xi)|$$

Your mistake was assuming $\xi(x)=0$.
