Showing that $f \in C^{\infty}(\mathbb{R},\mathbb{R})$ Let $f(x)=\begin{cases}
e^{-(1/x)} & \text{for} \quad x > 0 \\
0 & \text{for} \quad x \leq 0
\end{cases}$
Show that $f \in C^{\infty}(\mathbb{R},\mathbb{R})$
I need to show that $f(x)$ has derivatives of all orders at all points in $\mathbb{R}$. It is trivial for $x\leq 0$, critical at $x=0$ and not clear for $x > 0$. This is the point I have a problem with. I fail to show that $e^{\frac{1}{x}}$ has got derivatives of all orders in $\mathbb{R}$.
I can't find a generalization for the derivatives, as the polynomes are getting out of hand. 


*

*$f'(x)=\frac{f(x)}{x^2}$

*$f''(x)=\frac{f(x)}{x^4}(-2x+1)$

*$f'''(x)=\frac{f(x)}{x^6}(6x^2-6x+1)$

*$f^{IV}(x)=\frac{f(x)}{x^8}(-24x^3+36x^2-12x+1)$

*$f^{V}(x)=\frac{f(x)}{x^{10}}(120x^4-240x^3+120x^2-20x+1)$

*...


Is there some sort of theorem that could help me prove this? Or a generalisation of the derivatives that I do not see?

One can show by induction that
$$
f^{(k)}(x) = \begin{cases} 0 \quad  (x \le 0) \\
f(x) \frac{p_k(x)}{x^{2k}} \quad (x > 0) 
\end{cases}
$$
where $p_k$ is a polynomial of degree $k-1$. (The exact form of $p_k$ is not needed). This implies in particular that $f^{(k)}$ is continuous across $0$ for all $k$ and consequently $f \in C^{\infty}$. 
