In the cannonical or NVT ensemble the number of particles, volume, and temperature are fixed. If we have a microstates and macrostates and a coarse-graining function . Each microstate has an energy . In the cannonical ensemble the Hemholtz free energy is:
where the partition function is
Taking the gradient of
Then substituting in for gives
And the only part of the expression that depends on is the delta function.
For any function so
The gradient can be converted with the Jacobian matrix , using the pseudoinverse of the matrix.
Next, using the divergence theorem where the total divergence of a volume is equal to the surface integral . If is a scalar function and is a vector function then
Where is the normal vector to the surface.
The product rule for gradients
substitutded becomes
has dimension so we can treat each row as a vector. In the following notation we apply dot products and gradients to each row of . We substitute and .
In the limit that expands to cover all of the boundary points will contain points that get infinitely far away from the origin . We assume that the energy goes towards infinity away from the origin meaning tends towards zero, and the delta function is always zero in the limit towards infinity. With these assumptions the boundary term on the left hand side of the equality disappers.
so then
and dot product-ing each row of a matrix is just matrix multiplication so
Then substitue into the original equation gives
Using the gradient product rule again