$P(x) = \sum_{k=0}^n {f^k(x_0) \over k!}(x-x_0)^k$ if $\rvert f(x)-P(x)\lvert \le M\rvert x-x_0 \lvert^{n+1}$ Let $f : [a,b] \rightarrow \Bbb R$ be a function and $n \in \Bbb N$ be fixed.
Suppose $f^{n+1}$ is continuous on $[a, b]$ and let 
$x_0 \in (a,b)$. Let $P$ be 
a polynomial of degree less or equal to $n$, $\;M \in \Bbb R$  be a constant. 
Suppose that in some neighborhood $U_{x_0}$ of $x_0$, it holds 
$\rvert f(x)-P(x)\lvert \le M\rvert x-x_0 \lvert^{n+1}$ (1) . Then
Show that 
$P(x) = \sum_{k=0}^n {f^k(x_0) \over k!}(x-x_0)^k$ (2)

Question
I think this problem requires to use the taylor's theroem. but cannot sure how to adopt it. Any hint for solving this problem? or where to start? 
 A: Since $P$ has degree less than equal to $n$, we have $P(x)=\sum_{k=0}^{n} \frac{P^{(k)}(x_0)}{k!}(x-x_0)^k$. So
$$
(f-P)(x)=\sum_{k=0}^n \frac{f^{(k)}(x_0)-P^{(k)}(x_0)}{k!} (x-x_0)^k +(x-x_0)^{n}\varepsilon(x)\tag{3}
$$
where $\varepsilon$ is a function satisfying $\lim_{x\to x_0} \varepsilon(x)=0$.
We also know that
$$
|f(x)-P(x)| \leq M|x-x_0|^{n+1} \tag{1}
$$ 
From (3) we deduce $f(x_0)-P(x_0)=\lim_{x\to x_0}(f-P)(x)$. 
But (1) forces $\lim_{x\to x_0}(f-P)(x)=0$, so $f(x_0)-P(x_0)=0$ and we can let the sum start from $k=1$ in (3).
From (3) we deduce $f'(x_0)-P'(x_0)=\lim_{x\to x_0}\frac{(f-P)(x)}{x-x_0}$. 
But (1) forces $\lim_{x\to x_0}\frac{(f-P)(x)}{x-x_0}=0$, so $f'(x_0)-P'(x_0)=0$ and we can let the sum start from $k=2$ in (3). 
From (3) we deduce $f''(x_0)-P''(x_0)=\lim_{x\to x_0}\frac{2(f-P)(x)}{(x-x_0)^2}$. 
But (1) forces $\lim_{x\to x_0}\frac{2(f-P)(x)}{(x-x_0)^2}=0$, so $f''(x_0)-P''(x_0)=0$ and we can let the sum start from $k=3$ in (3). 
By induction, we can continue like this up to $k=n$, eventually obtaining (2).
