The canonical ensemble partition function, Q,
for a system of N identical particles each of mass m is given by
![{\displaystyle Q_{NVT}={\frac {1}{N!}}{\frac {1}{h^{3N}}}\int \int dp^{N}dr^{N}\exp \left[-{\frac {H(p^{N},r^{N})}{k_{B}T}}\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f8bae9cc277a2a41944edd422c17cae8980995a5) 
where h is Planck's constant, T is the temperature and  is the Boltzmann constant. When the particles are distinguishable then the factor N! disappears.
 is the Boltzmann constant. When the particles are distinguishable then the factor N! disappears.  is the Hamiltonian
corresponding to the total energy of the system.
H is a function of the 3N positions and 3N momenta of the particles in the system.
The Hamiltonian can be written as the sum of the kinetic and the potential energies of the system as follows
 is the Hamiltonian
corresponding to the total energy of the system.
H is a function of the 3N positions and 3N momenta of the particles in the system.
The Hamiltonian can be written as the sum of the kinetic and the potential energies of the system as follows
 
Thus we have 
![{\displaystyle Q_{NVT}={\frac {1}{N!}}{\frac {1}{h^{3N}}}\int dp^{N}\exp \left[-{\frac {|p_{i}|^{2}}{2mk_{B}T}}\right]\int dr^{N}\exp \left[-{\frac {\Phi (r^{N})}{k_{B}T}}\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/63cc4a19b4421b2502780c683caeca2f27016975) 
This separation is only possible if  is independent of velocity (as is generally the case).
The momentum integral can be solved analytically:
 is independent of velocity (as is generally the case).
The momentum integral can be solved analytically:
![{\displaystyle \int dp^{N}\exp \left[-{\frac {|p|^{2}}{2mk_{B}T}}\right]=(2\pi mk_{b}T)^{3N/2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d4d33341b126ca25099f2a5cff02bfbb9cc43a3b) 
Thus we have 
![{\displaystyle Q_{NVT}={\frac {1}{N!}}{\frac {1}{h^{3N}}}\left(2\pi mk_{B}T\right)^{3N/2}\int dr^{N}\exp \left[-{\frac {\Phi (r^{N})}{k_{B}T}}\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1eec8708f4eaa007f32fa890d6b568f6c2ae4425) 
The integral over positions is known as the configuration integral,  
![{\displaystyle Z_{NVT}=\int dr^{N}\exp \left[-{\frac {\Phi (r^{N})}{k_{B}T}}\right]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/13f6e7a8b28d217bf16675950a354717cc00e6f1) 
In an ideal gas there are no interactions between particles so  Thus
Thus  for every gas particle.
The integral of 1 over the coordinates of each atom is equal to the volume so for N particles
the configuration integral is given by
 for every gas particle.
The integral of 1 over the coordinates of each atom is equal to the volume so for N particles
the configuration integral is given by  where V is the volume.
Thus we have
 where V is the volume.
Thus we have 
 
If we define the de Broglie thermal wavelength as  where
where
 
one arrives at
 
where 
 
is the single particle translational partition function.
Thus one can now write the partition function for a real system can be built up from
the contribution of the ideal system (the momenta) and a contribution due to
particle interactions, i.e.
