The theories are:
$f(x)$ has Taylor expansion equals the remainder of Taylor polynomial converge to $0$.
a smooth function such as $f(x) = e^{-1/x^2}$, $x>0$, $f(x) = 0$, $x \leqslant 0$ do not has Taylor expansion near $0$.
However, I think about these propositions and find:
smooth - exist Taylor polynomial - select Peano remainder = $o(x^n$) - the remainder must converge to $0$ - smooth function must have Taylor expansion near $0$
I will be appreciated if someone can point out the error in this infer.
For every smooth function $f$, you can consider the Taylor series around $0$ $$\sum_{n \geq 0} \frac{f^{(n)}(0)}{n!}x^n$$
However, there are two possible obstructions in general to link directly this series to the function :
It is possible that the radius of convergence is $0$. Actually, one can prove that for every sequence $(a_n)$, there exists a smooth function $f$ satisfying $f^{(n)}(0)=a_n$. Therefore the Taylor series can be every series, so it can be a series which converges nowhere.
It is possible that the Taylor series converges everywhere, but is not equal to $f$ in a neighbourhood of $0$. The classical example is the one you mention with $e^{-1/x^2}$, you get a Taylor series which is the null series, and the function is non constant equal to $0$ in any neighbourhood of $0$.
Finally, you have the following condition for a function to be analytic over an interval $I$ : a smooth function $f : I \rightarrow \mathbb{R}$ is analytic over $I$ iff $\forall [a,b]\subset I$, there exists $M \in \mathbb{R}$ and $\alpha > 0$ such that $\forall n \in \mathbb{N}$, $$||f^{(n)}||_{\infty|[a,b]} \leq Mn!\alpha^n$$