Why $f(x)=\sum_{n=0}^\infty \frac{f^{(n)}(0)\, x^n}{n!} $? Let $f:\mathbb R\longrightarrow \mathbb R$ a function that is $\mathcal C^\infty(\mathbb R) $. Suppose $$\sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!}\,x^k$$
converge and its radius is $R$. Why $$f(x)=\sum_{k=0}^\infty \frac{f^{(k)}(0)}{k!}\,x^k$$
for all $x\in ]-R,R[$ ? 

I know that for a fixed $n$, $$f(x)=\sum_{k=0}^n\frac{f^{(k)}(0)}{k!}\,x^k+o(x^n),$$
in a neighborhood of $0$, but a priori it won't be correct for $x$ too large (take for example the sinus or exponential, we have $$e^x=\sum_{k=0}^\infty \frac{x^k}{k!},$$
for all $x\in \mathbb R$, not only in a neighborhood of $O$. So why can we extend the formula to all $x\in\mathbb R$ ?



Ok, let forget $e^{-1/x^2}$. Consider for example $\sin(x)$.
Why $$\sin(x)=\sum_{k=0}^\infty \frac{(-1)^{n+1}}{(2n)!}x^{2n},$$
for all $x\in\mathbb R$ whereas $$\sin(x)=\sum_{k=0}^n \frac{(-1)^{n+1}x^{2k}}{(2k)!}+o(x^{2n})$$
in a neighborhood of $0$ only.
This is not true. The function
$$
f(x)=\cases{0&amp; if $x=0$\\e^{-1/x^2}&amp; otherwise}
$$
is $C^{\infty}$, and for any $k\in\Bbb N$ we have $f^{(k)}(0)=0$, so the series converges for all $x$, but only converges to $f(x)$ for $x=0$.
It depends on the size of the radius.

For some $\sum_{k=0}^{\infty}a_k\,x^k$ you will have $r=\lim_{k\to\infty}|\frac{a_k}{a_{k+1}}|$. 

Calculating the radius for $e^x$ provides $r=\infty$.

But then consider the function $f(x)=\frac{1}{1-x}$. Its MacLaurin series $\sum_{k=0}^{\infty}x^k$ has a radius of convergence of $r=1$. But that given fraction function clearly is well-defined beyond too.

Just plot the graph of that latter function and you would understand that the series would be well-defined even for $x\in [-1,1)$.

--- rk