If $f(x_0+x)=P(x)+O(x^n)$, is $f$ $mLet $f : \mathbb{R} \to \mathbb{R}$ be a real function and $x_0 \in \mathbb{R}$ be a real number. Suppose that there exists a polynomial $P \in \mathbb{R}[X]$ such that $f(x_0+x)=P(x)+ \underset{x \to 0}{O} (x^n)$ with $n> \text{deg}(P)$.
Is it true that for $m<n$, $f^{(m)}(x_0)$ exists? (Of course, it is obvious for $m=1$.) If so, we can notice that $f^{(m)}(x_0)=P^{(m)}(x_0)$.

No, these are not true, and classical counterexamples are based on $f(x)=|x|^a\sin(1/|x|^b)$ for $x\ne0$ and $f(0)=0$, considered at $x_0=0$, for well chosen positive $a$ and $b$.
Basically, the idea is that the limited expansion of $f$ at $0$ is $f(x)=O(|x|^n)$ (no polynomial term) with $n$ large if $a$ is large but that $f''(0)$ need not exist when $b$ is suitably larger than $a$.
