Quotient of two $C^{(k)}$ functions is $C^{(k-1)}$ I am stuck at the following exercise in Zorich. 
Let $f,g\in C^{(k)}(D;\mathbb{R})$, and suppose that $f(x)=0\Rightarrow g(x)=0$ in the domain $D$. Show that if grad $f \neq 0$, then there is a decomposition $g=h\cdot f$ in $D$, where $h\in C^{(k-1)}(D;\mathbb{R})$.
If $D\subseteq \mathbb{R}$, then the result follows immediately from Hadamard's lemma. If $D\subseteq \mathbb{R^m}$ with $m>1$, then I can show that for $f(x_0)=0$, the limit $\lim_{x\rightarrow x_0} g(x)/f(x)$ exists. But how to prove that $g/f$ is $C^{(p-1)}$ at such points?
Thanks in advance!
 A: So, let $q_0 \in D$, we want to show that on an open neighborhood $U \subset D$ of $q_0$, there is a $C^{p-1}$ function $h$ such that $g_{|U}=hf_{|U}$. 
If $f(x_0) \neq 0$, it is obvious. 
So let’s assume $f(q_0)=0$. Assume eg that $\frac{\partial f}{\partial x_1}(q_0) \neq 0$. 
Define $\psi(q)=(f(q),x_2(q)-x_2(q_0), \ldots, x_n(q)-x_n(q_0))$. 
Then $\psi$ is defined and $C^p$ on $D$, vanishes at $q_0$ and its derivative at $q_0$ is invertible. 
As a consequence, there is an open subset $q_0 \in U \subset D$ and a “box” open subset $0 \subset V \subset \mathbb{R}^m$ (ie a product of $m$ open intervals) such that $\psi: U \rightarrow V$ is a $C^p$-diffeomorphism with inverse $\sigma$. 
Now, note that for $x \in V$, $f(\sigma(x))=x_1$. 
So define $g_1=g \circ \sigma$ on $V$, $g(x)=0$ whenever $x_1=0$. Define now $h_1(x)=\int_0^1{\frac{\partial g_1}{\partial x_1}((1-t)p(x)+tx)\,dt}$, where $p(x_1, \ldots, x_n)=(0,x_2,\ldots,x_n)$. It is easy to see that $h_1$ is $C^{p-1}$ and $h_1x_1=g_1$. 
So $U$ and $h_1 \circ \psi$ work around $q_0$. 
