$f(a)=f(b)=f_{+}'(a)=f_{-}'(b)=0$ and $|f''(x)|\le M$. Show that $|f(x)|\le \frac{M(b-a)^2}{16}$. Let $f:\left[a, b\right]\to\mathbb{R}$ be twice differentiable.
Suppose $f(a)=f(b)=f_{+}'(a)=f_{-}'(b)=0$ and $|f''(x)|\le M$. 
Show that $|f(x)|\le \frac{M(b-a)^2}{16}$.
My try:
From taylor expansion we have
$f(x)=\frac{f''(\xi _1)}{2}(x-a)^2$ and $f(x)=\frac{f''(\xi _2)}{2}(x-b)^2$.
Then $|f(x)|\le\frac{M}{2}(x-a)^2$ and $|f(x)|\le\frac{M}{2}(x-b)^2$
So $|f(x)|\le\min{(\frac{M}{2}(x-a)^2,\frac{M}{2}(x-b)^2)}\le\frac{M}{8}(b-a)^2$
But this conclusion is weaker than the aim.
And I thought through using
$$f(c)=\frac{f''(\xi )}{2}(c-a)(c-b)$$
I can say$$|f(x)|\le\frac{M}{8}(b-a)^2$$
which only uses the condition that $f(a)=f(b)=0$ and is still weaker.
Any hints? Thank you in advance!
 A: Let $c \in [a, b]$ be a point where $|f(x)|$ attains its maximum value on the interval. If $c=a$ or $c=b$ then $f$ is identically zero and we are done. Now assume $a < c < b$, then $f'(c) = 0$. We have to show that $|f(c)| \le \frac{M(b-a)^2}{16}$.
Case 1: If $a < c \le \frac{a+b}2$ then we can proceed as follows: 
$f_{+}'(a) = f'(c) =0$ and $|f''(x)|\le M$ implies
$$
 |f'(x)| \le M \min(x-a, c-x ) \quad \text{for } a < x < c
$$
and therefore, using $f(a) = 0$,
$$
|f(c)| \le \int_a^c |f'(x)| \, dt \le M  \int_a^c \min(x-a, c-x ) \, dt \\
 = M \left( \int_a^{(a+c)/2} (x-a)\, dt + \int_{(a+c)/2}^c (c-x) \, dt \right) \\
 = M \frac{(c-a)^2}8 \le M \frac{(b-a)^2}{16} \, .
$$
Case 2: If $\frac{a+b}2 \le c < b$ then we can estimate 
$$
 |f(c)| \le \int_c^b |f'(x)| \, dt
$$
in the same way.
A: I thought the method I mentioned can be modified.
Let $f(x_0)=\displaystyle\max_{[a,b]} f$, we aim to prove $f(x_0)\le\frac{M}{16}(b-a)^2$.
Proof: According to the definition, we have $f'(x_0)=0$.
Without losing generality, we assume that $x_0\in[a,\frac{a+b}{2}]$
Because $|f'(x)|\le M$, we have 
$$f(x)\le \frac{1}{2}M(x-a)^2$$
In addition,
$$f(x)\ge f(x_0)-\frac{1}{2}M(x-x_0)^2$$
which leads to $$f(x_0)\le\frac{M}{16}(b-a)^2$$
