For a twice continuously differentiable scalar function , equality of mixed partial derivatives gives . Substitute into the preceding product rule:
Stokes theorem on a spanning surface with consistent boundary orientation then gives
This is a weighted gradient circulation identity. All fields must be defined and sufficiently smooth on a neighborhood of the surface; a scalar prefactor can create nonzero circulation even when the unweighted field is a gradient.