Estimate on Average of Function + its Integral by its Second derivative Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be $C^2$, show there exists a $C > 0$ s.t.
\begin{equation} \left | \frac{f(0)+f(1)}{2} - \int_0^1 f(x)  \right | \leq C \int_0^1 |f''(x)| \end{equation}
Attempt: We have by integration by parts
\begin{equation} \int_0^1 f(x) dx = f(1)-\int_0^1 xf'(x)  dx = f(1) - \frac{f'(1)}{2} -\int_0^1 \frac{x^2}{2}f''(x)  dx   \end{equation}
Therefore,
\begin{equation} f(1)-\frac{f'(1)}{2}-\int_0^1 f(x)dx = -\int_0^1 \frac{x^2}{2}f''(x)  \end{equation} In particular,
\begin{equation} |f(1)-\frac{f'(1)}{2}-\int_0^1 f(x)dx| \leq \int_0^1|f''(x)|  \end{equation}
However, I am unsure how to get the desired inequality from this. Any help would be greatly appreciated. 
 A: Notice that replacing $f$ with 
$$
f + \text{a linear part (i.e. $ax+b$)}
$$
does not change either side of the inequality intended! Just check! Thus, you may assume that WLG that $f(1)=f'(1)=0$. Now your last line follows. (Just by crude estimate of $|x^2| \leq 1$ on the interval.
A: Define the following function : $$ F : x\mapsto\int_{0}^{x}{f\left(t\right)\mathrm{d}t}-f\left(1\right)x $$
$ \bullet \ F \in \mathscr{C}^{2}\left(\left[0,1\right],\mathbb{R}\right) \cdot $
Let's apply Lagrange's generalised mean-value theorem to $ f $ on a segment $ \left[0,1\right] $ : $$ F\left(1\right)-F\left(0\right)-\frac{F'\left(0\right)}{2}=\frac{F''\left(c\right)}{6},\ \ \ \text{For some }c\in\left[0,1\right] $$
$$ \iff \int_{0}^{1}{f\left(t\right)\mathrm{d}t}-\frac{f\left(0\right)+f\left(1\right)}{2}=\frac{1}{6}\int_{0}^{c}{f''\left(t\right)\mathrm{d}t}+\frac{1}{6}f'\left(0\right) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $$
Thus : \begin{aligned} \left|\frac{f\left(0\right)+f\left(1\right)}{2}-\int_{0}^{1}{f\left(t\right)\mathrm{d}t}\right|&=\frac{1}{6}\left|\int_{0}^{c}{f''\left(t\right)\mathrm{d}t}\right|+\frac{1}{6}\left|f'\left(0\right)\right| \end{aligned}
Since $ \mathbb{R} $ has the Archimedean property, there is some $ n\in\mathbb{N} $, such that : $$ \left|f'\left(0\right)\right|\leq n\left|f'\left(1\right)-f'\left(0\right)\right|=n\left|\int_{0}^{1}{f''\left(t\right)\mathrm{d}t}\right|\leq n\int_{0}^{1}{\left|f''\left(t\right)\right|\mathrm{d}t} $$
Hence : \begin{aligned} \left|\frac{f\left(0\right)+f\left(1\right)}{2}-\int_{0}^{1}{f\left(t\right)\mathrm{d}t}\right|&\leq\frac{1}{6}\left|\int_{0}^{c}{f''\left(t\right)\mathrm{d}t}\right|+\frac{n}{6}\int_{0}^{1}{\left|f''\left(t\right)\right|\mathrm{d}t}\\ &\leq\frac{1}{6}\int_{0}^{c}{\left|f''\left(t\right)\right|\mathrm{d}t}+\frac{n}{6}\int_{0}^{1}{\left|f''\left(t\right)\right|\mathrm{d}t}\\ &\leq\frac{n+1}{6}\int_{0}^{1}{\left|f''\left(t\right)\right|\mathrm{d}t} \end{aligned}
In this case, our $ C $ would be $ \frac{n+1}{6} \cdot $
