Induction proof for a function being in $C^{\infty}(\mathbb{R})$ Let $$f(t) = \begin{cases}
     0 & \text{: } x \le 0\\
     e^{-\frac{1}{t^2}}& \text{: } x > 0
\end{cases}$$
Prove that $f(t)$ is in $C^{\infty}(\mathbb{R})$.

I know that for a function to be in $C^{\infty}(\mathbb{R})$ it has to be infinitely times differentiable and each derivative must be continuous. I'm a bit stuck on how to prove this. I'm assuming the answer will need to be proved inductively. Ie:
Suppose the $f^{(n)}(t)$ is continuous. I need to then prove that $f^{n+1}(t)$ exists and is continuous. I'm not quite sure how to do this, I'm new to proofs by induction. I can also image proving continuity at $t=0$ may be a challenge.
 A: Hint.
A standard example of a smooth non-analytic function is
$$
g(x)=\left\{\begin{array}{ll}e^{-\frac{1}{x}} & \text { if } x>0 \\ 0 & \text { if } x \leq 0\end{array}\right.
$$
A detailed proof for smoothness is given in this Wikipedia article:
https://en.wikipedia.org/wiki/Non-analytic_smooth_function#The_function_is_smooth
You can adapt the techniques for your example. A key step is to note that for any positive integer $m$,
$$
\lim_{x\downarrow 0}\frac{e^{-\frac1{x}}}{x^{m}}=0
$$
Alternatively, observe that
$$
f(x)=g(h(x))
$$
where $h(x)=x^2$ for $x\ge 0$ and $h(x)=0$ for $x<0$. You can show that $h$ is smooth. The result then follows from the chain rule.
A: A simple induction argument shows that for $x >0$ $f^{n}(x)$ can be written as $p_n(\frac 1 x) e^{-1/x^{2}}$ for some sequence of polynomials $(p_n)$ But $\lim_{y \to \infty} \frac {p_n(y)} {e^{y^{2}}} =0$ by L'Hopital's Rule. Put $y=\frac 1  x$ in this.
A: Find all derivatives of $f(x)$ everywhere on $\mathbb{R}$ except for $t = 0$. Then prove that all of them in fact are continuous at zero.
