Functions with vanishing Kahler differentials along a subscheme Question: Let $k$ be an algebraically closed field of characteristic zero.
Let $X=\mathrm{Spec}\!~R$ be a scheme of finite type over $k$. Suppose $I\subset R$ is
an ideal and $f\in I$.
Assume that $df = 0$ in $\Omega_{R/k}\otimes_R R/I$.
Does it follow that there is some positive integer $k$ such that $f^k \in I^{k+1}?$
Motivation: Suppose that $X$ and $V(I)$ are both smooth, then we have the short exact sequence
$$
  0 \to I/I^2 \to \Omega_{R/k}\otimes_R R/I \to \Omega_{(R/I)/k} \to 0.
$$
Thus if $f\in I$ and $df \equiv 0$ mod $I$, then $f\in I^2$.
In general this fails. For example, we can take $R=k[x]$, $I=(x^m)$ and $f = x^{m+1}$. Then $f\not\in I^2$ if $m>1$. However
$$
  f^{m}\in I^{m+1}.
$$
Geometrically, the statement says that if a function vanishing on the subscheme also has vanishing differential, then
the function is nilpotent on the normal cone.
A Quick Reduction and Some Partial Results: If the statement is true for some $R$, then it's also true for any quotient of $R$. Hence we may assume that $R$ is the polynomial ring $k[x_1,\dots,x_n]$. 
Under this hypothesis, the statement becomes

If $f\in I$ and $\partial f/\partial x_i\in I$ for $i=1,\dots,n$. Does it imply that $f^k\in I^{k+1}$ for sufficiently large $k$?



*

*if $I=(g)$ is principal, then we can prove the statement by factorizing $g$ intro irreducible polynomials 
$$
g=g_1^{a_1}\cdots g_r^{a_r}.
$$
If we write $f=gh$. Then it's easy to show that $g_1\cdots g_r$ divides $h$.
Hence we can take $k=\max \{a_i\}$. 

*if $I$ is a graded ideal (generated by monomials), then we may assume that $f$ is a monomial, say $f=x_1^{a_1}\cdots x_n^{a_n}\in I$ and set $k=a_1+\cdots +a_n$. Then we have
$$
f^{k} = \sum_{a_i\neq 0} \left(\frac{\partial f}{\partial x_i}
\cdot
\frac{x_i}{a_i}
\right)^{a_i}
\in I^k\cdot f\subset I^{k+1}.
$$

*a comment from S.Li below: Without loss of generality, we can simply take $I$ to be the ideal generated by $f$ and all the $\partial f/\partial x_i$.

 A: I am writing up the comments above as an answer, partly because they involve a couple of fun lemmas about blowing up.  I tried to find a proof that does not use resolution of singularities, but I could not find one.
