In a sense, I did just ask this question. However, since the question is about how to write a beautiful looking proof and my proof is entirely rewritten, it seems like it should be a new question. What I'm looking for here are (aside from any actual mathematical problems in the proof of course) is advice on how to better structure what I'm writing or to better communicate the ideas. Anything from overall structure, word choice, what letters I give my variables, anything at all. Anyhow, the question from Spivak:
Define $f:\mathbb{R}\rightarrow\mathbb{R}$ by
$$f(x)=\begin{cases} e^{-x^{-2}}& x\ne 0\\ 0 & x=0\\ \end{cases}$$
Show that $f$ is a $C^\infty$ function, and $f^{(i)}(0)=0$ for all $i$.
Now, here is my proof.
First, we show that $f\in C^\infty$ for $x\ne 0$ by induction.
Let $-g(x)=\frac{1}{x^2}$. Then we can write $f$ as $f(x)=e^{g(x)}$. Let $P={p:\mathbb{R}\rightarrow\mathbb{R} : p(x)=\sum \frac{a_n}{x^n},a_n\in\mathbb{R}}$. Now we can show by induction that $f^{(n)}(x)=e^{g(x)}p_n(x)$ for some $p_n \in P$.
Let $p_0=\frac{1}{x^0}=1$. Then $p\in P$ and $f(x)=e^{g(x)}p_0(x)$.
Assume $p_n\in P$ such that $p_n=\sum_{i=0}^\infty\frac{a_i}{x^i}$
\begin{align*} (e^{g(x)}p_n(x)) &= e^{g(x)}g'(x) p_n(x) + e^{g(x)} p_n'(x)\\ &= e^{g(x)}(g'(x) p_n(x) + p_n'(x))\\ &= e^{g(x)}(\frac{2}{x^3} p_n(x) + p_n'(x))\\ &= e^{g(x)}(\frac{2}{x^3} \sum \frac{a_i}{x^i} + \sum \frac{-ia_i}{x^{i+1}})\\ &= e^{g(x)}(\sum \frac{2a_i}{x^{i+3}} + \sum \frac{-ia_i}{x^{i+1}})\\ \end{align*}
Since $\sum \frac{2a_i}{x^{i+3}} + \sum \frac{-ia_i}{x^{i+1}}\in P$, it follows that $p_n\in P \Rightarrow p_{n+1}\in P$. Thus by induction, $f^{(n)}=e^{g(x)}p_n(x)$ where $p_n\in P$ and $f\in C^\infty$ for $x\ne 0$.
Now we show by induction that $f^{(n)}(0)=0$ for all $n$.
First, we prove that for all $n \ge -1$,
$$m(n)=\lim_{h\rightarrow 0} \frac{1}{h^n e^{\frac{1}{h^2}}}=0$$
For $n=-1$ we have $\lim_{h\rightarrow 0}\frac{1}{h^{-1} e^{\frac{1}{h^2}}}=\lim_{h\rightarrow 0}\frac{h}{e^{\frac{1}{h^2}}}=0$
For $n=0$ we have $\lim_{h\rightarrow 0}\frac{1}{h^{0} e^{\frac{1}{h^2}}}=\lim_{h\rightarrow 0}\frac{1}{e^{\frac{1}{h^2}}}=0$
Now assume that $m(n-1)=0$ and $m(n-2)=0$.
\begin{align*} m(n) &= \lim_{h\rightarrow 0} \frac{1}{h^n e^{\frac{1}{h^2}}}\\ &= \lim_{h\rightarrow 0} \frac{h^{-n}}{e^{\frac{1}{h^2}}}\\ &= \lim_{h\rightarrow 0} \frac{-nh^{-n-1}}{e^{\frac{1}{h^2}} (-2 h^{-3})}\tag{L'H\^{o}pital's rule}\\ &= \frac{n}{2} \lim_{h\rightarrow 0} \frac{h^{-n-1+3}}{e^{\frac{1}{h^2}}}\\ &= \frac{n}{2} \lim_{h\rightarrow 0} \frac{1}{h^{n-2}e^{\frac{1}{h^2}}}\\ &= \frac{n}{2} m(n-2)=0\\ \end{align*}
Thus by induction, $m(n)=0$.
Since
$$f^{(n)}(x)=e^{g(x)}(\sum \frac{2a_i}{x^{i+3}} + \sum \frac{-ia_i}{x^{i+1}})=\sum 2a_i m(i+3)+\sum-im(i+1)$$
it follows that $f^{(n)}=0$ for all $n$.