Spivak's Calculus exercise. Chapter 10, Problem 27

Suppose that $f$ is differentiable at 0, and that $f(0) = 0$. Prove that $f(x) = xg(x)$ for some function $g$ which is continuous at 0.

This is a problem from Spivak's Calculus, namely problem 27 of Chapter 10. (This is not homework, but rather self-study.) I am not sure how to go about this proof. The hint given in the text is to consider that $g(x)$ can be written as $f(x)/x$, but this puzzles me, because then continuity of $g$ at 0 says that $\lim_{x \to 0} g(x) = g(0) = f(0)/0 = 0/0$.

-
Jon, you have to prove that $g$ is continuous at $0$ using the knowledge that $f$ is differentiable at $0$, not the other way around. –  Adrián Barquero Dec 30 '10 at 2:29
Oh, I think I see where is the confusion. You can't define $g(0)$ using the formula $f(0)/0$ but you can use the fact that $f$ is differentiable at $0$ to define $g(0)$. Please consider carefully Moron's answer. It has more information than meets the eye ;) –  Adrián Barquero Dec 30 '10 at 2:36

What is $\displaystyle \lim_{x \to 0} \frac{f(x) - f(0)}{x-0}$ ?
So, differentiability of $f$ at 0 implies that $\lim_{x \to 0} f(x)/x$ exists. But then, shouldn't $f(x)/x$ at $x = 0$ be equal to this limit (which it surely is not) since $g(x) = f(x)/x$ is continuous at $x = 0$? –  Arpon Dec 30 '10 at 2:39
So, does it suffice to define $g$? That is, say that $g(x) = f(x)/x$ for $x \ne 0$ and $g(0) = \lim_{x \to 0} f(x)/x$. Then clearly, $g$ is continuous at 0, since the limit exists. –  Arpon Dec 30 '10 at 2:53
Show that $f'(0) = g(0)$ from the the continuity of $g$. Note that $f'(0) = \lim\limits_{h \to 0} \frac{f(0+h)-f(0)}{h}$.