Application of the Mean Value Theorem I am currently trying to proof the following exercise:

Let $n\in \mathbb N$ and $g:\mathbb R \to \mathbb R$ a $n$-times continuously differentiable function with $g^{(j)}(0) = 0$ for all $j\in \{0, 1, ... ,n-1\}$ where $g^{(j)}$ denotes the $j$-th derivative. Proof that $g(x) = O(\lvert x\rvert^n)$ for $x\to 0$.   

I tried to proof this via induction over $n$:  
$n=1$:  I have to show that there are $C>0, \delta > 0$ with $\lvert x\rvert < \delta \Rightarrow \lvert g(x) \lvert \leq C\lvert x \rvert$.
Since $g$ is continously differentiable on $\mathbb R$ so it is on (without loss of generality) $[0;a]$. Then $g'$ is continuous on $[0;a]$ and in particular $C:=\sup g' \in [0;a]$ with $C<\infty$.
By the mean value theorem there is $\xi \in ]0,a[$ with $$g'(\xi) =\frac{g(0)-g(a)}{0-a} = \frac{g(a)}{a}$$
which implies, choosing $\delta := a$ $$|g(x)| \leq C|x|$$for $|x| < \delta$. Now I don't know if this is correct so far, but assuming it is, I don't know how to proceed with $n \to n+1$. Any hints appreciated!
 A: Here's a proof that uses only the MVT.  Fix $x >0$.  Then there exists $\xi_1 \in (0,x)$ such that 
$$
g(x) = g(x) - g(0) = g'(\xi_1)(x-0) = g'(\xi_1) x.
$$
Now we apply the MVT again to get $\xi_2 \in (0,\xi_1)$ such that 
$$
g'(\xi_1) = g'(\xi_1)-g'(0) = g''(\xi_2)(\xi_1-0) = g''(\xi_2)\xi_1.
$$
Iterating, we find $0 <\xi_n<\xi_{n-1} < \cdots < xi_1 < x$ such that 
$$
g^{(k)}(\xi_k) = g^{(k+1)}(\xi_{k+1}) \xi_k.
$$
Consequently 
$$
g(x) = g'(\xi_1)x = g''(\xi_2) \xi_1 x = \cdots = g^{(n)}(\xi_n) x \prod_{i=1}^{n-1} \xi_i
$$
and so 
$$
|g(x)| \le |g^{(n)}(\xi_n)| x^n.
$$
The continuity of $g^{(n)}$ at $0$ then shows that 
$$
|g(x)| = O(x^n).
$$
A similar argument works for $x < 0$.
A: Using Taylor's Theorem with Lagrange form of the remainder,
$$g(x)=\sum_{k=0}^{n-1}g^{(k)}(0)\frac{x^k}{k!} + g^{(n)}(\xi_x)\frac{x^n}{n!}$$ where $|\xi_x|<|x|$.
With the given assumptions,  $\displaystyle g(x)=g^{(n)}(\xi_x)\frac{x^n}{n!}$, hence $$\left|\frac{g(x)}{x^n}\right|=\left|\frac{g^{(n)}(\xi_x)}{n!}\right| $$
Since $g^{(n)}$ is continuous, it is bounded on a neighborhood of $0$ by some $M$.
Hence $$\left|\frac{g(x)}{x^n}\right|\leq \left|\frac{M}{n!}\right| $$ for sufficiently small $x$.
A: Without Taylor's Theorem, via induction.
OP wrote the base case.
Suppose the result holds for some $n\geq 1$. Let  $g$ be a $n+1$-times continuously differentiable function with $g^{(j)}(0) = 0$ for all $j\in \{0, 1, ... ,n\}$.
Note that $h:=g'$ is a $n$-times continuously differentiable function with $h^{(j)}(0) = 0$ for all $j\in \{0, 1, ... ,n-1\}$. The induction hypothesis yields some $M\geq 0$ and a neighborhood of $0$, say $[-a,a]$ such that  $\displaystyle |x|\leq a \implies  |h(x)|\leq M |x^n|$.
Therefore, with $|x|\leq a$, $$\displaystyle |g(x)|=|g(x)-g(0)|=\left|\int_0^x g'(t) dt \right| = \left|\int_0^x h(t) dt \right| \leq M\frac{|x|^{n+1}}{(n+1)!}$$
and the result is proved.
A: We can get the result assuming only that $0= g(0)=g'(0)= \cdots = g^{(n-1)}(0)$ and that $g^{(n)}(0)$ exists. Proof sketch: Apply the MVT $n-1$ times, as in the answer of @Glitch, to see
$$ \tag 1|g(x)|\le |g^{(n-1)}(c_x)||x^{n-1}|$$
for some $c_x\in (0,x).$ We can write the right side of $(1)$ as
$$|g^{(n-1)}(c_x)-g^{(n-1)}(0)||x^{n-1}| = \left |\frac{g^{(n-1)}(c_x)-g^{(n-1)}(0)}{c_x}\right ||c_xx^{n-1}|$$ $$ \le \left |\frac{g^{(n-1)}(c_x)-g^{(n-1)}(0)}{c_x}\right ||x^{n}|.$$
As $x \to 0,$ $c_x \to 0,$ so the fraction in the last line $\to g^{(n)}(0).$ This gives the desired $O(x^n)$ result.
