Showing for $g\in C^\infty$ that $g^{(n)}(0)=0$ given a vanishing property Given an infinitely differentiable function $g: \mathbb{R} \rightarrow \mathbb{R}$ with the property that for every index $n$ there are positive numbers $c_{n}$ and $\delta_{n}$ such that
$$|g(x)| \leq c_{n}|x|^{n} \quad      \text{if}     \quad |x|< \delta_{n}$$
Show that for each natural number $n,g^{(n)}(0)=0$
My attempt:
By taking $x=\frac{1}{k}$ itself, we obtain
$$\left|\frac{g(\frac{1}{k})}{\frac{1}{k}}\right| \leq  \frac{c_n}{k^{n-1}}$$ whenever $1/k < \delta_n,~n \geq2$. Now
Let $k \rightarrow \infty $  to get $g'(0)=0$. But what about higher derivatives of $g$ at $0$?
 A: Hint: Suppose $g''(0)>0$ Then there exist $a, \delta >0$ such that $g''(x)\geq a$ for $0 < x <\delta$. By MVT this gives $g'(x) \geq ax$ for $0 < x <\delta$ and $g(x) \geq ax^{2 }$ for $0 < x <\delta$ by another application of MVT. But this contradicts the hypothesis: $|g(x)| \leq c_3|x|^{3}$ for $|x| <\delta_3$. Similarly, $g''(0)<0$ leads to a contradiction. Higher order derivatives can be handled similarly using induction.
A: This follows from using Taylor's theorem: lets write $a\lesssim_n b$ if $|a|\le C_n |b|$ for some constant $C_n$ depending on $n$. For each $n$, as $g\in C^{n+1}$,we have for $|x|\lesssim_n 1$,
$$ \left |g(x) - \sum_{k=0}^n \frac{g^{(n)}(0)}{n!}x^n \right| \lesssim_n  |x|^{n+1}. \tag{Taylor}\label{*}$$
The result is of course true for $n=0$. For $n=1$, \eqref{*} gives
$$ |g(x) - g'(0)x| \lesssim |x|^2$$
The given assumption is
$$|x| \lesssim_k 1 \implies |g(x)|\lesssim_k |x|^k \tag{assumption}\label{**}$$
For $k=2$, on the region of $x$ where both inequalties hold, we obtain
$$ |g'(0)| |x| \le |g(x) - g'(0)x| + |g(x)| \lesssim |x|^2 $$
thus $g'(0)=0$.
In general: suppose the result held for all derivatives up to the $(n-1)$th one. Then \eqref{*} becomes
$$ |g(x) - g^{(n)}(0)x^n/n!| \lesssim_n |x|^{n+1}$$
and \eqref{**} with $k=n+1$ gives
$$ |g^{(n)}(0)| |x|^n/n! \le |g(x) - g^{(n)}(0)x/n!| + |g(x)| \lesssim_n |x|^{n+1} $$
thus $g^{(n)}(0)=0$.
