Show that $|h(x)|\le\frac{x^2}2 M$ if $|h''(x)|\le M$ and $h(0)=h'(0)=0$ on $[0,a]$ This is the exercise 5.3.6 of Understanding analysis 2ed by Abbott.

Show that $|h(x)|\le\frac{x^2}2 M,\forall x\in[0,a]$ if $|h''(x)|\le M,\forall x\in[0,a]$ and $h(0)=h'(0)=0$ on $[0,a]$

It is supposed that I can solve this using the (generalized) mean value theorem and L'Hopital rules at most, nothing about integration or similar.
I can show that for $|h''(x)|\le M$ with $h'(0)=0$ then $|h'(x)|\le xM, \forall x\in[0,a]$ but Im having trouble to show the required on the question.
What I did: we can write due the mean value theorem
$$|h'(x)|=\left|\frac{h(y)-h(z)}{y-z}\right|\le xM,\quad\forall x\in(y,z),\forall y<z\in[0,a]$$
then in particular if $y=0$ we have
$$|h'(x)|=\left|\frac{h(z)}{z}\right|\le xM\implies|h(z)|\le zxM,\forall x\in(0,z),\forall z\in(0,a]$$
Intuitively I want to see what happen with $x\to 0$ because for $x\to z$ I get the bound $|h(z)|\le z^2M$ what is weaker than the required. I dont know if this approach is valid or not, in any case I get lose, can you help me with some hint?

I tried a different approach using the generalized value theorem and a bit of integration:
$$\frac{f'(x)}{g'(x)}=\frac{f(y)-f(z)}{g(y)-g(z)},\quad\forall x\in(y,z),\forall y<z\in[0,a]$$
and I can write $\frac{|h'(x)|}{x}\le M,\forall x\in(0,a]$ and if I took $f'(x)=h'(x)$ and $g'(x)=x$ then
$$\frac{|h'(x)|}{x}=2\frac{|h(y)-h(z)|}{|y^2-z^2+C|}\le M,\quad\forall x\in(y,z),\forall y<z\in[0,a]$$
Then I can choose (I think, Im not sure using integration in this context) $C=0$ and in particular because $h(0)=0$ then I can write
$$2\frac{|h(z)|}{z^2}\le M,\forall z\in(0,a]$$
what implies the desired result after we quit the denominator and include the zero by definition in the domain. But doing this I feel Im cheating, in the best case, and in the worst Im very unsure about the use of indefinite integration in this context. In any way it is supposed I can prove this without the use of integration.
So, can you help me? Can you comment my mistakes? Thank you in advance.
P.S.: I realized that I cant choose $C$ because the function $h(x)$ already exists... so this must hold for every $h(x)$ under these conditions.
 A: Set $f(x) = h(x), g(x)= \frac{x^2}{2}$ and apply the generalize mean value theorem to obtain for all $x \in (0,a]$
$$ \frac{f(x) - f(0)}{g(x) - g(0)} = \frac{h(x)}{\frac{x^2}{2}} = \frac{f'(c_x)}{g'(c_x)} = \frac{h'(c_x)}{c_x} $$
for some $c_x \in (0,x)$. Applying the regular mean value theorem for $h'$, we have
$$ \left| \frac{h'(c_x)}{c_x} \right| = \left| \frac{h'(c_x) - h'(0)}{c_x - 0} \right| = \left| h''(d_x) \right| \leq M$$
where $d_x \in (0,c_x)$. Combining both results, we get
$$ \left| \frac{h(x)}{\frac{x^2}{2}} \right| \leq M $$
for all $x \in (0,a]$. Multiplying by $\frac{x^2}{2}$, we get $|h(x)| \leq M\frac{x^2}{2}$ for all $x \in (0,a]$ and this clearly also holds for $x = 0$.
A: Hint :
If $f$ is a differentiable function on $[0,a]$ then $f(x) = f(0) + \int_0^x f'(t) dt$. You can use it on $h$ and $h'$.

Complete answer:
Because $h(0) = 0$ we can write $h(x) = \int_0^x h'(t) dt$.
Likewise, $h'(t) = \int_0^t h''(s) ds$ (because $h'(0)=0$).
Hence $h(x) = \int_0^x \int_0^t h''(s) ds dt$
Then $|h(x)| \leq \int_0^x \int_0^t |h''(s)| ds dt \leq \int_0^x \int_0^t M ds dt = M\int_0^x t dt = M \frac{x^2}{2}$.
