The equation of state of a perfect gas is derived using Maxwell distribution of velocities of molecules in a perfect gas. The Maxwell distribution can be verified by means of an experiment on effusion of a gas through a hole. This also lead to determination of the Boltzmann constant
$\newcommand{\pp}[2][]{\frac {\partial #1}{\partial #2}}$For a system in contact with heat bath, the energy is not well defined. The system being in a micro state with energy value \(E_k\) is given by Boltzmann distribution. We compute average energy and show that the average energy it in terms of the canonical partition function is given by \[ U = -k \pp[\ln Z]{\beta}.\] It is shown that for macroscopic systems the variance of energy is negligible compared to the energy, but not for microscopic systems. Hence \(\bar E\) can be identified with the thermodynamic internal energy.
Using the expression for energy in terms of the canonical partition function and the \(TdS\) equation \[dU=TdS -pdV\] we obtain an expression for the entropy,.<$\newcommand{\pp}[2][]{\frac{\partial #1}{\partial #2}} $
In this lecture canonical ensemble and canonical partition function are introduced. This topic has a central place in equilibrium statistical mechanics. This ensemble describes the microstates of a system in equilibrium with a heat bath at temperature \(T\). The probability of a microstate having energy \(E\) is proportional to \(\exp(-\beta E\), where \(\beta=kT\) and \(k\) is Boltzmann constant.
We are interested in a statistical description of a system in contact with a heat bath (reservoir).Such a system can exchange energy with the heat bath and is not an isolated system. Therefore, in equilibrium all micro states will not have equal a priori probabilities. It turns out that micro states with different energies have different probabilities.An ensemble of system in contact with a heat bath is called canonical ensemble.We need to find the probability of micro state as function of energy and the temperature of the heat bath.