Application of Mean Value/Rolle's Theorem? Question
Let $f$ be a differentiable function such that $f'$ is continuous on $[0, 1]$ and $M$ the maximum value of $|f'(x)|$ on $[0, 1]\ $. Prove that, if $f(0) = f(1) = 0$, then $$\int^{1}_{0} |f(x)| \mathrm {d}x \leq \frac M 4\ .$$

I have stared long and hard at this question for quite some time, but I am not sure where to even begin. Since I see that the endpoints are given, I think of MVT, but since they are also equal, I think of Rolle's Theorem too. These are just my intuitions - they could be wrong. Moreover, the moduli of $f'(x)$ and $f(x)$ are throwing me off. Any hints/suggestions on how to approach this question would be greatly appreciated :)
P.S. I am only taking an introductory calculus module in college, so the tools at my disposal are, roughly, IVT, MVT and Rolle's Theorem.
 A: I use Kelenner's hint to solve this problem.
We have
$$|f(x)| = |f(x) - f(0)| = |f(1)-f(x)|\text{.}$$
and by the MVT, for any $0 < x \leq 1$, there exists a $c_1 \in (0, 1)$ satisfying
$$f^{\prime}(c_1) = \dfrac{f(x)-f(0)}{x - 0} = \dfrac{f(x)-f(0)}{x} \implies |f(x)-f(0)| = |f^{\prime}(c_1) \cdot x| = |f^{\prime}(c_1)||x|\leq M|x|\text{.}$$
Thus we have
$$|f(x)| = |f(x) - f(0)| \leq M|x|\text{.}$$
Additionally, by the MVT, for any $0 \leq x < 1$, there exists a $c_2 \in (0, 1)$ satisfying
$$f^{\prime}(c_2) = \dfrac{f(1)-f(x)}{1-x} = \dfrac{-f(x)}{1-x} = \dfrac{f(x)}{x-1} \implies |f(x)| = |f^{\prime}(c_2) \cdot (x-1)| = |f^{\prime}(c_2)||x-1| \leq M|x-1|\text{.}$$
Hence,
$$|f(x)| \leq M|x-1|\text{.}$$
Thus
$$\int_{0}^{1}|f(x)|\text{ d}x \leq \int_{0}^{1/2}M|x|\text{ d}x+\int_{1/2}^{1}M|x-1|\text{ d}x = \dfrac{M}{8} + \dfrac{M}{8} = \dfrac{M}{4}\text{.}$$
A: The rigourous proof given above proves the inequality, but I wish to give a little handwaiving argument that might give insight into why this should be true.
The problem is effectively about maximizing the area under a function in the interval $[-1,1]$ that satisfies the given conditions.
So in this interval we know that the functions end points are at $x=0$ and $x=1$ intersecting the $x$ axis.
In the interval $(0,1) $ The function has infinite possibilities, but it has to be differentiable, $f'(x)$ has to be continuous and satisfy $max |f' (x)|=M $ .
Given these 3 conditions we need to maximize the area under the curve.
