$f:\mathbb{R}^n \to \mathbb{R}$ has expansion $\sum_i g_i(x)x^i$
Problem 2-35 on page 34 of Spivak's Calculus on Manifolds states
If $f: \mathbb{R}^n: \to \mathbb{R}$ is differentiable and $f(0) =0$, prove that there exist $g_i: \mathbb{R}^n \to \mathbb{R}$ such that $f(x) = \sum_{i=1}^n x^ig_i(x)$.
Hint: if $h_x(t) = f(tx)$, then $f(x) = \int_0^1 h_x'(t)$.
I understand the answer he wants, but hasn't he left out a hypothesis that would ensure $h_x'(t)$ is integrable? (For instance the continuity of $df$.)
Secondly, I'm wondering if this theorem is used anywhere. Perhaps in differential geometry it might be useful to write locally $f \in C^\infty (M)$ as $\sum_i g_i(x) x_i$ for some coordinates $x_i$.
You are quite right that you need integrability of the derivative. But the answer is quite simple: on page 28 he writes: First of all, we will be interested almost exclusively in functions $f:\mathbf{R}^n\rightarrow\mathbf{R}^n$ which are $C^\infty$ (that is, each component function $f$ possesses continuous partial derivatives of all orders); sometimes we will use the words "differentiable" or "smooth" to mean $C^\infty$". So when he says "differentiable" it is understood "of class $C^\infty$".
The main application of this result (Hadamard's lemma) I know of is to show that the space of vector fields $\mathfrak{X}(M)$ is canonically isomorphic to the space of derivations $\mathrm{Der}_{\mathbf{R}}(C^\infty(M))$. Variations of the result you mention appear later on in Spivak, when he gives a coordinate free proof of $L_X Y=[X,Y]$.