Let $f:[0,1] \to \mathbb{R}$ be continuously differentiable function I was practicing calculus today and stumbled across this problem.
I have tried solve using properties of inequalities but it doesn't get me far.

Let $f:[0,1] \to \mathbb{R}$ be continuously differentiable function and 
  $$
\bigg|\space\frac{f(0)+f(1)}{2} -\int_0^1 f(x)\space  dx  \space\bigg|\le \alpha \space\space \max( |f'(x)|), \space\space x\in[0,1]$$

Then find the possible values of $\space\alpha$ .
Any ideas that can solve this easily ? Thank you.
 A: \begin{align}
\bigg|\,\frac{f(0)+f(1)}{2}-\int_0^1f(x)dx\,\bigg|=&\\
\bigg|\,\frac{f(0)+f(1)}{2}-\int_0^1\left(f(0)+\int_0^xf'(y)dy\right)dx\,\bigg|=&\\
 \bigg|\,\frac{f(1)-f(0)}{2}-\int_0^1\int_0^xf'(y)dydx\,\bigg|=&\\
\bigg|\,\frac{1}{2}\int_0^1f'(y)dy-\int_0^1\int_0^xf'(y)dydx\,\bigg|= &\\
\bigg|\,\frac{1}{2}\int_0^1f'(y)dy-\int_0^1\int_y^1f'(y)dxdy\,\bigg|= &\\
\bigg|\,\int_0^1f'(y)\left(\frac{1}{2}-\int_y^1dx\right)dy\,\bigg|= &\\
\bigg|\,\int_0^1\
\left(y-\frac{1}{2}\right)f'(y)dy\,\bigg|\le&\\
\int_0^1\
\bigg|\,\left(y-\frac{1}{2}\right)f'(y) \bigg|\, dy\le&\\
\max_{0\le x\le1}(|f'(x)|)\int_0^1\bigg|y-\frac{1}{2}\bigg|dy=&\\
\max_{0\le x\le1}(|f'(x)|)\left(\int_0^\frac{1}{2}\left(\frac{1}{2}-y\right) dy+ \int_\frac{1}{2}^1\left(y-\frac{1}{2}\right) dy\right)\\
=\frac{1}{4} \max_{0\le x\le1}(|f'(x)|)
\end{align}


*

*The first, third and sixth equations follow from the second fundamental theorem of calculus:
$$
 f(x)=f(0)+\int_0^xf'(y)dy\\
 f(1)-f(0)=\int_0^1f'(y)dy\\
\int_y^1dx=1-y\ .
$$

*The second and fifth equations follow from algebraic manipulations, $\displaystyle\ \int_0^1f(0)\,dx=f(0) \ $, and the linearity of integrals.

*The fourth equation follows from the fact that a double integral $\displaystyle\ \iint_R\varphi(x,y)dxdy\ $ over the set $\ R=\left\{\left.(x,y)\in\mathbb{R}^2\right|0\le y\le x\le1\right\}\ $ can be evaluated either as $\displaystyle\ \int_0^1\int_0^x \varphi(x,y)\,dydx\ $ or as $\displaystyle\ \int_0^1\int_y^1 \varphi(x,y)\,dxdy\ $.

*The first inequality is an instance of the general theorem that $\displaystyle\ \bigg|\int_a^bg(y)\,dy\bigg|\le\int_a^b\bigg| g(y) \bigg|\,dy\ $ and the second is an instance of the general theorem that if $\ 0\le\varphi(x)\ $ and $\ 0\le\psi(x)\le M\ $, then $\ \int_a^b\varphi(y)\psi(y)\,dy\le$$M\int_a^b\varphi(y)\,dy\ $.

*The last two equations are just steps in the evaluation of the integral $\displaystyle\ \int_0^1\bigg|y-\frac{1}{2}\bigg|dy\ $, which is done by splitting its range into the intervals $\ \left[0,\frac{1}{2}\right]\ $ where $\ y\le \frac{1}{2}\ $ and hence $\ \left|y-\frac{1}{2}\right|= \frac{1}{2}-y\ $, and $\ \left[\frac{1}{2},1\right]\ $ where $\ y\ge \frac{1}{2}\ $ and hence $\ \big|y-\frac{1}{2}\big|=y-\frac{1}{2}\ $.


It follows from all this that $\ \alpha\ $ could be any real number that is at least as large as $\ \frac{1}{4}\ $.  You can show that $\ \alpha\ $ cannot be less than $\ \frac{1}{4}\ $ by taking $\ f\ $ to be given by
$$
f(y)=\cases{\frac{1}{2}-y& for $\ 0\le y\le \frac{1}{2}-\epsilon\ $,\\
\frac{\left(y-\frac{1}{2}\right)^2}{2\epsilon} & for $\ \frac{1}{2}-\epsilon\le y\le \frac{1}{2}+\epsilon\ $,\\
y-\frac{1}{2}& for $\ \frac{1}{2}-\epsilon\le y\le 1\ $,
}
$$
where $\ 0<\epsilon<\frac{1}{2}\ $. This $\ f\ $ is continuously differentiable on $\ [0,1]\ $, with  $\displaystyle\ \max_{0\le x\le1}(|f'(x)|)=1\ $ and $\displaystyle\ \frac{f(0)+f(1)}{2}-$$\displaystyle\int_0^1f(x)dx=$$\displaystyle\frac{1}{4}-\frac{2\epsilon^2}{3}\ $, and this can be made as close as you please to $\ \frac{1}{4}\ $ by making $\ \epsilon\ $ sufficiently close to $\ 0\ $.
