Smoothness of a real-valued function on $\mathbb{R}^n $ Let 
$$ f(x)=
\begin{cases}
\exp\left(\frac{-1}{1-|x|^2}\right), &\text{ if } |x| < 1,
\\
0, &\text{ if } |x|\geq  1.
\end{cases}
$$ Prove that $f$ is infinitely differentiable everywhere. ($x$ belongs to $\mathbb{R}^n$ for fixed $n$.)
Well, this is obvious for $|x|>1$ and easy enough for the first derivative at $|x|=1$, but I can't seem to use the definition of the Gateaux derivative to show it for $|x|<1$. Any advice would be appreciated.
(This is not homework.)

We can show by induction that 
$$\partial_{\alpha}f(x)=\begin{cases}
\frac{P_{\alpha}(x)}{(1-|x|^2)^{2|\alpha|}}\exp\left(\frac 1{|x|^2-1}\right)&\mbox{ if }|x|<1,\\\
0&\mbox{ otherwise},
\end{cases}$$
where $\alpha\in\mathbb N^n$ and $P_{\alpha}$ is a polynomial. It's true for $\alpha=0$, and if $\alpha=e_k$ and $|x|<1$, 
$$\partial_{e_k}f(x)=-\exp\left(\frac 1{|x|^2-1}\right)\frac{2x_k}{(|x|^2-1)^2},$$
which shows that $f$ is also differentiable at $|x|=1$ and $P_{e_k}(x)=-2x_k$. If we assume that the property is true for $|\alpha|\leq p$ and $|\alpha|=p+1$ then let $k$ such that $\alpha_k\neq 0$, and put $\alpha'=\alpha-e_k$. Then $|\alpha'|=p$ and for $|x|<1$ we have 
\begin{align*}
\partial_{\alpha}P(x)&=\frac{\partial_{e_k}P_{\alpha'}(x)}{(1-|x|^2)^{2|\alpha'|}}\exp\left(\frac 1{|x|^2-1}\right)+\frac{P_{\alpha'}(x)(-2|\alpha'|-1)2x_k}{(1-|x|^2)^{2|\alpha'|+1}}\exp\left(\frac 1{|x|^2-1}\right)\\
&+\exp\left(\frac 1{|x|^2-1}\right)\frac{P_{\alpha'}(x)}{(1-|x|^2)^{2|\alpha'|}}\frac{2x_k}{(1-|x|^2)^2}\\
&=\exp\left(\frac 1{|x|^2-1}\right)\frac 1{(1-|x|^2)^{2|\alpha|}}\Big(\partial_{e_k}P_{\alpha'}(x)(1-|x|^2)^2\\
&- 2(1-|x|^2)P_{\alpha'}(x)x_k+2x_kP_{\alpha'}(x)
\Big)\\
&=\exp\left(\frac 1{|x|^2-1}\right)\frac 1{(1-|x|^2)^{2|\alpha|}}\left(\partial_{e_k}P_{\alpha'}(x)(1-|x|^2)^2+2|x|^2x_kP_{\alpha'}(x)\right).
\end{align*}
So we got the induction formula 
$$P_{\alpha'+e_k}(x)=\partial_{e_k}P_{\alpha'}(x)(1-|x|^2)^2+2|x|^2x_kP_{\alpha'}(x),$$
and $\partial_{\alpha}f(x)=0$ if $x=1$.
