I reproduce from my lecture notes:
Suppose $f$ is $C^\infty$ on $[a,b]$ with $$\left|f^{(n)}(x)\right|\leqslant M~~\text{for all}~~x\in(a,b).$$ Then $f$ is real analytic in $[a,b]$.
Proof. Fix $x_0\in[a,b]$. Then for each $x$ in $[a,b]$ the error after truncating the series at the $n$th term is given, for some $c\in[a,b]$, by $$\left|\frac{f^{(n+1)}(c)}{(n+1)!}(x-x_0)^{n+1}\right|\leqslant \frac{M}{(n+1)!}\left|b-a\right|^{n+1}.\tag{$*$}$$This tends to zero as $n\to\infty$ and so $f$ is real analytic in $[a,b]$.
Question: how did my lecturer deduce the inequality $(*)$ from $\left|f^{(n)}(x)\right|\leqslant M$? I am searching for different versions of this proof but they all somehow fail to explain this step, assuming that is is obvious. Any (fairly elementary) explanation is welcomed.
Thanks.
As indicated in the comments, it would perhaps be better to rephrase the hypothesis as follows: Suppose $f$ is $C^\infty$ on $[a,b]$ and there exists a real number $M$ such that $|f^{(n)}(x)| \leq M$ for all $x \in [a,b]$ and all $n \in {\bf Z}_{>0}$. The assertion is then an immediate consequence of this hypothesis.
As a helpful example to keep in mind, consider the function $f(x)$ on ${\bf R}$ defined by $f(x)=e^{-1/x^2}$ for $x \neq 0$ and $f(0)=0$. You can check that this function is $C^\infty$ (in fact, it is the essential building block needed for partitions of unity on $C^\infty$ manifolds) with $f^{(n)}(0)=0$ for all $n \in {\bf Z}_{\geq 0}$. Therefore it is not analytic since its Maclaurin series has all coefficients equal to $0$.
In fact, away from zero the derivatives of $f$ are of the form $f^{(n)}(x)=P_n(x) e^{-1/x^2}$ where $P_n(x)$ are polynomials of $x^{-1}$ determined by $P_0=1$ and $P_{n+1}=2x^{-3} P_n+P_n'$, hence with leading term $2^n x^{-3n}$. In particular for any fixed non-zero $x$ near to $0$, the sequence $P_n(x) e^{-1/x^2}$ goes to infinity with $n$. This shows directly that there is no bound as in your hypothesis for this function (as there cannot be if the assertion is to be believed).