Let $X$ be a scheme, and let $\mathcal{J}$ be a quasi-coherent sheaf of ideals.  Then the blowing up, $\nu:Z\to X$, is final among morphisms to $X$ such that the inverse image ideal sheaf $\nu^{-1}\mathcal{J}\cdot \mathcal{O}_Z$ is everywhere locally principal and generated by a nonzerodivisor (this condition is automatically true for the unique morphism from the empty scheme).  There is also a construction of $Z$ as $$Z=\underline{\text{Proj}}_X\ \bigoplus_{n \geq 0} \mathcal{J}^n .$$  In particular, if $\mathcal{J}$ is everywhere locally finitely generated, then $\nu$ is proper.  In that case, for every $n\geq 0$, there is a natural homomorphism of locally finitely generated, quasi-coherent $\mathcal{O}_X$-modules, $$\alpha_n:\mathcal{J}^n \to \nu_*(\nu^{-1}(\mathcal{J}^n)\cdot \mathcal{O}_Z).$$  It need not be the case that every $\alpha_n$ is an isomorphism, e.g., for $X=\text{Spec}\ k[s,t]$ and $\mathcal{J} = (\langle s^d, s^{d-1}t,st^{d-1},t^d \rangle)^\widetilde{\ \ \ }$, then $\alpha_n$ is an isomorphism precisely for $n\geq d-2$.
Lemma 1. If $X$ is Noetherian and $\mathcal{J}$ is coherent, then there exists $n_0\geq 0$ such that for all $n\geq n_0$, $\alpha_n:\mathcal{J}^n\to \nu_*(\nu^{-1}\mathcal{J}^n\cdot \mathcal{O}_Z)$ is an isomorphism.
The proof is basically Exercise II.5.9 from Hartshorne's "Algebraic Geometry".  
Now let $X$ be an integral, Noetherian scheme, let $\mathcal{I}$ and $\mathcal{J}$ be nonzero coherent ideal sheaves, and let $\mu:Y\to X$, resp. $\nu:Z\to X$, be the blowing up of $X$ along the ideal sheaf $\mathcal{I}$, resp. $\mathcal{Z}$.  Each blowing up a dominant morphism of integral schemes such that the pullback of the ideal sheaf is locally principal, and universal among all such morphisms.  Then both the blowing up of $Y$ along $\mu^{-1}\mathcal{J}\cdot \mathcal{O}_Y$ and the blowing up of $Z$ along $\nu^{-1}\mathcal{I}\cdot \mathcal{O}_Z$ are universal among dominant morphisms of integral schemes to $X$ such that the pullback ideal sheaves of both $\mathcal{I}$ and $\mathcal{J}$ are locally principal.  Thus, there is a canonical isomorphism of these two blowings up; call the common scheme $W$.  So there is a commutative diagram $$ \begin{array}{lcr} W & \xrightarrow{\widetilde{\nu}} & Y \\ \widetilde{\mu}\downarrow & & \downarrow \mu \\ Z & \xrightarrow{\nu} & X \end{array} $$ where every morphism is a blowing up. In fact, this is the blowing up of $\mathcal{I}\cdot \mathcal{J}$, cf. http://stacks.math.columbia.edu/tag/085Y  Denote the composite morphism from $W$ to $X$ by $\lambda:W\to X$.  Denote by $\widetilde{\mathcal{I}}$, resp. $\widetilde{\mathcal{J}}$, the inverse image ideal sheaf $\nu^{-1}\mathcal{I}\cdot \mathcal{O}_Z$, resp. $\mu^{-1}\mathcal{J}\cdot \mathcal{O}_Y$.  Since $\mu^{-1}\mathcal{I}\cdot \mathcal{O}_Y$ is already locally principal generated by a nonzerodivisor, the natural homomorphism, $$\beta_n:\mu^{-1}\mathcal{I}^n\cdot \mathcal{O}_Y \to \widetilde{\nu}_*(\widetilde{\nu}^{-1}(\mu^{-1}\mathcal{I}_n\cdot \mathcal{O}_Y)\cdot \mathcal{O}_W),$$ is an isomorphism for every $n\geq 0$.  Then $\lambda^{-1}\mathcal{I}\cdot \mathcal{O}_W$ equals $\nu^{-1}(\mu^{-1}\mathcal{I}\cdot \mathcal{O}_Y)\cdot \mathcal{O}_W$.  Thus, by Lemma 1 above, for every $n\geq n_0$, the natural map, $$\mathcal{I}^n \to \lambda_*(\lambda^{-1}\mathcal{I}^n\cdot \mathcal{O}_W),$$ is an isomorphism.  Again by Lemma 1 above, for every $n\geq n_1$, $$\widetilde{\mathcal{I}}^n \to \widetilde{\mu}_*(\widetilde{\mu}^{-1}\widetilde{\mathcal{I}}^n\cdot \mathcal{O}_W),$$ is an isomorphism.  Altogether, this proves the following.
Lemma 2. For an integral, Noetherian scheme $X$, for a nonzero coherent sheaf $\mathcal{J}$ with blowing up $\nu:Z\to X$, for every coherent sheaf $\mathcal{I}$, there exists an integer $n_0\geq 0$ such that for every $n\geq n_0$, the natural homomorphism $\mathcal{I}^n\to \nu_*(\nu^{-1}\mathcal{I}^n\cdot \mathcal{O}_Z)$ is an isomorphism.
Thus, in your setting, for every $m\geq n_0-1$, to prove that $f^m$ is a global section of $\mathcal{I}^{m+1}$, it suffices to prove that $\nu^*f^m$ is a global section of $\nu^{-1}(\mathcal{I}^{m+1})$.  Here I am assuming that $X$ is a smooth, finite type $k$-scheme, where $k$ is an algebraically closed field of characteristic $0$.  By strong resolution of singularities, there exists a blowing up $\nu:Z\to X$ such that $\nu^{-1}\mathcal{I}\cdot \mathcal{O}_Z$ is everywhere locally principal generated by an element of the form $g_1^{a_1}\cdots g_r^{a_r}$, where $(g_1,\dots,g_r)$ is part of a regular system of parameters locally.  By your proof, locally, $\nu^*f^m$ is a section of $\nu^{-1}\mathcal{I}^{m+1}\cdot \mathcal{O}_Z$ for every $m\geq \max(a_1,\dots,a_r)$.  
Since the quasi-compact scheme $Z$ is covered by finitely many open affines on which $\nu^{-1}\mathcal{I}\cdot \mathcal{O}_Z$ is locally generated by $g_1^{a_1}\cdots g_r^{a_r}$, it follows that there exists $m_1$ such that for every $m\geq m_1$, $\nu^* f^m$ is a global section of $\nu^{-1} \mathcal{I}^{m+1}\cdot \mathcal{O}_Z$.  Thus, by the previous paragraph, there exists $n_1=\max(n_0-1,m_1)$ such that for every $m\geq n_1$, $f^m$ is a section of $I^{m+1}$.
