# Deriving thermodynamic quantities from partition functions

Let's say I have a canonical partition function for the canonical assemble related to the Helmholtz free energy $$A$$, given by $$A=-kT\ln Z$$

Now, I want to derive thermodynamical quantities, like the internal energy $$E$$, pressure $$p$$ and whichever thermodynamic quantity I want.

I know any thermodynamic quantity $$X$$ can be obtained by $$\langle X \rangle = \sum_{v} P_v X_v$$ where $$v$$ is an index of a permissible microstate.

For example, how would I get average energy $$E$$ or average pressure $$p$$ from such an equation?

So I know, from the above equation, I know $$Z = \sum_{i} \exp (-\beta E_i - \beta p_i V) \implies P_i \propto \exp (-\beta E_i - \beta p_i V)$$

So, $$\langle E \rangle = \sum _i P_i E_i = \frac{-\frac{dZ}{d\beta}}{Z}$$

I can do the same for pressure, but the differentiation can be done by $$\beta V$$. How would I find say entropy $$S$$ for example?

The Helmholtz energy is related to entropy as $$A = E - TS$$ and hence, $$dA = -SdT + \dots$$, where I have ignored the other work terms. Therefore, to find the entropy just calculate
$$S = -\frac{\partial A}{\partial T} = \frac{\partial (KT \,\mbox{ln} Z)}{\partial T} \,,$$
• Thanks! I have another side question, what if the canonical partition is some elementary function $f(N,V,T)$? Can I still use the methods above? Sep 13, 2020 at 13:49