Differentiability of $f(x) = \exp(-1/x^2), f(0) = 0$ Let $f: \mathbb{R}\to \mathbb{R}$ be defined by $f(x) = \exp(-1/x^2)$ if $x\neq 0$ and $f(0)=0$. I'm trying to show that $f$ is differentiable with continuous derivative in all points $x\in \mathbb{R}$.
Now, if $x\neq 0$ then $f(x) = \exp \circ g(x)$ being $g(x)=-1/x^2$. In that case, the chain rule can be used to see that $f$ is differentiable with derivative
$$f'(x) = \exp(g(x))g'(x) =\exp \left(\dfrac{-1}{x^2}\right)\dfrac{2}{x^3},$$
which clearly is continuous, since $\exp$ is continuous, $g$ is continuous and $g'$ is continuous on these points.
Now, when $x=0$ I don't really know what to do. By the definition I think it is not a good way, since we have
$$f'(0)=\lim_{x\to 0}\dfrac{\exp\left(\frac{-1}{x^2}\right)}{x}$$
and I'm unsure on how to proceed. Of course I could write $\exp$ as a series, but I don't know how to rigorously justify the manipulations that follows.
So how to show that this function is differentiable with continuous derivative?
EDIT: As pointed out in comments, if we set $h(t)=te^{-t^2}$ and $q(x)=\exp\left(\frac{-1}{x^2}\right)/x$ then if $s(x)=1/x$ we have
$$q(x)=h(s(x)).$$
Then it is intuitively clear that
$$\lim_{x\to 0^+}q(x)=\lim_{t\to \infty}h(t).$$
Now how to prove this rigorously? This change of variables involves one limit at infinity, and I'm unsure how to justify this.
 A: To answer your new question, if for all $\epsilon > 0$ there exists a $\delta > 0$ such that 
$$0 < x < \delta \Rightarrow |f(x) - L| < \epsilon$$
then
$$ 1/x > 1/\delta \Rightarrow |f(x) - L | < \epsilon$$ and 
$$t > 1/\delta \Rightarrow |f(1/t) - L| < \epsilon$$
The converse is also true.
That is, $$\lim_{x \to 0^+} f(x) = L \ \Longleftrightarrow \ \lim_{x \to \infty} f(1/x) = L$$
Similarly,
$$\lim_{x \to 0^-} f(x) = L \ \Longleftrightarrow \ \lim_{x \to -\infty} f(1/x) = L$$
Therefore
$$\lim_{x \to 0} f(x) = L \ \Longleftrightarrow \ \lim_{x \to \infty} f(1/x) = \lim_{x \to -\infty} f(1/x) = L$$

As for $\lim_{t\to\infty} te^{-t^2} = \lim_{t\to\infty} \frac{t}{e^{t^2}}$, apply l'Hopital's rule, this limit is equal to $\lim_{t\to\infty} \frac{1}{2te^{t^2}} = 0$.
Similarly, $\lim_{t\to\color{magenta}{-}\infty} te^{-t^2} = 0$ and therefore the  derivative at $x = 0$ is zero:
$$\lim_{x\to 0} \frac{f(x) - 0}{x - 0} = \lim_{x\to 0} \frac{e^{-1/x^2}}{x} = 0$$

You should now be able to show that the $n$-th derivative at $x = 0$ is zero for all $n \geq 1$.
