# How to express internal energy in terms of the canonical function summing over energy levels?

as far as I understand, the canonical partition function of a single particle can be expressed as follows: $$z = \sum_i e^{-\beta\cdot\epsilon_i}$$ Where $$i$$ are the micro states, $$\beta$$ is the inverse of the product of the Boltzman constant and the temperature, and $$\epsilon_i$$ is the energy at that state. Which can be expanded for a system of N particles as: $$Z=z^N$$. Where Z can be expressed $$Z=\sum_i e^{-\beta\cdot E_i} = \sum_j w(E_j)\cdot e^{-\beta\cdot E_j}$$ Where j represents the energy level, and $$w$$ is the degeneracy of that energy level. So at this point I have my first question:

1. Are $$\epsilon$$ from the single particle partition function and $$E$$, from the system's partition function different?

Then the probability of occupancy of a micro state is given by: $$P_i(E_i)= \frac{e^{-\beta\cdot E_i}}{Z}$$ And the probability of an energy level being occupied is: $$P(E_j)= \frac{w(E_j)\cdot e^{-\beta\cdot E_j}}{Z}$$

And finally, the average energy can be equated to the internal energy. Which can be calculated as follows: $$U=\bar{E}=\sum_i P_i(E_i)\cdot E_i$$

And here the second question:

1. What would be the equivalent of the internal energy in terms of a summation over the energy levels ($$j$$) instead of the micro states ($$i$$)?

Thanks for any help in advance.

• But partition function for N particles $Z=z^n$ is correct for only maxwell-boltzmann statistics, right ? For quantum statistics, we cannot do that. Mar 15, 2023 at 1:39

Maybe expanding the equation $$Z=z^N$$ explicitly will be helpful \begin{aligned} Z&=z^N\\ &=(\sum_ie^{-\beta \epsilon_i})^N\\ &=(\sum_{i_1}e^{-\beta \epsilon_{i_1}})\cdot(\sum_{i_2}e^{-\beta \epsilon_{i_2}})\cdots(\sum_{i_N}e^{-\beta \epsilon_{i_N}})\\ &=\sum_{i_1,i_2,\cdots,i_N}e^{-\beta(\epsilon_{i_1}+\epsilon_{i_2}+\cdots+\epsilon_{i_N})} \end{aligned} And now we can see $$E_i = \epsilon_{i_1}+\epsilon_{i_2}+\cdots+\epsilon_{i_N}$$ So for the first question, $$\epsilon$$ is different from $$E$$.
For the second question, I think \begin{aligned} U=\bar{E}&=\sum_iP_i(E_i)E_i\\ &=\sum_jP(E_j)E_j\\ &=\sum_j\frac{w(E_j)e^{-\beta E_j}}{Z}E_j \end{aligned}
• For $N$ particle system, should not you get $U = N \bar{E}$ ? Mar 15, 2023 at 2:06
• The $\bar{E}$ in your equation is the energy of a single particle, but in our equations it means the energy of the total $N$ particles. Mar 17, 2023 at 3:23