Show that $e^{-1/x^2}$ is not analytic around $x=0$. I have been working on the following question. Define a function
\begin{align*}
f(x)=
\begin{cases}
e^{-1/x^2}&\text{ for }x>0,\\
0&\text{ for }x=0
\end{cases}
\end{align*}
Prove that $f$ is $C^\infty$ but not analytic around $x=0$. And just in case some of you use a different notation, $C^\infty$ means that $f$ is infinitely differentiable. Since I am unlikely to find a formula for the $n^{th}$ derivative, my strategy was to use the series expansion for $e^x$ but the arguments are not working out well.
 A: Let $f$ be given by 
$$f(x)=\begin{cases}e^{-1/x^2}&,x\ne0\\\\0&,x=0\end{cases}\tag1$$

It is straightforward to show that, for $x\ne 0$, the nth derivative, $f^{(n)}(x)$ of $f(x)$ can be expressed as
$$f^{(n)}(x)=g_n(x)e^{-1/x^2}\tag2$$
where in $(2)$, $g_n(x)$ is a polynomial of order $3n$ in powers of $1/x$.  The sequence of functions, $g_n(x)$, satisfies the relationship
$$g_{n+1}(x)=g_n'(x)+\frac2{x^3}g_n(x)$$
with $g_0(x)=1$.  


A closed-form for $g_n(x)$ can be found using the Faà_di_Bruno Formula.  We do not need, however, a closed-form for $g_n(x)$ to proceed since clearly, we have $$\lim_{x\to 0}g_n(x)e^{-1/x^2}=0$$


Furthermore, we see inductively that $f^{(n)}(0)=0$ since 
$$\begin{align}
f^{(n+1)}(0)&=\lim_{h\to 0}\frac{f^{(n)}(h)-0}{h}\\\\
&=\lim_{h\to 0}\frac{g_n(h)e^{-1/h^2}-0}{h}\\\\
&=0
\end{align}$$

Inasmuch as $f^{(n)}(0)=0$ for every $n$, the remainder in the Taylor series of $f(x)$ is, in fact, $f(x)$ itself.  And since the remainder term of the Taylor series does not vanish, $f(x)$ cannot be represented by a Taylor series around $0$, and is, therefore, not analytic at $0$ by definition.
