# Stuck trying to prove that $e^{-x^{-2}}$ is $C^{\infty}$ [duplicate]

This is Spivak's Calculus on Manifolds ex. 2-25, he says

Define $f:\mathbb{R}\to \mathbb{R}$ by $f(x) = \left\lbrace \begin{array}{l} e^{-x^{-2}} &\text{ if } x \neq 0\\ 0 &\text{ otherwise } \\ \end{array} \right.$. Show that $f$ is $C^{\infty}$ anf $f^{(i)}(0)=0\; \forall i$.

I haven't found a way to get a general solution. I only managed to prove:

$(1)$ $f$ is continuous at $0$.

This follows from $f(0)=0$ and $\lim_{x\to0} f(x)=\lim_{x\to 0}e^{-x^{-2}}=\lim_{x\to 0}\displaystyle\frac{1}{e^{1/x^2}}=0$ since $\displaystyle\frac{1}{x^2}\to+\infty$ if $x\to 0$ then $e^{1/x^2}\to+\infty$ if $x\to 0$, which means that $\displaystyle\frac{1}{e^{1/x^2}}\to 0$ if $x\to 0$ .