Ideal of smooth function on a manifold vanishing at a point I'm trying to prove the following lemma: let $M$ be a smooth manifold and consider the algebra $C^{\infty}(M)$ of smooth functions $f\colon M \to \mathbb{R}$. Given $x_0 \in M$, consider the ideals
$$\mathfrak{m}_{x_0} := \{f\in C^{\infty}(M) : f(x_0)=0\},$$
$$\mathfrak{I}_{x_0} := \{f\in C^{\infty}(M) : f(x_0)=0, df(x_0)=0\}.$$
Then $\mathfrak{I}_{x_0} = \mathfrak{m}^2_{x_0}$, i.e. any function $f$ vanishing at $x_0$ together with its derivatives can be written as
$$f=\sum_kg_kh_k, \quad g_k, h_k \in \mathfrak{m}_{x_0}.$$
I have no idea about how to prove the inclusion $\mathfrak{I}_{x_0} \subseteq \mathfrak{m}^2_{x_0}$.
 A: First, a general fact.

If $f:\mathbb{R}^n\rightarrow \mathbb{R}$ is smooth and $f(\vec{0}) = 0$, then, for each $i$ from $1$ to $n$, there exist smooth functions $\rho_i:\mathbb{R}^n\rightarrow\mathbb{R}$ with the property that $f(\vec{x}) = \sum_i x_i \rho_i(\vec{x})$ and $\frac{\partial f}{\partial x_i}|_{\vec{0}} = \rho_i(\vec{0}).$

(I'll use vector notation to indicate when things are happening in $\mathbb{R}^n$ and leave off the vector notation for things happening in manifolds.)
A proof the case $n=1$ can be found in another answer I wrote a while ago; the proof for the general case follows just by using partial derivatives and the chain rule.
Now, given $x_0\in M$, let $(U,\phi)$ (with $\phi:U\rightarrow\mathbb{R}^n$) be a chart around $x_0$ with $\phi(x_0) = \vec{0}$.
Given any $f\in\mathfrak{I}_{x_0}$, consider the function $\vec{f}:\phi(U)\rightarrow\mathbb{R}$ given by $\vec{f} = f\circ\phi^{-1}$, which is a composition of smooth functions, hence smooth.
Further, $\vec{f}(\vec{0}) = f(\phi^{-1}(\vec{0})) = f(x_0) = 0$.  So, by the general fact, we know $\vec{f}(\vec{x}) = \sum_i \vec{x}_i \vec{\rho}_i$ for some choice of smooth functions $\vec{\rho}_i$.
Then the condition that $d_{x_0}f = 0$ is equivalent to the condition that $\vec{\rho}_i(\vec{0}) = \frac{\partial \vec{f}}{\partial \vec{x}_j}|_{\vec{0}} = 0$ for all $j$.
Now, consider the functions $x_i = \vec{x}_i\circ \phi$ and $\rho_i = \vec{\rho}_i\circ\phi$.  It's easy to see that on $U$, $f = \sum_i x_i \rho_i$ and that $x_i$ and $\rho_i$ are both elements of $\mathfrak{m}_{x_0}$.
Finally, to promote this to all of $M$, use a bump function $\lambda$ which is identically $1$ near $x_0$ and identically $0$ outside a small open set containing $x_0$.  Then, on $M$, $$f = \lambda\left(\sum_i x_i \rho_i\right) + (1-\lambda) f$$ where all four pieces $\lambda x_i$, $\rho_i$, $1-\lambda$ and $f$ are in $\mathfrak{m}_{x_0}.$
A: $\forall i \in \{1,2,\dots,n\}$, let $g_i(x_1, \dots, x_n)=\int_0^1\frac{\partial f}{\partial x_i}(tx_1, \dots, tx_n)dt$, it is easy to verify that $f=\sum_{i=1}^nx_ig_i$
