Let $f:\mathbb R \to \mathbb R$ be an infinitely differentiable function such that for every $x \in \mathbb R$ there exists $n$ such that $f^{(m)}(x)=0$ for all $m \ge n$. I need to prove that $f$ is a polynomial.
It is trivial to show using Baire's theorem that $f$ must be a polynomial in some open ball, but since $f$ is not necessarily analytic I cannot apply the identity principle to obtain the desired result. I would appreciate a hint.