Use basic theorem of calculus to prove a complicated inequality. Let $f$ be continuous and differentiable on $[a,b]$. Prove that
$$\max_{a \leqslant x \leqslant b} \left| f(x)\right| \leqslant \frac{1}{b-a}\left|\int_{a}^{b}f(x)dx \right|+\int_{a}^{b}\left|f^{\prime}(x) \right|dx  $$
The following is my idea. I first consider the right side of this inequality, which leads to
\begin{align*}
 &\frac{1}{b-a}\left|\int_{a}^{b}f(x)dx \right|+\int_{a}^{b}\left|f^{\prime}(x) \right|dx
 \geqslant \frac{1}{b-a}\left|\int_{a}^{b}f(x)dx \right|+\left|\int_{a}^{b}f^{\prime}(x) dx\right|
 =\frac{1}{b-a}\left|\int_{a}^{b}f(x)dx \right|+\left|f(b)-f(a) \right|
\end{align*}
We know there exists $\xi \in(a,b)$, such that $\displaystyle \int_{a}^{b}f(x)dx=f(\xi)(b-a)$. Therefore we get $|f(\xi)|+|f(b)-f(b)|$.
How can I relate this to the maximum value $\displaystyle\max_{a \leqslant x \leqslant b} \left| f(x)\right|$? Or what is the complete solution? Thanks.
 A: Start with arbitrary $z\in [a,b]$ and observe that for each $y\in [a,b]$,
$$
f(z) = f(y)+\int_y^z f'(t)\ dt
$$ by fundamental theorem of calculus. (We implicitly assumed that $f$ is integrable.) Integrate with respect to $a\le y\le b$ and divide by $b-a$. Then we find that
$$
f(z)= \frac{1}{b-a}\int_a^b f(y)\ dy+\frac1{b-a}\int_a^b \left(\int_y^zf'(t)\ dt\right)dy,
$$ and hence
$$\begin{align*}
|f(z)|&\le\left|\frac{1}{b-a}\int_a^b f(y)\ dy+\frac1{b-a}\int_a^b \left(\int_y^zf'(t)\ dt\right)dy\right|\\&\le \frac1{b-a}\left|\int_a^b f(y)\ dy\right|+\frac1{b-a}\int_a^b \left|\int_y^zf'(t)\ dt\right|dy\\&\le\frac1{b-a}\left|\int_a^b f(y)\ dy\right|+\frac1{b-a}\int_a^b \int_a^b|f'(t)|\ dtdy\\&=\frac1{b-a}\left|\int_a^b f(y)\ dy\right|+ \int_a^b|f'(t)|\ dt
\end{align*}$$ Now take maximum with respect to $z\in [a,b]$.
A: Let c be the intermediate at which the mean value is taken for f. That will get you there.  Assuming $x_0$ is max you get, 
$|f(x_0)|= |f(c) + \int_c^{x_0} f’(x)dx |$
$\leq |1/(b-a) \int_a^b f(x)dx| $
$+ |\int_c^{x_0} |f’(x)|dx| $
Then $|\int_c^{x_0} |f’(x)|dx| \leq \int_a^{b} |f’(x)|dx $ and you are done.  
