Show that the entropy of an ideal gas in thermal equilibrium is given by the formula
S=kε∑[(⟨nε⟩+1)ln⟨nε⟩+1)−⟨nε⟩ln⟨nε⟩]
in the case of bosons and by the formula
S=kε∑[−(1−⟨nε⟩)ln(1−⟨nε⟩)−⟨nε⟩ln⟨nε⟩]
in the case of fermions. Verify that these results are consistent with the general formula
S=−kε∑{n∑pε(n)lnpε(n)},
where pε(n) is the probability that there are exactly n particles in the energy state ε.