Prove that if $f(x)= e^{-1/x^2}\sin{\frac{1}{x}}$ for $x\neq0$ and $f(0)=0$, then $f^{(k)}(0)=0$ for all $k$. This question is from Spivak's Calculus (3rd ed) 18-41:

Prove that if $f(x)= e^{-1/x^2}\sin{\frac{1}{x}}$ for $x\neq0$ and $f(0)=0$, then $f^{(k)}(0)=0$ for all $k$.

Solution is:

I need someone to explain how $|\sin(1/x)|\leq1$ and $|\cos(1/x)|\leq1$ is helpful in the proof.  I can prove the same result for $f(x)= e^{-1/x^2}$ using the fact $\lim_{x \to \infty}\frac{x^n}{e^x}=0$ but not sure how to deal with the $\sin$ and $\cos$ in this question.  
 A: There is a crucial element which is missing in the solution given in your question as well as the solution given in another answer here. The following theorem holds:

Theorem 1: Let $f$ be continuous in a certain neighborhood of $a$ and differentiable in some deleted neighborhood of $a$. Let $\lim_{x\to a} f'(x) =L$. Then $f$ is differentiable at $a$ and $f'(a) =L$.

You should prove this using mean value theorem. The solution offered shows that $f^{(k)} (x) \to 0$ as $x\to 0$. From this you need the above theorem to conclude that $f^{(k)} (0)=0$ and this has to be done using induction on $k$.

OP has another concern which I overlooked and got to know via comments. The concern is about knowing how the bounded nature of $\sin(1/x)$ and $\cos(1/x)$ helps here. We have another simple theorem:

Theorem 2: Let $\lim_{x\to a} f(x) =0$ and let $g$ be bounded in some deleted neighborhood of $a$. Then $\lim_{x\to a} f(x) g(x) =0$.

A simple proof can be given via the $\epsilon, \delta$ definition  of limit. Let $|g(x) |<K$ in some deleted neighborhood of $a$ and let $\epsilon>0$ be arbitrarily given. Since $f(x) \to 0$ as $x\to a$ it follows that there is a $\delta>0$ such that $|f(x) |<\epsilon/K$ for all $x$ with $0<|x-a|<\delta$. And since $|g(x) |<K$ it follows that $$|f(x) g(x) |<\frac{\epsilon} {K} \cdot K=\epsilon$$ for all $x$ with $0<|x-a|<\delta$. This proves that $f(x) g(x) \to 0$ as $x\to a$.
In the current question the functions $\sin(1/x),\cos(1/x)$ are bounded (like $g$ in above theorem with $K=1$) and the function $e^{-1/x^{2}}/x^{i}\to 0$ (like $f$ in above theorem) and hence their product also tends to $0$. It does not matter whether $g$ ie $\sin(1/x),\cos(1/x)$ has a limit or not.
A: I do not know if this is correct, but here is one approach to prove it.
Given that 
$$f^{\left( k \right)}\left( x \right) = e^{-\frac{1}{x^2}}\left[ \sum\limits_{i = 1}^{3k} \dfrac{a_i}{x^i} \sin \dfrac{1}{x} + \sum\limits_{i = 1}^{3k} \dfrac{b_i}{x^i} \cos \dfrac{1}{x} \right]$$
We have from here,
$$f^{\left( k \right)}\left( x \right) = e^{-\frac{1}{x^2}} \left[ \dfrac{a_1 \sin \dfrac{1}{x} + b_1 \cos \dfrac{1}{x}}{x} + \dfrac{a_2 \sin \dfrac{1}{x} + b_2 \cos \dfrac{1}{x}}{x^2} + \\ \dfrac{a_3 \sin \dfrac{1}{x} + b_3 \cos \dfrac{1}{x}}{x^3} + \dots + \dfrac{a_{3k} \sin \dfrac{1}{x} + b_{3k} \cos \dfrac{1}{x}}{x^{3k}} \right]$$
$$\therefore f^{\left( k \right)}\left( x \right) = \dfrac{e^{-\frac{1}{x^2}}}{x^{3k}} \left[ x^{3k - 1} \left( a_1 \sin \dfrac{1}{x} + b_1  \cos \dfrac{1}{x}\right) + x^{3k - 2} \left( a_2 \sin \dfrac{1}{x} + b_2  \cos \dfrac{1}{x}\right) + \\ x^{3k - 3} \left( a_2 \sin \dfrac{1}{x} + b_3  \cos \dfrac{1}{x}\right) + \dots + \left( a_{3k} \sin \dfrac{1}{x} + b_{3k}  \cos \dfrac{1}{x}\right) \right]$$
From here, we may conclude that $\lim\limits_{x \rightarrow 0} f^{\left( k \right)} \left( x \right) = 0$ which holds true for all positive k
