# Gradient of Total Variation (TV) Norm in Total Variation Denoising

The Gradient of the TV norm is $$\mathrm{Grad}J(f)=\mathrm{div}\left(\frac{\nabla f}{\lVert\nabla f\rVert}\right).$$

From this other link, it also mentions that the derivative is as follow

Formally, we can write $\partial J(u)=-\mathrm{div}\left(\frac{\nabla u}{\lvert \nabla u\rvert}\right)$

I know how to calculate divergence, but I don't understand how the gradient of total variation is related to divergence.

I am by no means an expert on total variation, however I think you should check out this Wikipedia page. It doesn't directly answer your question, but I believe the lemma below illustrates the relationship between total variation and divergence.

There, it gives a lemma that follows from the Gauss-Ostrogradsky theorem and provides a proof for it,

$\int_{\Omega}f\,div(\phi) = -\int_{\Omega} \nabla f \cdot\phi$.