Let's say that I want to prove that the function $$f(x)=\left\{\begin{array}{cc} e^{-\frac{1}{x^2}} & x\neq 0 \\ 0 & x=0 \end{array}\right.$$ is $C^\infty$. I did it using calculation by induction of $f^{(n)}(x)$ and then showed that the $n^{th}$ derivative has a limit at the origin which is zero.
But then again, since we know that the $n^{th}$ derivative at $x=0$ will be zero, is it enough to show that $$f(x)-\overset{=0}{T_n(x)}=o(x^n)$$ for all $n\in\mathbb{N}$? Because then I can just show $$\lim_{x\to 0}\frac{f(x)}{x^n}=0$$ And then we will be done. But is it justified?
To put it in other words: if some function $f(x)$ has some polynomial $T_n(x)$ for which $$\lim_{x\to 0}\frac{f(x)-T_n(x)}{x^n}=0,$$ does that imply that $f$ is $C^n$ at some neighborhood of $x=0$?
No: assuming that your original function $f$ is smooth, if $q(x)$ is the indicator function of the rationals, $f(x)q(x)=o(x^n)$ for each $n \geq 0$ as $x$ goes to $0$. Yet it is not even $\mathscr{C}^1$ on a neighborhood of $0$.