Chain rule for weakly differentiable functions Given are $f\in L^1(\mathbb R^n)$, $f>0$, such that $\log f\in L^1_{\mathrm{loc}}(\mathbb R^n)$ and $\nabla \log f = g$ in the sense of distributions, with $g\in L^1_{\mathrm{loc}}(\mathbb R^n)\cap L^1(\mathbb R^n,fdx)$. Is it true that 
$$
f\nabla \log f = \nabla f,
$$
again in the sense of distributions?
Obviously the result is true if $f\in C^1(\mathbb R^n)$; it would also be true if $\log f $ were a Sobolev function with bounded range, since then the mapping $\log f \mapsto f$  (i.e. the exponential function $s\mapsto e^s$) can be considered $C^1$ and Lipschitz, and usual theorems on composition apply (e.g. Brezis, Functional Analysis, Sobolev Spaces, and PDEs, Corollary 8.11). In homogeneous space, i.e. without the weight in the $L^1$-space, the result would follow from regularization by convolution. 
Without these helping properties, does anyone know how to prove this? 
 A: I think it works by cutting-off as follows:
Fix $\epsilon>0$, let $f_\epsilon=\min\{1/\epsilon,\max\{\epsilon,f\}\}$, and observe that $f_\epsilon\to f$ in $L^1_{loc}$.
Then obviously $\log f_\epsilon=\min\{\log(1/\epsilon),\max\{\log(\epsilon),\log f\}\}$ and $\nabla \log f_\epsilon =(\nabla\log f)\chi_{[\epsilon<f<1/\epsilon]}$. Since after truncation we made sure that $\log f_\epsilon$ has bounded range we can use the composition with the exponential to conclude that
$$
\nabla f_\epsilon=\nabla(\exp(\log f_\epsilon))=f_\epsilon\nabla \log f_\epsilon=(f\nabla\log f)\chi_{[\epsilon<f<1/\epsilon]}.
$$
Because $f_\epsilon\to f$ in $L^1_{loc}$ we have
$$
\int f_\epsilon\, div(\phi)\to \int f \,div(\phi)
$$
for all test functions when $\epsilon\to 0$. On the other hand since $\nabla f_\epsilon=f_\epsilon\nabla\log f_\epsilon$ we can write
$$
-\int f_\epsilon\, div(\phi)=\int f_\epsilon\nabla\log f_\epsilon\cdot \phi=\int (f\nabla\log f)\cdot(\phi\chi_{[\epsilon<f<1/\epsilon]}).
$$
With your assumption that $\nabla\log f\in L^1(f\, dx)$ we can apply Lebesgue's dominated convergence to the last term (with the uniform bound almost everywhere $|(f\nabla\log f)\cdot(\phi\chi_{[\epsilon<f<1/\epsilon]})|\leq |f\nabla\log f|.\|\phi\|_{\infty}\in L^1$) and conclude that
$$
\int (f\nabla\log f)\cdot(\phi\chi_{[\epsilon<f<1/\epsilon]})\to \int f\nabla\log f \cdot\phi.
$$
Thus
$$
\int f\,div(\phi)=-\int f\nabla\log f \cdot\phi
$$
for all test-functions $\phi\in C^\infty_c$.
