If $f(x)=\chi_{(0,\infty)}\exp(-1/x)$, show that $f\in C^{\infty}$. Define the function $f:\mathbb{R}\to\mathbb{R}$ as follow:
$f(x)=\chi_{(0,\infty)}\exp(-1/x)$
In other words: $f(x)=0$ if $x\le 0$, and $f(x)=\exp(-1/x)$ if $x>0$.
Show that $f\in C^{\infty}$.

So I think I want to show the nth derivative $f^{(n)}$ is continuously differentiable for all $n$. I might want to proceed by induction. The only point we need to worry about is when $x=0$, since for $x$ outside of its neighbor, $f$ clearly satisfy the property. So I want to show $f^{n}(0)$ exists for all $n$. That's it, $\lim_{d\to0}\frac{f^{n-1}(d)-f^{n-1}(0)}{d}=0$. Maybe I can find a closed-form for the nth derivative at $0$??

Just note that taking derivatives (by the definition, not by the algorithm) always leaves you with terms of the form $1/P(x) \cdot e^{1/x}$. Then use that the exponential grows faster than any polynomial at infinity, noting that as $x\to 0$, we have $\frac1{x}\to \infty$. More explicitly, for $f'(x)$,
$$\lim_{x\to 0}\frac{e^{1/x}}{x} = 0.$$ This way you can find a formula for $f'(x)$ quite easily, using the normal technique for $x>0$ and noting it is zero elsewhere. Then repeat for higher derivatives.
