How to show $f\left(\frac{1}{2}\right) \le \frac{M}{4} + \int_0^1 f(x)\, dx$ Let $f$ be a differentiable function such that $f'(x)$ is continuous and $|f'(x)| \le M$ for all $x \in [0,1]$. Show that
\begin{align}
f\left(\frac{1}{2}\right) \le \frac{M}{4} + \int_0^1 f(x)\, dx
\end{align}
I have no idea how to begin proving this. I think Fundamental Theorem of Calculus will be used somewhere in the proof, but I can't see how that can be related to $f'(x)$. Any help is appreciated; thanks in advance!

Let $f$ be as in the hypothesis. We know that $|f'|\leq M$. Therefore, it follows that for $x,s\in[0,1]$ with $s>x$
$$
-(s-x)M \leq \int_{x}^{s}f'(t) dx \leq (s-x)M.
$$
Indeed, by the Fundamental Theorem of Calculus, and by letting $s=\frac{1}{2}$, we find that
$$
f\left(\frac{1}{2}\right) - f(x) \leq \left(\frac{1}{2}-x\right)M. \tag{1}
$$
Integrating again over $[0,1/2]$ with respect to $x$, we find that
$$
\int_{0}^{1/2}f\left(\frac{1}{2}\right)dx \leq M\int_{0}^{1/2} \left(\frac{1}{2}-x\right) dx + \int_{0}^{1/2} f(x) dx
$$
Simplifying, we end up with
$$
\frac{1}{2}f\left(\frac{1}{2}\right) \leq M \left(\frac{x}{2}-\frac{x^2}{2}\right)_{x=0}^{x=1/2} + \int_{0}^{1/2} f(x) dx
$$
and in particular, that
$$
\frac{1}{2}f\left(\frac{1}{2}\right) \leq \frac{M}{8} + \int_{0}^{1/2} f(x) dx.
$$
Similarly, now instead integrating (1) over $[1/2,1]$, we have
$$
\frac{1}{2}f\left(\frac{1}{2}\right) \leq \frac{M}{8} + \int_{1/2}^{1} f(x) dx.
$$
Adding these two together gives you the desired result. In particular, we find that
$$\begin{align}
f\left(\frac{1}{2}\right) &= \frac{1}{2}f\left(\frac{1}{2}\right) + \frac{1}{2} f\left(\frac{1}{2}\right) \\
&\leq \frac{M}{8} + \frac{M}{8} + \int_{0}^{1/2} f(x) dx + \int_{1/2}^{1} f(x) dx \\
&= \frac{M}{4} + \int_{0}^{1} f(x) dx.
\end{align}
$$
